1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

123083 Commits

Author SHA1 Message Date
Lang Hames
405b433136 [Orc] Remove the 'takeOwnershipOfBuffers' kludge.
Keno Fischer fixed the underlying issue that necessitated this in r236341.

llvm-svn: 251560
2015-10-28 22:10:27 +00:00
Sanjoy Das
5aa51e5247 [SCEV] Compute max backedge count for loops with "shift ivs"
This teaches SCEV to compute //max// backedge taken counts for loops
like

    for (int i = k; i != 0; i >>>= 1)
      whatever();

SCEV yet cannot represent the exact backedge count for these loops, and
this patch does not change that.  This is really geared towards teaching
SCEV that loops like the above are *not* infinite.

llvm-svn: 251558
2015-10-28 21:27:14 +00:00
Sanjoy Das
83c1a62e0a [JumpThreading] Use dominating conditions to prove implications
Summary:
If P branches to Q conditional on C and Q branches to R conditional on
C' and C => C' then the branch conditional on C' can be folded to an
unconditional branch.

Reviewers: reames

Subscribers: llvm-commits

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

llvm-svn: 251557
2015-10-28 21:27:08 +00:00
Lang Hames
f1a1d671ef [Orc] Require target support for host before running execution unit tests.
Orc unit tests that execute code shouldn't run if the compiler doesn't have
target support for the host machine.

llvm-svn: 251551
2015-10-28 20:08:51 +00:00
Hal Finkel
50aaa71507 [PowerPC] Fix CodeGen/PowerPC/crbit-asm.ll test for -O1
Add the crbits processor feature so that the test can be run at -O1, etc.
regardless of the default crbits setting.

Fixes PR23778.

llvm-svn: 251548
2015-10-28 19:58:02 +00:00
Xinliang David Li
a9583eda4e [PGO] RawProf Reader code cleanup
Add a couple of helper methods to make the primary
raw profile reader interface's implementation more
readable. It also hides more format details. This
patch has no functional change.

llvm-svn: 251546
2015-10-28 19:34:04 +00:00
Chris Bieneman
ab633c201f [CMake] Disable adding the test suite as a projects subdirectory
This will never work as an add_subdirectory call, so we should just make sure it doesn't happen. To do this properly we'll need to add it under clang similar to the external compiler-rt.

llvm-svn: 251543
2015-10-28 18:36:56 +00:00
Cong Hou
1c1bef845a [X86] A small fix in X86/X86TargetTransformInfo.cpp: check a value type is simple before calling getSimpleVT().
llvm-svn: 251538
2015-10-28 18:15:46 +00:00
Igor Laevsky
0cafc32245 [AliasAnalysis] Take into account readnone attribute for the function arguments
Differential Revision: http://reviews.llvm.org/D13992

llvm-svn: 251535
2015-10-28 17:54:48 +00:00
JF Bastien
3deb91ecf2 WebAssembly: disable some loop-idiom recognition
memset/memcpy aren't fully supported yet. We should invert this test
once they are supported.

llvm-svn: 251534
2015-10-28 17:50:23 +00:00
Diego Novillo
512c00aec3 SamplePGO - Clear per-function data after applying a profile.
The pass was keeping around a lot of per-function data (visited blocks,
edges, dominance, etc) that is just taking up memory for no reason. In
fact, from function to function it could potentially confuse the
propagator since some maps are indexed by line offsets which can be
common between functions.

llvm-svn: 251531
2015-10-28 17:40:22 +00:00
Igor Laevsky
7085d5bdf2 [AliasAnalysis] Take into account readonly attribute for the function arguments
In getArgModRefInfo we consider all arguments as having MRI_ModRef.
However for arguments marked with readonly attribute we can return 
more precise answer - MRI_Ref.

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

llvm-svn: 251525
2015-10-28 16:42:00 +00:00
Chad Rosier
874ce98d94 Typo.
llvm-svn: 251521
2015-10-28 15:08:33 +00:00
Chad Rosier
e43db3f835 Reapply: [LIR] Add support for creating memsets from loops with a negative stride.
The simple fix is to prevent forming memcpy from loops with a negative stride.

llvm-svn: 251518
2015-10-28 14:38:49 +00:00
James Molloy
b82cf99fec [GlobalOpt] Add newlines to DEBUG messages
I think these were affected by a change way back when to stop printing newlines in Value::dump() by default. This change simply allows the debug output to be readable.

NFC.

llvm-svn: 251517
2015-10-28 14:30:53 +00:00
Artyom Skrobov
312bcfdb97 [ARM] Allow SP in rGPR, starting from ARMv8
Summary:
This patch handles assembly and disassembly, but not codegen, as of yet.

Additionally, it fixes a bug whereby SP and PC as shifted-reg operands
were treated as predictable in ARMv7 Thumb; and it enables the tests
for invalid and unpredictable instructions to run on both ARMv7 and ARMv8.

Reviewers: jmolloy, rengolin

Subscribers: aemerson, rengolin, llvm-commits

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

