1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
llvm-mirror/lib/Transforms/Scalar
Lawrence Hu 05c92790cf Swap loop invariant GEP with loop variant GEP to allow more LICM.
This patch changes the order of GEPs generated by Splitting GEPs
    pass, specially when one of the GEPs has constant and the base is
    loop invariant, then we will generate the GEP with constant first
    when beneficial, to expose more cases for LICM.

    If originally Splitting GEP generate the following:
      do.body.i:
        %idxprom.i = sext i32 %shr.i to i64
        %2 = bitcast %typeD* %s to i8*
        %3 = shl i64 %idxprom.i, 2
        %uglygep = getelementptr i8, i8* %2, i64 %3
        %uglygep7 = getelementptr i8, i8* %uglygep, i64 1032
      ...
    Now it genereates:
      do.body.i:
        %idxprom.i = sext i32 %shr.i to i64
        %2 = bitcast %typeD* %s to i8*
        %3 = shl i64 %idxprom.i, 2
        %uglygep = getelementptr i8, i8* %2, i64 1032
        %uglygep7 = getelementptr i8, i8* %uglygep, i64 %3
      ...

    For no-loop cases, the original way of generating GEPs seems to
    expose more CSE cases, so we don't change the logic for no-loop
    cases, and only limit our change to the specific case we are
    interested in.

llvm-svn: 248420
2015-09-23 19:25:30 +00:00
..
ADCE.cpp Add GlobalsAA as preserved to a bunch of transforms 2015-09-10 10:22:12 +00:00
AlignmentFromAssumptions.cpp [SCEV] Introduce ScalarEvolution::getOne and getZero. 2015-09-23 01:59:04 +00:00
BDCE.cpp Add GlobalsAA as preserved to a bunch of transforms 2015-09-10 10:22:12 +00:00
CMakeLists.txt Convert SampleProfile pass into a Module pass. 2015-08-25 15:25:11 +00:00
ConstantHoisting.cpp Replace some calls to isa<LandingPadInst> with isEHPad() 2015-08-19 19:54:02 +00:00
ConstantProp.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
CorrelatedValuePropagation.cpp [CorrelatedValuePropagation] Infer nonnull attributes 2015-09-15 17:51:50 +00:00
DCE.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DeadStoreElimination.cpp [DeadStoreElimination] Remove dead zero store to calloc initialized memory 2015-09-23 11:38:44 +00:00
EarlyCSE.cpp Add GlobalsAA as preserved to a bunch of transforms 2015-09-10 10:22:12 +00:00
FlattenCFGPass.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
Float2Int.cpp Prune trailing whitespaces. 2015-09-22 11:19:03 +00:00
GVN.cpp gvn small fix 2015-09-17 20:34:22 +00:00
InductiveRangeCheckElimination.cpp [IRCE] Add INITIALIZE_PASS_DEPENDENCY invocations. 2015-09-09 03:47:18 +00:00
IndVarSimplify.cpp [SCEV] Introduce ScalarEvolution::getOne and getZero. 2015-09-23 01:59:04 +00:00
JumpThreading.cpp Clean up: Refactoring the hardcoded value of 6 for FindAvailableLoadedValue()'s parameter MaxInstsToScan. (Complete version of r247497. See D12886) 2015-09-18 19:14:35 +00:00
LICM.cpp [LICM] Hoist calls to readonly argmemonly functions even with stores in the loop 2015-09-21 22:27:59 +00:00
LLVMBuild.txt Update libdeps in LLVMipo and LLVMScalarOpts, corresponding to r245940. 2015-08-25 17:11:17 +00:00
LoadCombine.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
LoopDeletion.cpp Add GlobalsAA as preserved to a bunch of transforms 2015-09-10 10:22:12 +00:00
LoopDistribute.cpp [LVer] Fix FIXME: hide addPHINodes, NFC 2015-08-20 17:22:29 +00:00
LoopIdiomRecognize.cpp [SCEV] Introduce ScalarEvolution::getOne and getZero. 2015-09-23 01:59:04 +00:00
LoopInstSimplify.cpp [PM] Port ScalarEvolution to the new pass manager. 2015-08-17 02:08:17 +00:00
LoopInterchange.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
LoopRerollPass.cpp [SCEV] Introduce ScalarEvolution::getOne and getZero. 2015-09-23 01:59:04 +00:00
LoopRotation.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
LoopStrengthReduce.cpp Replace some calls to isa<LandingPadInst> with isEHPad() 2015-08-19 19:54:02 +00:00
LoopUnrollPass.cpp [Unroll] Do not crash trying to propagate a value to vector load. 2015-09-22 22:27:12 +00:00
LoopUnswitch.cpp [LoopUnswitch] Require DominatorTree info. 2015-09-22 00:22:47 +00:00
LowerAtomic.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LowerExpectIntrinsic.cpp fix typo; NFC 2015-08-24 20:11:14 +00:00
Makefile
MemCpyOptimizer.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
MergedLoadStoreMotion.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
NaryReassociate.cpp [NaryReassociate] Add support for Mul instructions 2015-09-15 17:22:52 +00:00
PartiallyInlineLibCalls.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
PlaceSafepoints.cpp [PlaceSafepoints] Make the width of a counted loop settable. 2015-09-15 01:42:48 +00:00
Reassociate.cpp Add GlobalsAA as preserved to a bunch of transforms 2015-09-10 10:22:12 +00:00
Reg2Mem.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
RewriteStatepointsForGC.cpp [RewriteStatepointsForGC] Minor refactor to use shared implementation [NFC] 2015-09-10 00:44:10 +00:00
Scalar.cpp [PM] Port SROA to the new pass manager. 2015-09-12 09:09:14 +00:00
Scalarizer.cpp Prevent the scalarizer from caching incorrect entries 2015-08-10 14:48:47 +00:00
ScalarReplAggregates.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
SCCP.cpp Add GlobalsAA as preserved to a bunch of transforms 2015-09-10 10:22:12 +00:00
SeparateConstOffsetFromGEP.cpp Swap loop invariant GEP with loop variant GEP to allow more LICM. 2015-09-23 19:25:30 +00:00
SimplifyCFGPass.cpp Add GlobalsAA as preserved to a bunch of transforms 2015-09-10 10:22:12 +00:00
Sink.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
SpeculativeExecution.cpp [Speculation] NFC: more header comments 2015-05-19 20:52:45 +00:00
SROA.cpp [PM] Port SROA to the new pass manager. 2015-09-12 09:09:14 +00:00
StraightLineStrengthReduce.cpp [SCEV] Introduce ScalarEvolution::getOne and getZero. 2015-09-23 01:59:04 +00:00
StructurizeCFG.cpp Convert a bunch of loops to foreach. NFC. 2015-08-06 20:22:46 +00:00
TailRecursionElimination.cpp Add GlobalsAA as preserved to a bunch of transforms 2015-09-10 10:22:12 +00:00