1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

143478 Commits

Author SHA1 Message Date
Chandler Carruth
409d45fe3e [PM] Tidy up the spacing of this new, much nicer test file.
llvm-svn: 292592
2017-01-20 09:30:03 +00:00
Simon Pilgrim
7f59f5cfb4 [InstCombine][SSE] Add DemandedElts support for PACKSS/PACKUS instructions
Simplify a packss/packus truncation based on the elements of the mask that are actually demanded.

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

llvm-svn: 292591
2017-01-20 09:28:21 +00:00
Chandler Carruth
0e35152dbe [PM] Port LoopSink to the new pass manager.
Like several other loop passes (the vectorizer, etc) this pass doesn't
really fit the model of a loop pass. The critical distinction is that it
isn't intended to be pipelined together with other loop passes. I plan
to add some documentation to the loop pass manager to make this more
clear on that side.

LoopSink is also different because it doesn't really need a lot of the
infrastructure of our loop passes. For example, if there aren't loop
invariant instructions causing a preheader to exist, there is no need to
form a preheader. It also doesn't need LCSSA because this pass is
only involved in sinking invariant instructions from a preheader into
the loop, not reasoning about live-outs.

This allows some nice simplifications to the pass in the new PM where we
can directly walk the loops once without restructuring them.

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

