1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
llvm-mirror/test/Analysis/ScalarEvolution
Li Huang 6f568d5434 [SCEV] Memoize visitMulExpr results in SCEVRewriteVisitor.
Summary:
When SCEVRewriteVisitor traverses the SCEV DAG, it may visit the same SCEV
multiple times if this SCEV is referenced by multiple other SCEVs. This has
exponential time complexity in the worst case. Memoizing the results will
avoid re-visiting the same SCEV. Add a map to save the results, and override
the visit function of SCEVVisitor. Now SCEVRewriteVisitor only visit each
SCEV once and thus returns the same result for the same input SCEV.

This patch fixes PR18606, PR18607.

Reviewers: Sanjoy Das, Mehdi Amini, Michael Zolotukhin

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

llvm-svn: 284868
2016-10-21 20:05:21 +00:00
..
2007-07-15-NegativeStride.ll
2007-08-06-MisinterpretBranch.ll
2007-08-06-Unsigned.ll
2007-09-27-LargeStepping.ll
2007-11-14-SignedAddRec.ll
2007-11-18-OrInstruction.ll
2008-02-11-ReversedCondition.ll
2008-02-12-SMAXTripCount.ll
2008-02-15-UMax.ll
2008-05-25-NegativeStepToZero.ll
2008-06-12-BinomialInt64.ll
2008-07-12-UnneededSelect1.ll
2008-07-12-UnneededSelect2.ll
2008-07-19-InfiniteLoop.ll
2008-07-19-WrappingIV.ll
2008-07-29-SGTTripCount.ll
2008-07-29-SMinExpr.ll
2008-08-04-IVOverflow.ll
2008-08-04-LongAddRec.ll
2008-11-02-QuadraticCrash.ll
2008-11-15-CubicOOM.ll
2008-11-18-LessThanOrEqual.ll
2008-11-18-Stride1.ll
2008-11-18-Stride2.ll
2008-12-08-FiniteSGE.ll
2008-12-11-SMaxOverflow.ll
2008-12-14-StrideAndSigned.ll
2008-12-15-DontUseSDiv.ll
2009-01-02-SignedNegativeStride.ll
2009-04-22-TruncCast.ll
2009-05-09-PointerEdgeCount.ll
2009-07-04-GroupConstantsWidthMismatch.ll
2010-09-03-RequiredTransitive.ll
2011-03-09-ExactNoMaxBECount.ll
2011-04-26-FoldAddRec.ll
2011-10-04-ConstEvolve.ll
2012-03-26-LoadConstant.ll
2012-05-18-LoopPredRecurse.ll
2012-05-29-MulAddRec.ll
and-xor.ll
avoid-assume-hang.ll
avoid-infinite-recursion-0.ll
avoid-infinite-recursion-1.ll
avoid-smax-0.ll
avoid-smax-1.ll
constant_condition.ll
div-overflow.ll
do-loop.ll
exhaustive-trip-counts.ll
expander-replace-congruent-ivs.ll
ext-antecedent.ll
flags-from-poison-dbg.ll
flags-from-poison.ll SCEV: Don't assert about non-SCEV-able value in isSCEVExprNeverPoison() (PR28932) 2016-08-17 22:50:18 +00:00
fold.ll
guards.ll
how-far-to-zero.ll
incorrect-nsw.ll
incorrect-offset-scaling.ll Fix ScalarEvolutionExpander step scaling bug 2016-07-13 01:28:12 +00:00
increasing-or-decreasing-iv.ll
infer-prestart-no-wrap.ll
infer-via-ranges.ll
latch-dominating-conditions.ll
load-with-range-metadata.ll
load.ll
max-mulops-inline.ll [SCEV] Add a threshold to restrict number of mul operands to be inlined into SCEV 2016-10-20 21:38:39 +00:00
max-trip-count-address-space.ll
max-trip-count.ll
min-max-exprs.ll
no-wrap-add-exprs.ll
no-wrap-unknown-becount.ll [SCEV] Make isImpliedCondOperandsViaRanges smarter 2016-07-23 00:54:36 +00:00
non-IV-phi.ll
nowrap-preinc-limits.ll
nsw-offset-assume.ll
nsw-offset.ll
nsw.ll
nw-sub-is-not-nw-add.ll
overflow-intrinsics.ll
pointer-sign-bits.ll
pr3909.ll
pr18606.ll [SCEV] Memoize visitMulExpr results in SCEVRewriteVisitor. 2016-10-21 20:05:21 +00:00
pr22179.ll
pr22641.ll
pr22674.ll
pr22856.ll
pr24757.ll
pr25369.ll
pr27315.ll
pr28705.ll Fix the runtime error caused by "Use ValueOffsetPair to enhance value reuse during SCEV expansion". 2016-08-09 20:40:03 +00:00
predicated-trip-count.ll
range-signedness.ll
returned.ll
scev-aa.ll
scev-canonical-mode.ll
scev-dispositions.ll
scev-expander-existing-value-offset.ll Recommit "Use ValueOffsetPair to enhance value reuse during SCEV expansion". 2016-08-09 20:37:50 +00:00
scev-expander-incorrect-nowrap.ll
scev-expander-reuse-gep.ll Create a getelementptr instead of sub expr for ValueOffsetPair if the 2016-09-14 04:39:50 +00:00
scev-expander-reuse-unroll.ll [UNROLL] Postpone ScalarEvolution::forgetLoop after TripCountSC is expanded 2016-08-25 16:17:18 +00:00
scev-expander-reuse-vect.ll [UNROLL] Postpone ScalarEvolution::forgetLoop after TripCountSC is expanded 2016-08-25 16:17:18 +00:00
scev-invalid.ll
scev-prestart-nowrap.ll
sext-inreg.ll [SCEV] Un-grep'ify tests; NFC 2016-08-05 20:33:49 +00:00
sext-iv-0.ll
sext-iv-1.ll
sext-iv-2.ll
sext-to-zext.ll
shift-op.ll
sle.ll
smax-br-phi-idioms.ll [SCEV] Don't infinitely recurse on unreachable code 2016-08-05 18:34:14 +00:00
smax.ll
SolveQuadraticEquation.ll
trip-count2.ll
trip-count3.ll
trip-count4.ll
trip-count5.ll [SCEV] Un-grep'ify tests; NFC 2016-08-05 20:33:49 +00:00
trip-count6.ll
trip-count7.ll
trip-count8.ll
trip-count9.ll
trip-count10.ll
trip-count11.ll
trip-count12.ll
trip-count13.ll [LoopUnroll] Keep the loop test only on the first iteration of max-or-zero loops 2016-10-21 11:08:48 +00:00
trip-count14.ll [LoopUnroll] Keep the loop test only on the first iteration of max-or-zero loops 2016-10-21 11:08:48 +00:00
trip-count-pow2.ll
trip-count-switch.ll
trip-count-unknown-stride.ll Reapplying r278731 after fixing the problem that caused it to be reverted. 2016-09-16 14:38:13 +00:00
trip-count.ll
undefined.ll
unreachable-code.ll
unsimplified-loop.ll
zext-signed-addrec.ll
zext-wrap.ll