1
0
mirror of https://github.com/RPCSX/llvm.git synced 2025-01-30 08:56:40 +00:00

135158 Commits

Author SHA1 Message Date
Jacques Pienaar
48ed4ab2d6 Rename AnalyzeBranch* to analyzeBranch*.
Summary: NFC. Rename AnalyzeBranch/AnalyzeBranchPredicate to analyzeBranch/analyzeBranchPredicate to follow LLVM coding style and be consistent with TargetInstrInfo's analyzeCompare and analyzeSelect.

Reviewers: tstellarAMD, mcrosier

Subscribers: mcrosier, jholewinski, jfb, arsenm, dschuff, jyknight, dsanders, nemanjai

Differential Revision: https://reviews.llvm.org/D22409

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275564 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 14:41:04 +00:00
Igor Laevsky
fe392929ff Re-submit r272891 "Prevent dangling pointer problems in BranchProbabilityInfo"
Most possibly problem was caused by the same reason as PR28400. This change
bypasses it by using CallbackVH instead of AssertingVH.

Differential Revision: https://reviews.llvm.org/D20957




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275563 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 14:31:16 +00:00
Daniel Sanders
92e694c321 Revert r275141 - Mips: Avoid implicit iterator conversions, NFC
It appears to have caused some failures in our buildbots.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275562 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 13:54:20 +00:00
Sebastian Pop
9c2e9dc782 code hoisting pass based on GVN
This pass hoists duplicated computations in the program. The primary goal of
gvn-hoist is to reduce the size of functions before inline heuristics to reduce
the total cost of function inlining.

Pass written by Sebastian Pop, Aditya Kumar, Xiaoyu Hu, and Brian Rzycki.
Important algorithmic contributions by Daniel Berlin under the form of reviews.

Differential Revision: http://reviews.llvm.org/D19338

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275561 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 13:45:20 +00:00
Nitesh Jain
d64a2c4149 [LLVM][MIPS] Fix createStubFunction to emit JR encoding based on Arch.
Reviewers: vkalintiris, dsanders

Subscribers: jaydeep, bhushan, mohit.bhakkad, slthakur, llvm-commits

Differential Revision: https://reviews.llvm.org/D21172

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275559 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 12:56:37 +00:00
Simon Pilgrim
c08f35ca62 [X86][AVX] Added shuffle tests for UNPCK+PERMUTE
lowerVectorShuffleAsPermuteAndUnpack could solve this if it worked with 256-bit vectors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275554 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 11:51:46 +00:00
Simon Pilgrim
02e653effb [X86][AVX2] Added a memory version of test_mm256_broadcastsi128_si256
This should lower to vbroadcasti128

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275552 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 11:40:27 +00:00
Simon Pilgrim
be745b9c8c [X86][AVX2] Improve lowerShuffleAsRepeatedMaskAndLanePermute permutation of 64-bit sub-lanes
As discussed on PR28136, lowerShuffleAsRepeatedMaskAndLanePermute was attempting to match repeated masks at the 128-bit level and then permute the resultant lanes at the 128-bit (AVX1) or 64-bit (AVX2) sub-lane level.

This change allows us to create the repeated masks at the sub-lane level (and then concat them together to create a 128-bit repeated mask) and then select which sub-lane to permute. This has no effect on the AVX1 codegen.

Fixes PR28136.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275543 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 09:49:12 +00:00
James Molloy
d7bfcbac26 [ARM] Fix build after r275540
A rebase seemed so innocent before committing. Turns out someone changed a pointer to a reference in the mean time :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275541 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 08:12:44 +00:00
James Molloy
cf85ddcdf1 [Thumb-1] Select post-increment load and store where possible
Thumb-1 doesn't have post-inc or pre-inc load or store instructions. However the LDM/STM instructions with writeback can function as post-inc load/store:

  ldm r0!, {r1}  @ load from r0 into r1 and increment r0 by 4

Obviously, this only works if the post increment is 4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275540 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 08:03:56 +00:00
James Molloy
c30ebec2df [ARM] Followup to r275537 addressing review comments
Address Chad's comment in D22216 which I missed due to tunnel vision on the "LGTM" comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275538 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 07:57:35 +00:00
James Molloy
decaafe6c2 [ARM] Prefer indirect calls in minsize mode
... When we emit several calls to the same function in the same basic block.

An indirect call uses a "BLX r0" instruction which has a 16-bit encoding. If many calls are made to the same target, this can enable significant code size reductions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275537 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 07:55:21 +00:00
David Majnemer
498a8f9546 XFAIL two SeparateConstOffsetFromGEP tests
They appear to have relied on bugs hidden in copyIRFlags/andIRFlags.

This has been filed as PR28564.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275533 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 05:37:22 +00:00
David Majnemer
1bd42849f0 [IR] andIRFlags and copyIRFlags needs to handle GEP
We didn't consider the inbounds flag on GEPs leading to downstream users
introducing UB.

