1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 06:22:56 +02:00
Commit Graph

137255 Commits

Author SHA1 Message Date
Richard Smith
d13903d090 Revert r279564. It introduces undefined behavior (binding a reference to a
dereferenced null pointer) in MachineModuleInfo::MachineModuleInfo that causes
-Werror builds (including several buildbots) to fail.

llvm-svn: 279580
2016-08-23 22:08:27 +00:00
Tim Northover
9fc2f3ceff GlobalISel: add some G_TRUNCs to make icmp test valid MIR.
llvm-svn: 279579
2016-08-23 22:07:31 +00:00
Sanjay Patel
c44c06d7a3 [InstCombine] use local variables for repeated values; NFCI
llvm-svn: 279578
2016-08-23 22:05:55 +00:00
Petr Hosek
46d79cf83a [MC] Support .dc directives in assembler parser
While these directives are mostly aliases for the existing integer
and float value directives, some of them like .dc.a have no direct
equivalents and are sometimes being used for convenience.

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

llvm-svn: 279577
2016-08-23 21:34:53 +00:00
Mehdi Amini
54cea79c7b [ThinLTO] Add caching to the new LTO API
Add the ability to plug a cache on the LTO API.
I tried to write such that a linker implementation can
control the cache backend. This is intrusive and I'm
not totally happy with it, but I can't figure out a
better design right now.

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

llvm-svn: 279576
2016-08-23 21:30:12 +00:00
Sanjay Patel
fd8c14ece2 [InstCombine] move foldICmpShrConstConst() contents to foldICmpShrConst(); NFCI
There will only be 3 lines of code in foldICmpShrConst() when the cleanup is done,
so it doesn't make much sense to have a separate function for a single fold.

llvm-svn: 279575
2016-08-23 21:25:13 +00:00
Philip Reames
4d9558b08e [stackmaps] Extract out magic constants [NFCI]
This is a first step towards clarifying the exact MI semantics of stackmap's "live values".  

llvm-svn: 279574
2016-08-23 21:21:43 +00:00
Matthias Braun
c10c0e4ef4 MachineFunction: Introduce NoPHIs property
I want to compute the SSA property of .mir files automatically in
upcoming patches. The problem with this is that some inputs will be
reported as static single assignment with some passes claiming not to
support SSA form.  In reality though those passes do not support PHI
instructions => Track the presence of PHI instructions separate from the
SSA property.

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

llvm-svn: 279573
2016-08-23 21:19:49 +00:00
Tim Northover
483efa7f04 GlobalISel: add forgotten test-case for G_ICMP
llvm-svn: 279569
2016-08-23 21:11:36 +00:00
Sanjay Patel
f52d2911c1 [InstCombine] remove icmp shr folds that are already handled by InstSimplify
AFAICT, these already worked in all cases for scalar types, and I enhanced
the code to work for vector types in:
https://reviews.llvm.org/rL279543

llvm-svn: 279568
2016-08-23 21:01:35 +00:00
Tim Northover
274ad76abc GlobalISel: make truncate/extend casts uniform
They really should have both types represented, but early variants were created
before MachineInstrs could have multiple types so they're rather ambiguous.

llvm-svn: 279567
2016-08-23 21:01:33 +00:00
Tim Northover
3991ec90ca GlobalISel: legalize integer comparisons on AArch64.
Next step is doing both legalizations at the same time! Marvel at GlobalISel's
cunning.

llvm-svn: 279566
2016-08-23 21:01:26 +00:00
Tim Northover
c3b004b87b GlobalISel: legalize conditional branches on AArch64.
llvm-svn: 279565
2016-08-23 21:01:20 +00:00
Matthias Braun
d483fd6c76 CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses
Re-apply this commit with the deletion of a MachineFunction delegated to
a separate pass to avoid use after free when doing this directly in
AsmPrinter.

This patch removes the MachineFunctionAnalysis. Instead we keep a
map from IR Function to MachineFunction in the MachineModuleInfo.

This allows the insertion of ModulePasses into the codegen pipeline
without breaking it because the MachineFunctionAnalysis gets dropped
before a module pass.

Peak memory should stay unchanged without a ModulePass in the codegen
pipeline: Previously the MachineFunction was freed at the end of a codegen
function pipeline because the MachineFunctionAnalysis was dropped; With
this patch the MachineFunction is freed after the AsmPrinter has
finished.

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

llvm-svn: 279564
2016-08-23 20:58:29 +00:00
David Majnemer
70561a7ec3 [ValueTracking] Use a function_ref to avoid multiple instantiations
No functional change intended, this should just be a code size
improvement.

llvm-svn: 279563
2016-08-23 20:52:00 +00:00
Matthew Simpson
b74ea1ef12 [SLP] Avoid signed integer overflow
The test case included with r279125 exposed an existing signed integer
overflow. Since getTreeCost can return INT_MAX, we can't sum this cost together
with other costs, such as getReductionCost.