llvm-svn: 251516
2015-10-28 13:58:36 +00:00
Benjamin Kramer
9b02f9efc7 Put global classes into the appropriate namespace.
Most of the cases belong into an anonymous namespace. No
functionality change intended.

llvm-svn: 251515
2015-10-28 13:54:36 +00:00
Chad Rosier
09a83ae386 Revert "[LIR] Add support for creating memsets from loops with a negative stride."
This reverts commit r251512.  This is causing LNT/chomp to fail.

llvm-svn: 251513
2015-10-28 13:54:09 +00:00
Chad Rosier
de1c0bfef9 [LIR] Add support for creating memsets from loops with a negative stride.
http://reviews.llvm.org/D14125

llvm-svn: 251512
2015-10-28 12:55:34 +00:00
Chad Rosier
b8f49a8510 Add newline to test. NFC.
llvm-svn: 251511
2015-10-28 12:30:08 +00:00
Hrvoje Varga
8d920d687c [mips][microMIPS] Implement PAUSE, RDHWR, RDPGPR, SDBBP, SSNOP, SYNC, SYNCI and WAIT instructions
Differential Revision: http://reviews.llvm.org/D12628

llvm-svn: 251510
2015-10-28 11:04:29 +00:00
Vasileios Kalintiris
147810b739 [Orc] Remove unnecessary semicolon. NFC.
llvm-svn: 251509
2015-10-28 11:02:01 +00:00
James Molloy
a250ff5130 [GlobalsAA] An indirect global that is initialized is not fair game
When checking if an indirect global (a global with pointer type) is only assigned by allocation functions, first check if the global is itself initialized. If it is, it's not only assigned by allocation functions.

This fixes PR25309. Thanks to David Majnemer for reducing the test case!

llvm-svn: 251508
2015-10-28 10:41:29 +00:00
NAKAMURA Takumi
eb14899f9b OrcJITTests: Prune unused libdeps.
llvm-svn: 251506
2015-10-28 09:59:50 +00:00
NAKAMURA Takumi
f7d022a78f OrcJITTests: Update libdeps.
llvm-svn: 251504
2015-10-28 09:37:09 +00:00
Craig Topper
f193656e65 [X86] Make some for loops over MVTs more explicit (and shorter) by just mentioning all the relevant types in an initializer list. NFC
llvm-svn: 251500
2015-10-28 05:48:32 +00:00
Chen Li
552163ae71 Revert r251492 "[IndVarSimplify] Rewrite loop exit values with their
initial values from loop preheader", because it broke some bots.

llvm-svn: 251498
2015-10-28 05:15:51 +00:00
Craig Topper
5a82c57a8f Fix a -Wpessimizing-move warning.
llvm-svn: 251495
2015-10-28 04:54:46 +00:00
Craig Topper
60ec421ca5 Use range-based for loops and use initializer list to remove a small static array. NFC
llvm-svn: 251494
2015-10-28 04:53:27 +00:00
Chen Li
f5f6088676 [IndVarSimplify] Rewrite loop exit values with their initial values from loop preheader
Summary:
This patch adds support to check if a loop has loop invariant conditions which lead to loop exits. If so, we know that if the exit path is taken, it is at the first loop iteration. If there is an induction variable used in that exit path whose value has not been updated, it will keep its initial value passing from loop preheader. We can therefore rewrite the exit value with
its initial value. This will help remove phis created by LCSSA and enable other optimizations like loop unswitch.


Reviewers: sanjoy

Subscribers: llvm-commits

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

llvm-svn: 251492
2015-10-28 04:45:47 +00:00
Xinliang David Li
11ef670637 [PGO] Indexed Prof Reader refactoring (NFC)
Change InstrProfReaderIndex from typedef into a wrapper
class with helper methods. This makes the index profile
reader code more readable. It also hides the implementation 
detail of the index format and make it more flexible to allow 
support different (or more than one) format in the future.

llvm-svn: 251491
2015-10-28 04:20:31 +00:00
Craig Topper
7fa00ae045 Remove templates from CostTableLookup functions. All instantiations had the same type.
This also lets us remove the versions of the functions that took a statically sized array as we can rely on ArrayRef implicit conversion now.

llvm-svn: 251490
2015-10-28 04:02:12 +00:00
Hal Finkel
91f52b0e31 [PowerPC] Replace cntlz[.] with cntlzw[.]
cntlz is the old POWER mnemonic. cntlzw is the PowerPC mnemonic.

This change fixes an issue when -no-integrated-as: The opcode cntlz is
unrecognized by gas

Alias the POWER mnemonic cntlz[.] to the PowerPC mnemonic cntlzw[.]
This is done for because the POWER cntlz mnemonic has be used by LLVM for
a very long time. We need to make sure that assembly programs
that are using the cntlz[.] do not break with this change.

Change PowerPC tests to reflect the insn change from cntlz to cntlzw.
Add assembly test to verify cntlz[.] is encoded correctly.

Patch by Tom Rix!