This fixes PR28562.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275532 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 05:02:31 +00:00
Vedant Kumar
58d6ea41de [llvm-cov] Relax a test for Windows
Attempt to address this bot failure:

  http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/4967

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275522 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 02:11:37 +00:00
Vedant Kumar
b972a0f1a0 [llvm-cov] Improve error messages
While we're at it, extend an existing test to make sure that error
messages look reasonable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275520 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 01:53:39 +00:00
Lang Hames
8e1c20f813 [Kaleidoscope][BuildingAJIT] Start filling in text for chapter 3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275518 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 01:39:49 +00:00
Vedant Kumar
343b2711ec [llvm-cov] Fix a use-after-free
Taking a lock before appending to a vector does no good unless threads
reading from the vector also take the lock, because the vector could be
re-sized.

I don't have a good isolated test for this. I found the issue with ASan
while testing a large project.  I'm working on a bot that does this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275516 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 01:19:36 +00:00
Vedant Kumar
b9d9ab2c32 [llvm-cov] Clean up an awkward capture-by-reference (NFC)
Writing `for (StringRef &SourceFile : ...)` is strange to begin with.
Subsequently capturing "SourceFile" by reference is even stranger. Just
copy the StringRef, since that's cheap to do.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275515 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 01:19:35 +00:00
Vedant Kumar
7b18a76385 [Coverage] Mark a few more methods const (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275514 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 01:19:33 +00:00
Matt Arsenault
beff7fe056 AMDGPU: Fix not expanding control flow after some kill blocks
Also stop trying to insert skip blocks at end_cf. This
was inserting them at the end of the block which doesn't make
sense. The skip should be inserted at the beginning of the block
right after the end cf. Just remove this for now since no tests
seem to stress this and I think this can be handled more generally
later.

Fixes bug 28550

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275510 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 00:58:15 +00:00
Matt Arsenault
011dcf3d90 AMDGPU: Fix trying to skip from a block with no successors
Found while reducing bug 28550

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275509 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 00:58:13 +00:00
Matt Arsenault
435a4467a3 AMDGPU: Fix splitting kill blocks with defs before kill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275508 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 00:58:09 +00:00
Haicheng Wu
f7f8380105 [AArch64] Set COPY ZR isAsCheapAsAMove when needed.
If a subtarget has both ZCZeroing and CustomCheapAsMoveHandling features (now
only Kryo has both), set COPY (W|X)ZR isAsCheapAsAMove.

Differential Revision: http://reviews.llvm.org/D22360

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275503 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 00:27:01 +00:00
Reid Kleckner
c61d5f4b2c [codeview] Shrink inlined call site line info tables
For a fully inlined call chain like a -> b -> c -> d, we were emitting
line info for 'd' 3 separate times: once for d's actual InlineSite line
table, and twice for 'b' and 'c'. This is particularly inefficient when
all these functions are in different headers, because now we need to
encode the file change. Windbg was coping with our suboptimal output, so
this should not be noticeable from the debugger.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275502 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 23:47:15 +00:00
Tim Northover
520a6ed0f1 llvm-objdump: extend __mh_execute_header handling to other special syms
We don't need to print any of the special __mh_*_header symbols when
disassembling. Since they point at the beginning of the segment (not where the
actual code is) they're pretty misleading.

Should also fix lld bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275498 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 23:13:03 +00:00
Simon Pilgrim
db8566250f [X86][AVX2] Allow VPERMPD/VPERMQ shuffles to call combineShuffle (reapplied)
This improves the situation discussed in D19228 where we were forcing VPERMPD/VPERMQ where VPERM2F128/VPERM2I128 would have been better.

This was incorrectly reverted in rL275421 during triage of PR28552.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275497 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 23:05:09 +00:00
Adam Nemet
81a5520fe8 [LoopDist] Fix typo in diagnostic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275495 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 22:33:46 +00:00
Tim Northover
323f7893f4 llvm-objdump: handle stubbed and malformed dylibs better
We were quite happy to read past the end of the valid section data when
disassembling. Instead we entirely skip stub dylibs, and tell the user what's
happened if their section only has partial data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275487 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 22:13:32 +00:00
Ekaterina Romanova
9c524094cf [GVN] Fold constant expression in GVN.
Fix for PR 28418.

opt never finishes compiling a test when -gvn option is passed.
The problem is caused by the fact that GVN fails to fold a constant expression.

Differential Revision: https://reviews.llvm.org/D22185



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275483 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 22:02:25 +00:00
Peter Collingbourne
ef2acb50d0 Move legacy LTO interface headers to legacy/ directory.
Differential Revision: https://reviews.llvm.org/D22173

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275476 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 21:21:16 +00:00
Teresa Johnson
b0786ec025 [ThinLTO/gold] Perform index-based weak/linkonce resolution
Summary:
Invoke the weak/linkonce symbol resolution support (already used by
libLTO) that operates via the summary index.

This ensures prevailing linkonce are kept, by making them weak, and
marks preempted copies as available_externally when possible.

With this change, the older support for keeping the prevailing linkonce
(by changing their symbol resolution) is removed.

Reviewers: mehdi_amini

Subscribers: llvm-commits, mehdi_amini

Differential Revision: http://reviews.llvm.org/D22302

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275474 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 21:13:24 +00:00
Matthew Simpson
d69942c12d [LV] Rename StrideAccesses to AccessStrideInfo (NFC)
We now collect all accesses with a constant stride, not just the ones with a
stride greater than one. This change was requested in the review of D19984.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275473 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 21:05:08 +00:00
Matthew Simpson
843f7ad617 [LV] Allow interleaved accesses in loops with predicated blocks
This patch allows the formation of interleaved access groups in loops
containing predicated blocks. However, the predicated accesses are prevented
from forming groups.

Differential Revision: https://reviews.llvm.org/D19694

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275471 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 20:59:47 +00:00
Sanjay Patel
2fa0c5869c don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275470 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 20:54:43 +00:00
Lang Hames
36105c0dde [Object] Change Archive::findSym to return an Expected<Optional<Child>>.
As suggested by Rafael in review of D22079 - this was accidentally left out of
the final commit (r275316).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275469 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 20:44:27 +00:00
Davide Italiano
f3702b696c [SCCP] Pass the Solver by reference, copies are expensive ...
.. enough to cause LTO compile time to regress insanely.
Thanks *a lot* to Rafael for reporting the problem and testing
the fix!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275468 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 20:25:54 +00:00
Mehdi Amini
a43274d789 Add recently added TargetOptions::EnableIPRA member to operator==
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275467 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 20:22:13 +00:00
Sanjoy Das
f5f726b224 [ValueTracking] Use Instruction::getFunction; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275465 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 20:19:01 +00:00
Justin Lebar
d1a73a00b2 s/constexpr/LLVM_CONSTEXPR in AArch64InstrInfo.cpp.
Yet again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275463 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 20:08:23 +00:00
Krzysztof Parzyszek
1a360b3be9 [Hexagon] Packetize function call arguments with tail call instructions
On Hexagon is it legal to packetize the instructions setting up call
arguments with the call instruction itself. This was already done,
except for tail calls. Make sure tail calls are handled as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275458 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 19:30:55 +00:00
Evandro Menezes
7846f45617 [AArch64] Adjust the scheduling model for Exynos-M1.
Enable use-postra-scheduler. (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275457 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 19:25:46 +00:00
Sanjoy Das
c87d751c1e [JumpThreading] PRE unordered loads
Summary: Extend JumpThreading's PRE to unordered atomic loads.

Reviewers: hfinkel, reames

Subscribers: mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D22326

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275456 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 19:21:15 +00:00
Krzysztof Parzyszek
8bd1db4d74 Add debugging code to the packetizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275455 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 19:04:26 +00:00
Jun Bum Lim
fa907d312a [PM] Port Dead Loop Deletion Pass to the new PM
Summary: Port Dead Loop Deletion Pass to the new pass manager.

Reviewers: silvas, davide

Subscribers: llvm-commits, sanjoy, mcrosier

Differential Revision: https://reviews.llvm.org/D21483

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275453 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 18:28:29 +00:00
Justin Lebar
d4faf8fe43 [CodeGen] Refactor MachineMemOperand::Flags's target-specific flags.
Summary:
Make the target-specific flags in MachineMemOperand::Flags real, bona
fide enum values.  This simplifies users, prevents various constants
from going out of sync, and avoids the false sense of security provided
by declaring static members in classes and then forgetting to define
them inside of cpp files.

Reviewers: MatzeB

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D22372

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275451 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 18:15:20 +00:00
Justin Bogner
505d1e7a4f TableGen: Fix a confusing use of both i and I as variables. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275450 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 18:08:33 +00:00
Kostya Serebryany
ec8a2f2059 [sanitizer-coverage] make sure that calls to __sanitizer_cov_trace_pc are not merged (otherwise different calls get the same PC and confuse fuzzers)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275449 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 17:59:01 +00:00
Nirav Dave
99b3da61b0 [X86][MC] Fix bracket expression parsing in intel-style assembly.
Only perform struct field check on Identifier tokens.

Fixes PR28547.

Reviewers: rnk

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D22361

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275445 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 17:37:05 +00:00
Ahmed Bougacha
e9edae4b2d [GlobalISel] Fix G_OR opcode after the addition of a TargetOpcode.
r275367 fixed G_ADD and G_BR, but not G_OR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275444 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 17:29:49 +00:00