This patch removes the possibility of assigning a cost of INT_MAX. Since we
were previously using INT_MAX as an indicator for "should not vectorize", we
now explicitly check this condition with "isTreeTinyAndNotFullyVectorizable"
before computing a cost.

This patch adds a run-line to the test case used for r279125 that ensures we
don't vectorize. Previously, this line would vectorize the test case by chance
due to undefined behavior in the cost calculation.

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

llvm-svn: 279562
2016-08-23 20:48:50 +00:00
Zachary Turner
585b950a97 Remove unused translation unit.
llvm-svn: 279561
2016-08-23 20:08:02 +00:00
Zachary Turner
c9ffc82e08 Update coding standards for include style.
Reviewed By: lattner
Differential Revision: https://reviews.llvm.org/D23591

llvm-svn: 279560
2016-08-23 20:07:32 +00:00
Mehdi Amini
cded57f0f7 [LTO] Fix test following r279550
The output name changed, but it was passing locally
using the old output still present in the build dir.

llvm-svn: 279556
2016-08-23 19:32:41 +00:00
Tim Northover
38c89ee55c GlobalISel: extend legalizer interface to handle multiple types.
Instructions like G_ICMP have multiple types that may need to be legalized (the
boolean output and nearly arbitrary inputs in this case). So the legalizer must
be capable of deciding what to do for each of them separately.

llvm-svn: 279554
2016-08-23 19:30:42 +00:00
Tim Northover
8eff7e11dc GlobalISel: mark pointer casts legal on AArch64.
llvm-svn: 279553
2016-08-23 19:30:38 +00:00
Mehdi Amini
f528ae58f1 [ThinLTO] Add a llvm-lto2 test to check that ODR type uniquing is enabled (NFC)
This adds a test for r279532, thanks David Li for noticing :)

Recommit r279545 after committing first a dependent patch.

llvm-svn: 279551
2016-08-23 18:39:15 +00:00
Mehdi Amini
1a6d8014ee Stop always creating and running an LTO compilation if there is not a single LTO object
Summary:
I assume there was a use case, so maybe this strawman patch will help
clarifying if it is legit.
In any case the current situation is not legit: a ThinLTO compilation
should not trigger an unexpected full LTO compilation.
Right now, adding a --save-temps option triggers this and makes the
number of output differs.

Reviewers: tejohnson

Subscribers: pcc, llvm-commits, mehdi_amini

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

llvm-svn: 279550
2016-08-23 18:39:12 +00:00
Mehdi Amini
e74aa88008 Revert "[ThinLTO] Add a llvm-lto2 test to check that ODR type uniquing is enabled (NFC)"
This reverts commit r279545, test is failing, my Output dir was dirty and making the test pass.

llvm-svn: 279549
2016-08-23 18:25:59 +00:00
Tim Northover
685dd8eded GlobalISel: legalize 1-bit load/store and mark 8/16 bit variants legal on AArch64.
llvm-svn: 279548
2016-08-23 18:20:09 +00:00
Mehdi Amini
3b30fbd4c0 [ThinLTO] Add a llvm-lto2 test to check that ODR type uniquing is enabled (NFC)
This adds a test for r279532, thanks David Li for noticing :)

llvm-svn: 279545
2016-08-23 18:12:55 +00:00
Peter Zotov
40de94a24e [CMake] [OCaml] Add -DLLVM_ENABLE_OCAMLDOC switch
Patch by Michael Gorny.

llvm-svn: 279544
2016-08-23 18:07:16 +00:00
Sanjay Patel
af4e2d5037 [InstSimplify] allow icmp with constant folds for splat vectors, part 2
Completes the m_APInt changes for simplifyICmpWithConstant().

Other commits in this series:
https://reviews.llvm.org/rL279492
https://reviews.llvm.org/rL279530
https://reviews.llvm.org/rL279534
https://reviews.llvm.org/rL279538

llvm-svn: 279543
2016-08-23 18:00:51 +00:00
Xinliang David Li
4ee46b690b Possible fix of test failures on win bots
llvm-svn: 279542
2016-08-23 18:00:41 +00:00
Sanjay Patel
16b202aa5c [InstSimplify] allow icmp with constant folds for splat vectors, part 1
llvm-svn: 279538
2016-08-23 17:30:56 +00:00
Justin Lebar
75ed28e4bb [SelectionDAG] Use a union of bitfield structs for SDNode::SubclassData.
Summary:
This greatly simplifies our handling of SDNode::SubclassData.

NFC, hopefully.  :)

See discussion in D23035 for discussion about the design API of these
bitfields.

Reviewers: chandlerc

Subscribers: llvm-commits, rnk

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

llvm-svn: 279537
2016-08-23 17:18:11 +00:00
Justin Lebar
33d12a9ade [CodeGen] Convert a loop to a for-each loop. NFC
llvm-svn: 279536
2016-08-23 17:18:07 +00:00
Eugene Zelenko
e710ddeef7 Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes.
Differential revision: https://reviews.llvm.org/D23789

