1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
llvm-mirror/test/Transforms
Jingyue Wu a6a8a2d2b1 [SCEV] Apply NSW and NUW flags via poison value analysis
Summary:
Make Scalar Evolution able to propagate NSW and NUW flags from instructions to SCEVs in some cases. This is based on reasoning about when poison from instructions with these flags would trigger undefined behavior. This gives a 13% speed-up on some Eigen3-based Google-internal microbenchmarks for NVPTX.

There does not seem to be clear agreement about when poison should be considered to propagate through instructions. In this analysis, poison propagates only in cases where that should be uncontroversial.

This change makes LSR able to create induction variables for expressions like &ptr[i + offset] for loops like this:

  for (int i = 0; i < limit; ++i) {
    sum += ptr[i + offset];
  }

Here ptr is a 64 bit pointer and offset is a 32 bit integer. For NVPTX, LSR currently creates an induction variable for i + offset instead, which is not as fast. Improving this situation is what brings the 13% speed-up on some Eigen3-based Google-internal microbenchmarks for NVPTX.


There are more details in this discussion on llvmdev.
June: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-June/thread.html#87234
July: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-July/thread.html#87392

Patch by Bjarke Roune

Reviewers: eliben, atrick, sanjoy

Subscribers: majnemer, hfinkel, jingyue, meheff, llvm-commits

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