llvm-svn: 292589
2017-01-20 08:42:19 +00:00
Chandler Carruth
c03e24bd57 [LoopSink] Trivial comment cleanup.
llvm-svn: 292588
2017-01-20 08:42:14 +00:00
Diana Picus
c94e029b4a [ARM] Use helpers for adding pred / CC operands. NFC
Hunt down some of the places where we use bare addReg(0) or addImm(AL).addReg(0)
and replace with add(condCodeOp()) and add(predOps()). This should make it
easier to understand what those operands represent (without having to look at
the definition of the instruction that we're adding to).

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

llvm-svn: 292587
2017-01-20 08:15:24 +00:00
Craig Topper
2e09861346 [AVX-512] Fix a couple test cases to not pass an undef mask to gather intrinsic. This could break if any future optimizations taken advantage of the undef.
llvm-svn: 292585
2017-01-20 07:12:30 +00:00
Jonas Paulsson
1b20fe2b09 [TargetLowering] Improve comment for setOperationAction().
Add a sentence that says that the type argument can refer to
either the type of a result, or that of an operand.

Review: Eli Friedman.
llvm-svn: 292584
2017-01-20 06:48:47 +00:00
Daniel Berlin
5b3e6ee286 NewGVN: Fix PR 31682, an overactive assert.
Part of the assert has been left active for further debugging.
The other part has been turned into a stat for tracking for the
moment.

llvm-svn: 292583
2017-01-20 06:38:41 +00:00
Mohammad Shahid
2d7822bf2e [SLP] Add a base test for jumbled store
Change-Id: I905ce08a02c76a6896dcfd9629547417c99adc4a
llvm-svn: 292581
2017-01-20 06:05:33 +00:00
Saleem Abdulrasool
614ff646ba llvm-cxxfilt: add missing includes from previous change
llvm-svn: 292580
2017-01-20 05:33:22 +00:00
Saleem Abdulrasool
10f7c82ab0 llvm-cxxfilt: fix program description
Fix a silly copy-paste error in the tool description.  Take the
opportunity to add crash stack printing which will hopefully never be
needed.

llvm-svn: 292579
2017-01-20 05:27:09 +00:00
Saleem Abdulrasool
896939b0d9 llvm-cxxfilt: support -t to demangle types
By default c++filt demangles functions, though you can optionally pass
`-t` to have it decode types as well, behaving nearly identical to
`__cxa_demangle`.  Add support for this mode.

llvm-svn: 292576
2017-01-20 04:25:26 +00:00
Matthias Braun
d766a0e380 BitVector: Fix undefined behaviour
Calling reset() on an empty BitVector would call memset with a nullptr
argument which is undefined behaviour.

This should fix the sanitizer bot.

llvm-svn: 292575
2017-01-20 04:23:08 +00:00
Matthias Braun
d1da7d4434 Revert "LiveRegUnits: Add accumulateBackward() function"
This seems to be breaking some bots.

This reverts commit r292543.

llvm-svn: 292574
2017-01-20 03:58:42 +00:00
Saleem Abdulrasool
3046da959c Revert "Demangle: only demangle mangled symbols"
This reverts SVN r286795.  This was incorrect the demangler is expected
to be able to demangle types as well as functions.  This makes the
behaviour of itaniumDemangle similar to __cxa_demangle once more.

llvm-svn: 292573
2017-01-20 03:54:04 +00:00
Haicheng Wu
b21ae23526 Revert "Recommit "[InlineCost] Use TTI to check if GEP is free.""
This reverts commit r292570.  The test still has problem.

llvm-svn: 292572
2017-01-20 03:40:41 +00:00
Haicheng Wu
60b7f5f2cf Recommit "[InlineCost] Use TTI to check if GEP is free."
This recommits r292526 which is reverted in r292529 after fixing the test case.

The original summary:

Currently, a GEP is considered free only if its indices are all constant.
TTI::getGEPCost() can give target-specific more accurate analysis. TTI is
already used for the cost of many other instructions.

llvm-svn: 292570
2017-01-20 03:09:11 +00:00
Chandler Carruth
aea315a631 [LoopInfo] Add helper methods to compute two useful orderings of the
loops in a function.

These are relatively confusing to talk about and compute correctly so it
seems really good to write down their implementation in one place. I've
replaced one place we needed this in the loop PM infrastructure and
I have another place in a pending patch that wants it.

We can't quite use this for the core loop PM walk because there we're
sometimes working on a sub-forest.

I'll add the expected unittests before committing this but wanted to
make sure folks were happy with these names / comments.

Credit goes to Richard Smith for the idea for naming the order where siblings
are in reverse program order but the tree traversal remains preorder.

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

llvm-svn: 292569
2017-01-20 02:41:20 +00:00
Greg Parker
8a5271f313 [test] Remove a unwanted match for XFAIL:.
llvm-svn: 292567
2017-01-20 02:01:04 +00:00
Ahmed Bougacha
789c012b69 [AArch64][GlobalISel] Widen scalar int->fp conversions.
It's incorrect to ignore the higher bits of the integer source.
Teach the legalizer how to widen it.

llvm-svn: 292563
2017-01-20 01:37:24 +00:00
Michael Kuperstein
9d0ed4664d [PM] Attempt to pacify windows bots.
Another difference in type pretty-printing, this one windows-specific.

llvm-svn: 292556
2017-01-20 00:47:32 +00:00
Stanislav Mekhanoshin
e89f0cb8a8 [AMDGPU] Prevent spills before exec mask is restored
Inline spiller can decide to move a spill as early as possible in the basic block.
It will skip phis and label, but we also need to make sure it skips instructions
in the basic block prologue which restore exec mask.

Added isPositionLike callback in TargetInstrInfo to detect instructions which
shall be skipped in addition to common phis, labels etc.

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

llvm-svn: 292554
2017-01-20 00:44:31 +00:00
Justin Bogner
3d52a147b9 GlobalISel: Add a note about how we're being a bit loose with memory operands
The logic in r292461 is conservatively correct, but we should revisit
this later. Add a TODO so we don't forget.

llvm-svn: 292553
2017-01-20 00:30:17 +00:00
Ahmed Bougacha
62e7d305d9 [AArch64][GlobalISel] Split FP conversion legalizer tests. NFC.
Big functions with large vreg # are quite unwieldy to update.

Change it to have one function per test (it does increase boilerplate,
but makes the core hopefully more readable and maintanable).

llvm-svn: 292552
2017-01-20 00:30:09 +00:00
Ahmed Bougacha
75c41ff14a [AArch64][GlobalISel] Split legalizer combine tests. NFC.
Big functions with large vreg # are quite unwieldy to update.  This test
also relied on legal s8 operations which we're considering removing.

Change it to have one function per test (it does increase boilerplate,
but makes the core hopefully more readable and maintanable), and use
100% legal operations throughout.

llvm-svn: 292551
2017-01-20 00:30:06 +00:00
Ahmed Bougacha
e845469c16 [MIRParser] Allow generic register specification on operand.
This completes r292321 by adding support for generic registers, e.g.:

  %2:_(s32) = G_ADD %0, %1

llvm-svn: 292550
2017-01-20 00:29:59 +00:00
Kuba Mracek
8d57ff60d8 [lit] Limit parallelism of sanitizer tests on Darwin [llvm part, take 2]
Running lit tests and unit tests of ASan and TSan on macOS has very bad performance when running with a high number of threads. This is caused by xnu (the macOS kernel), which currently doesn't handle mapping and unmapping of sanitizer shadow regions (reserved VM which are several terabytes large) very well. The situation is so bad that increasing the number of threads actually makes the total testing time larger. The macOS buildbots are affected by this. Note that we can't easily limit the number of sanitizer testing threads without affecting the rest of the tests.

This patch adds a special "group" into lit, and limits the number of concurrently running tests in this group. This helps solve the contention problem, while still allowing other tests to run in full, that means running lit with -j8 will still with 8 threads, and parallelism is only limited in sanitizer tests.

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

llvm-svn: 292548
2017-01-20 00:24:32 +00:00
Justin Bogner
131f52471e GlobalISel: Only set FailedISel on dropped dbg intrinsics when using fallback
It's easier to test the non-fallback path if we just drop these
intrinsics for now, like we did before we added the fallback path.
We'll obviously need to fix this properly, but the fixme for that is
already here.

llvm-svn: 292547
2017-01-20 00:24:30 +00:00
Anna Thomas
aaa1cad9b5 [AliasAnalysis] Fences do not modify constant memory location
Summary:
Fence instructions are currently marked as `ModRef` for all memory locations.

We can improve this for constant memory locations (such as constant globals),
since fence instructions cannot modify these locations.

This helps us to forward constant loads across fences (added test case in GVN).
There were no changes in behaviour for similar test cases in early-cse and licm.

Reviewers: dberlin, sanjoy, reames

Subscribers: llvm-commits

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

llvm-svn: 292546
2017-01-20 00:21:33 +00:00
Justin Bogner
33a74d8bdc GlobalISel: Pass the MachineFunction in to reportSelectionError directly
Rather than trying to find MF based on the possibly-null MI we've
passed in here, just pass it in directly. It's already available at
all callers anyway.

llvm-svn: 292544
2017-01-20 00:16:19 +00:00
Matthias Braun
6cfbb846b5 LiveRegUnits: Add accumulateBackward() function
This function can be used to accumulate the set of all read and modified
register in a sequence of instructions.

Use this code in AArch64A57FPLoadBalancing::scavengeRegister() to prove
the concept.

- The AArch64A57LoadBalancing code is using a backwards analysis now
  which is irrespective of kill flags. This is the main motivation for
  this change.

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

llvm-svn: 292543
2017-01-20 00:16:17 +00:00
Matthias Braun
536efc743c CodeGen: Add/Factor out LiveRegUnits class; NFCI
This is a set of register units intended to track register liveness, it
is similar in spirit to LivePhysRegs.
You can also think of this as the liveness tracking parts of the
RegisterScavenger factored out into an own class.

This was proposed in http://llvm.org/PR27609

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

llvm-svn: 292542
2017-01-20 00:16:14 +00:00
Tim Northover
83bd24524f AArch64: fall back to DAG ISel for inline assembly.
We can't currently handle "calls" to inlineasm strings so it's better to let
the DAG handle it than generate rubbish.

llvm-svn: 292540
2017-01-19 23:59:35 +00:00
Zachary Turner
5c91bd0a22 Fix a few more build errors.
llvm-svn: 292538
2017-01-19 23:44:14 +00:00
Zachary Turner
d89d0c7759 Fix incorrectly formed assert statement.
llvm-svn: 292537
2017-01-19 23:41:11 +00:00
Michael Kuperstein
3e925228cc [PM] Make default pipeline test for the new PM strict
Use CHECK-NEXT to verify that a test breaks whenever unexpected passes,
analyses, or invalidations show up in default pipelines. The test case
is constructed so that we don't expect to invalidate anything, and needs
to be kept that way.

The test is slightly less strict than we'd like because of differences
in type pretty-printing.

(Right now it does show some invalidations - all of those are intentional
and temporary.)

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

llvm-svn: 292536
2017-01-19 23:39:28 +00:00
Zachary Turner
ed772167fe [pdb] Add HashTable data structure.
This was being parsed / serialized ad-hoc inside the code
for a specific PDB stream.  But this data structure is used
in multiple ways / places within the PDB format.  To be able
to re-use it we need to raise this code out and make it more
generic.  In doing so, a number of bugs are fixed in the
original implementation, and support is added for growing
the hash table and deleting items from the hash table,
which had either been omitted or incorrect implemented in
the initial version.

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

llvm-svn: 292535
2017-01-19 23:31:24 +00:00
Michael Kuperstein
5857222cad Revert r292530 since it breaks buildbots.
llvm-svn: 292534
2017-01-19 23:22:55 +00:00
Dehao Chen
c38f5a3c5b clang-format SampleProfile.cpp (NFC)
llvm-svn: 292533
2017-01-19 23:20:31 +00:00
Peter Collingbourne
0228e0b628 LTO: Flush the resolution file after writing to it.
Without this the file could be truncated if the linker crashes.

llvm-svn: 292532
2017-01-19 23:10:14 +00:00
Davide Italiano
65f612f852 [SCCP] Teach the pass how to handle div with overdefined operands.
This can prove that:

extern int f;
int g() {
    int x = 0;
    for (int i = 0; i < 365; ++i) {
        x /= f;
    }
    return x;
}

always returns zero. Thanks to Sanjoy for confirming this
transformation actually made sense (bugs are mine).

llvm-svn: 292531
2017-01-19 23:07:51 +00:00
Michael Kuperstein
6986825824 [PM] Make default pipeline test for the new PM strict
Use CHECK-NEXT to verify that a test breaks whenever unexpected passes,
analyses, or invalidations show up in default pipelines. The test case
is constructed so that we don't expect to invalidate anything, and needs
to be kept that way.

(Right now it does show some invalidations - all of those are intentional
and temporary.)

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

llvm-svn: 292530
2017-01-19 22:55:46 +00:00
Haicheng Wu
25c6947c15 Revert "[InlineCost] Use TTI to check if GEP is free."
This reverts commit r292526.  The test case has problem.

llvm-svn: 292529
2017-01-19 22:51:03 +00:00
Simon Pilgrim
fb321451a1 [SelectionDAG] Improve knownbits handling of UMIN/UMAX (PR31293)
This patch improves the knownbits logic for unsigned integer min/max opcodes.

For UMIN we know that the result will have the maximum of the inputs' known leading zero bits in the result, similarly for UMAX the maximum of the inputs' leading one bits.

This is particularly useful for simplifying clamping patterns,. e.g. as SSE doesn't have a uitofp instruction we want to use sitofp instead where possible and for that we need to confirm that the top bit is not set.

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

llvm-svn: 292528
2017-01-19 22:41:22 +00:00
Haicheng Wu
05949d3bbc [InlineCost] Use TTI to check if GEP is free.
Currently, a GEP is considered free only if its indices are all constant.
TTI::getGEPCost() can give target-specific more accurate analysis. TTI is
already used for the cost of many other instructions.

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

llvm-svn: 292526
2017-01-19 22:28:34 +00:00
Stanislav Mekhanoshin
edafc26013 [AMDGPU] Add exec copy to LiveIntervals in SILowerControlFlow::emitElse
This instruction is missing from LiveIntervals.
I'm not aware of any problems because of this though.

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

llvm-svn: 292521
2017-01-19 21:26:22 +00:00
Kostya Serebryany
4b9faecc2b [libFuzzer] ensure that entries in PersistentAutoDictionary are not empty
llvm-svn: 292520
2017-01-19 21:14:47 +00:00
Davide Italiano
746f214ab8 [SCCP] Update comment in visitBinaryOp() after recent changes.
llvm-svn: 292519
2017-01-19 21:07:42 +00:00
Serge Rogatch
1f08944e95 [XRay][Arm] Repair XRay table emission on Arm32 and add tests to identify such problem earlier
Summary:
Emission of XRay table was occasionally disabled for Arm32, but this bug was not then detected because earlier (also by mistake) testing of XRay was occasionally disabled on 32-bit Arm targets. This patch should fix that problem and detect such problems in the future.
This patch is one of a series, see also
- https://reviews.llvm.org/D28623

Reviewers: rengolin, dberris

Reviewed By: dberris

Subscribers: llvm-commits, aemerson, rengolin, dberris, iid_iunknown

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

llvm-svn: 292516
2017-01-19 20:24:23 +00:00
Chad Rosier
a534f6c7be [Assembler] Improve error when unable to evaluate expression.
Add a SMLoc to MCExpr. Most code does not generate or consume the SMLoc (yet).

Patch by Sanne Wouda <sanne.wouda@arm.com>!
Differential Revision: https://reviews.llvm.org/D28861

llvm-svn: 292515
2017-01-19 20:06:32 +00:00