llvm-svn: 279535
2016-08-23 17:14:32 +00:00
Sanjay Patel
70839d49c7 [InstSimplify] add tests to show missing vector icmp folds
llvm-svn: 279534
2016-08-23 17:13:38 +00:00
Mehdi Amini
6dfb67d640 [ThinLTO] Make sure the Context used for the ThinLTO backend has all the appropriate options
An important performance setting on the LLVMContext for LTO is
enableDebugTypeODRUniquing(), this adds an automatic merging of
debug information in the context based on type ids.

Also, the lto::Config includes a diagnostic handler that needs to
be set on the Context, as well as the setDiscardValueNames() setting.

llvm-svn: 279532
2016-08-23 16:53:34 +00:00
Sanjay Patel
ea8274b8b0 [InstSimplify] move icmp with constant tests to another file; NFC
...because like the corresponding code, this is just too big to keep adding to.
And the next step is to add a vector version of each of these tests to show
missed folds.

Also, auto-generate CHECK lines and add comments for the tests that correspond to
the source code.

llvm-svn: 279530
2016-08-23 16:46:53 +00:00
Pete Cooper
819dc8b79a Fix some more asserts after r279466.
That commit added a new version of Intrinsic::getName which should only
be called when the intrinsic has no overloaded types.  There are several
debugging paths, such as SDNode::dump which are printing the name of the
intrinsic but don't have the overloaded types.  These paths should be ok
to just print the name instead of crashing.

The fix here is ultimately to just add a 'None' second argument as that
calls the overload capable getName, which is less efficient, but this is a
debugging path anyway, and not perf critical.

Thanks to Björn Pettersson for pointing out that there were more crashes.

llvm-svn: 279528
2016-08-23 16:23:45 +00:00
Simon Pilgrim
90bbe528e6 [X86][SSE] Demonstrate inability to recognise that (v)cvtpd2dq & (v)cvttpd2dq intrinsics implicitly zeroes the upper half of the xmm
llvm-svn: 279527
2016-08-23 16:11:21 +00:00
Krzysztof Parzyszek
e2ff2bde18 [Hexagon] Packetize return value setup with the return instruction
Commit r279241 unintentionally reverted that ability.

llvm-svn: 279526
2016-08-23 16:01:01 +00:00
Xinliang David Li
af8f6ba1d3 Fix windows build failure
llvm-svn: 279525
2016-08-23 16:00:54 +00:00
Duncan P. N. Exon Smith
4e1990f5f1 Rename unittests/ADT/ilistTest.cpp to ilistTestTemp.cpp (temporarily)
I'll rename this to IListTest.cpp after a waiting period (tonight?
tomorrow?), with a full explanation in that commit.

First, I'm moving it aside because Git doesn't play well with case-only
filename changes on case-insensitive file systems (and I suspect the
same is true of SVN).  This two-stage change should help to avoid
spurious failures on bots that don't do clean checkouts.

llvm-svn: 279524
2016-08-23 15:56:50 +00:00
Xinliang David Li
df1f2a779a [Profile] refactor meta data copying/swapping code
Differential Revision: http://reviews.llvm.org/D23619

llvm-svn: 279523
2016-08-23 15:39:03 +00:00
Adrian Prantl
a7c0951c9e Work around PR29097 to get the module bots going again.
This replaces an =default constructor with an explicit definition.

llvm-svn: 279522
2016-08-23 15:38:59 +00:00
Simon Pilgrim
70a88afb5f [X86][AVX] Updated fptosi_2f64_to_4i32 test to show missed opportunity to implicit zero the upper elements
llvm-svn: 279521
2016-08-23 15:10:39 +00:00
Simon Pilgrim
5c1801cc89 [X86][AVX] Add v2i32 fp to int conversion tests
llvm-svn: 279520
2016-08-23 15:00:52 +00:00
Simon Pilgrim
8b9f2e75a2 [X86][AVX] Add AVX2/AVX512 fp to int conversion tests
llvm-svn: 279518
2016-08-23 14:37:35 +00:00
Jacques Pienaar
c6f0b33662 [lanai] Use const instead of constexpr
The windows build bot did not like constexpr.

llvm-svn: 279517
2016-08-23 14:36:53 +00:00
Elliot Colp
5de866bfba Fix SystemZ hang caused by r279105
The change in r279105 causes an infinite loop in some cases, as it sets the upper bits of an AND mask constant, which DAGCombiner::SimplifyDemandedBits then unsets.
This patch reverts that part of the behaviour, instead relying on .td peepholes to perform the transformation to NILL. I reapplied my original fix for the problem addressed by r279105 (unsetting the upper bits, which prevents a compiler abort for a different reason).

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

llvm-svn: 279515
2016-08-23 14:03:02 +00:00
Davide Italiano
7033df4633 [LTOCodeGenerator] Reduce code duplication. NFCI.
llvm-svn: 279514
2016-08-23 12:32:57 +00:00
Simon Pilgrim
f30cc08f80 [X86][SSE] Demonstrate inability to recognise that (v)cvtpd2ps intrinsics implicitly zeroes the upper half of the xmm
llvm-svn: 279511
2016-08-23 11:26:28 +00:00