llvm-svn: 243460
2015-07-28 18:22:40 +00:00
..
ADCE Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
AddDiscriminators IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
AlignmentFromAssumptions [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
ArgumentPromotion Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
AtomicExpand/ARM Use target-dependent emitLeading/TrailingFence instead of the target-independent insertLeading/TrailingFence (in AtomicExpandPass) 2014-09-03 21:01:03 +00:00
BBVectorize Changed renaming of local symbols by inserting a dot vefore the numeric suffix. 2015-05-12 16:47:30 +00:00
BDCE Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
BranchFolding FileCheck'ify some wc/grep based tests; NFCI. 2015-07-28 03:50:09 +00:00
CodeExtractor Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
CodeGenPrepare AMDGPU: Fix some places missed in rename 2015-06-19 17:39:03 +00:00
ConstantHoisting [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
ConstantMerge [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
ConstProp Fix assert when inlining a constantexpr addrspacecast 2015-07-27 18:31:03 +00:00
CorrelatedValuePropagation [CVP] Don't assume Constants of type i1 can be known to be true or false 2015-06-06 04:56:51 +00:00
DeadArgElim DI/Verifier: Fix argument bitrot in DILocalVariable 2015-07-24 23:59:25 +00:00
DeadStoreElimination IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
EarlyCSE Correct a mistaken comment from 238071 [NFC] 2015-05-23 00:05:43 +00:00
EliminateAvailableExternally Don't change the visibility when converting a definition to a declaration. 2015-07-13 14:18:22 +00:00
Float2Int Reapply r233175 and r233183: float2int. 2015-03-27 10:36:57 +00:00
FunctionAttrs Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
GCOVProfiling IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
GlobalDCE [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
GlobalOpt Implement target independent TLS compatible with glibc's emutls.c. 2015-07-28 16:24:05 +00:00
GVN GVN: tolerate an instruction being replaced without existing in the leaderboard 2015-07-14 21:03:18 +00:00
IndVarSimplify FileCheck'ify some wc/grep based tests; NFCI. 2015-07-28 03:50:09 +00:00
Inline Fix assert when inlining a constantexpr addrspacecast 2015-07-27 18:31:03 +00:00
InstCombine [InstCombine][X86][SSE] Replace sign/zero extension intrinsics with native IR 2015-07-27 18:52:15 +00:00
InstMerge [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
InstSimplify [InstSimplify] Teach InstSimplify how to simplify extractelement 2015-07-13 01:15:53 +00:00
Internalize Internalize: internalize comdat members as a group, and drop comdat on such members. 2015-07-16 17:42:21 +00:00
IPConstantProp Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
IRCE [IRCE] Fix a regression introduced in r232444. 2015-03-24 19:29:18 +00:00
JumpThreading Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
LCSSA Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
LICM [LICM] Don't try to sink values out of loops without any exits 2015-07-12 03:53:05 +00:00
LoadCombine [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LoopDeletion [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LoopDistribute [LAA] Merge memchecks for accesses separated by a constant offset 2015-07-08 09:16:33 +00:00
LoopIdiom Remove unnecessary lines from the test in r242068. 2015-07-13 21:50:35 +00:00
LoopInterchange Add support to interchange loops with reductions. 2015-04-23 04:51:44 +00:00
LoopReroll Handle loop with negtive induction variable increment 2015-07-24 22:01:49 +00:00
LoopRotate DI/Verifier: Fix argument bitrot in DILocalVariable 2015-07-24 23:59:25 +00:00
LoopSimplify [LoopSimplify] Set proper debug location in loop backedge blocks. 2015-06-29 21:30:14 +00:00
LoopStrengthReduce [SCEV] Apply NSW and NUW flags via poison value analysis 2015-07-28 18:22:40 +00:00
LoopUnroll Roll forward r243250 2015-07-26 19:10:03 +00:00
LoopUnswitch [LoopUnswitch] Improve loop unswitch pass to find trivial unswitch conditions more effectively 2015-07-25 03:21:06 +00:00
LoopVectorize The tests added in r243270 require asserts to be enabled 2015-07-27 15:22:49 +00:00
LowerAtomic [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LowerBitSets LowerBitSets: Ignore bitset entries that do not directly refer to a global. 2015-06-27 00:17:51 +00:00
LowerExpectIntrinsic [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
LowerInvoke Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
LowerSwitch Changed renaming of local symbols by inserting a dot vefore the numeric suffix. 2015-05-12 16:47:30 +00:00
Mem2Reg DI/Verifier: Fix argument bitrot in DILocalVariable 2015-07-24 23:59:25 +00:00
MemCpyOpt [MemCpyOpt] Do move the memset, but look at its dest's dependencies. 2015-05-21 01:43:39 +00:00
MergeFunc MergeFunc: Transfer the callee's attributes when replacing a direct caller 2015-07-21 17:07:07 +00:00
MetaRenamer [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
NaryReassociate [NaryReassociate] enhances nsw by leveraging @llvm.assume 2015-07-01 03:38:49 +00:00
ObjCARC Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
PartiallyInlineLibCalls
PhaseOrdering Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
PlaceSafepoints Rename llvm.frameescape and llvm.framerecover to localescape and localrecover 2015-07-07 22:25:32 +00:00
PruneEH [PruneEH] A naked, noinline function can return via InlineAsm 2015-06-27 07:52:53 +00:00
Reassociate [Reassociate] Don't propogate flags when creating negations 2015-06-24 21:27:36 +00:00
Reg2Mem Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
RewriteStatepointsForGC [RewriteStatepointsForGC] Adjust naming scheme to be more stable 2015-07-24 19:01:39 +00:00
SafeStack SafeStack: Create the unsafe stack pointer on demand. 2015-06-22 20:26:54 +00:00
SampleProfile Add function entry counts from sample profiles. 2015-05-13 17:04:29 +00:00
Scalarizer [Scalarizer] Fix potential for stale data in Scattered across invocations 2015-07-23 20:53:46 +00:00
ScalarRepl Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
SCCP [ConstantFolding] Support folding loads from a GlobalAlias 2015-07-22 22:29:30 +00:00
SeparateConstOffsetFromGEP AMDGPU: Fix some places missed in rename 2015-06-19 17:39:03 +00:00
SimplifyCFG AMDGPU: Fix some places missed in rename 2015-06-19 17:39:03 +00:00
Sink Teach the IR Sink pass to (conservatively) respect convergent annotations. 2015-06-01 17:20:31 +00:00
SLPVectorizer [SLPVectorizer] Try different vectorization factors for store chains 2015-07-08 23:40:55 +00:00
SpeculativeExecution Add a speculative execution pass 2015-05-15 17:54:48 +00:00
SROA [SROA] Fix a nasty pile of bugs to do with big-endian, different alloca 2015-07-22 03:32:42 +00:00
StraightLineStrengthReduce [NVPTX] enable SpeculativeExecution in NVPTX 2015-07-16 20:13:48 +00:00
StripSymbols DI/Verifier: Fix argument bitrot in DILocalVariable 2015-07-24 23:59:25 +00:00
StructurizeCFG [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
TailCallElim TRE: Just erase dead BBs and tweak the iteration loop not to increment the deleted BB iterator. 2015-02-28 16:47:27 +00:00
TailDup [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Util Changed renaming of local symbols by inserting a dot vefore the numeric suffix. 2015-05-12 16:47:30 +00:00