llvm-svn: 251489
2015-10-28 03:26:45 +00:00
Sanjoy Das
43a55dd2a9 [ValueTracking] Expose implies via ValueTracking, NFC
Summary: This will allow a later patch to `JumpThreading` use this functionality.

Reviewers: reames

Subscribers: llvm-commits

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

llvm-svn: 251488
2015-10-28 03:20:19 +00:00
Sanjoy Das
2819145e6a [ValueTracking] Use !range metadata more aggressively in KnownBits
Summary:
Teach `computeKnownBitsFromRangeMetadata` to use `!range` metadata more
aggressively.

Reviewers: majnemer, nlewycky, jingyue

Subscribers: llvm-commits

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

llvm-svn: 251487
2015-10-28 03:20:15 +00:00
Sanjoy Das
bc8769d943 [SelectionDAG] Don't inspect !range metadata for extended loads
Summary:
Don't call `computeKnownBitsFromRangeMetadata` for extended loads --
this can cause a mismatch between the width of the !range metadata and
the width of the APInt's accumulating `KnownZero` (and `KnownOne` in the
future).  This isn't a problem now, but will be after a future change.

Note: this can be made more aggressive in the future.

Reviewers: nlewycky

Subscribers: llvm-commits

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

llvm-svn: 251486
2015-10-28 03:20:10 +00:00
Sanjoy Das
bb484e2b4d [GVN] Make a test case more robust
The singleton !range metadata gets simplified more aggressively after a
later change, so change the !range metadata to contain more than one
element.

While at it, turn some `; CHECK` s to `; CHECK-LABEL:` s.

llvm-svn: 251485
2015-10-28 03:20:05 +00:00
Lang Hames
b30e948a5f [Orc] Disable Orc C API unit tests on non-Darwin while I investigate more
builder failures.

llvm-svn: 251484
2015-10-28 03:12:51 +00:00
Lang Hames
17ab368657 [Orc] Re-add C bindings for the Orc APIs, with a fix to remove the union that
was causing builder failures.

The bindings were originally added in r251472, and reverted in r251473 due to
the builder failures.

llvm-svn: 251482
2015-10-28 02:40:04 +00:00
Matthias Braun
0ae2b702f7 lit/TestRunner.py: Factor variable subsitution into an own function; NFCI
This is a clearer separation of concerns and makes it easier to reuse
the function.

llvm-svn: 251481
2015-10-28 02:36:45 +00:00
Matthias Braun
0dfea7241c lit/TestRunner.py: Factor out Substitution construction; NFC
This is a clearer separation of concerns and makes it easier to reuse
the functions.

llvm-svn: 251480
2015-10-28 02:36:42 +00:00
Matthias Braun
9f4c72c6f5 lit/TestRunner.py: Get execdir from test.getExecPath() instead of passing it around; NFC
llvm-svn: 251479
2015-10-28 02:36:38 +00:00
Matthias Braun
d9b899525f lit/TestRunner.py: Make parseIntegratedTestScriptCommands() keyword list a parameter; NFC
This allows the function to be easily reused and also simplifies the
code as the keyword list is next to the keyword handling now.

llvm-svn: 251478
2015-10-28 02:36:35 +00:00
Lang Hames
3c4da45364 [Orc] Revert the C bindngs commit, r251472, while I debug some builder failures.
llvm-svn: 251473
2015-10-28 01:03:09 +00:00
Lang Hames
ec967600c9 [Orc] Add experimental C bindings for Orc.
llvm-svn: 251472
2015-10-28 00:28:26 +00:00
Dylan McKay
a635879725 Add myself as the the code owner for the AVR backend
Summary:
As I maintain the AVR backend and am currently in the process of migrating it in tree, it makes sense to add myself as the code owner.

Thoughts welcome!

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

llvm-svn: 251471
2015-10-28 00:24:54 +00:00
James Y Knight
1bc277004d Make the SelectionDAG graph printer use SDNode::PersistentId labels.
r248010 changed the -debug output to use short ids, but did not
similarly modify the graph printer. Change to be consistent, for ease of
cross-reference.

llvm-svn: 251465
2015-10-27 23:09:03 +00:00
Peter Collingbourne
b569856ee4 Bitcode: Fix more unsigned integer overflow bugs.
llvm-svn: 251464
2015-10-27 23:01:25 +00:00
David Majnemer
067f270fea [SimplifyCFG] Don't DCE catchret because the successor is unreachable
CatchReturnInst has side-effects: it runs a destructor.  This destructor
could conceivably run forever/call exit/etc. and should not be removed.

llvm-svn: 251461
2015-10-27 22:43:56 +00:00
Vedant Kumar
8c1de765fa [Bitcode] Fix accidental syntax errors in compatibility tests
We used automated tools to update our IR to its current syntax in commit
21f77df7(r247378). While it correctly updated the CHECK lines in our
compatibility tests, the IR should have remained untouched.  This commit
fixes the syntax errors.

llvm-svn: 251458
2015-10-27 22:10:17 +00:00