1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
llvm-mirror/test/Analysis/ScalarEvolution
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
..
2007-07-15-NegativeStride.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
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 [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
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 [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2008-11-18-Stride1.ll
2008-11-18-Stride2.ll
2008-12-08-FiniteSGE.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2008-12-11-SMaxOverflow.ll
2008-12-14-StrideAndSigned.ll
2008-12-15-DontUseSDiv.ll
2009-01-02-SignedNegativeStride.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
2009-04-22-TruncCast.ll
2009-05-09-PointerEdgeCount.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
2009-07-04-GroupConstantsWidthMismatch.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
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 [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
2012-05-18-LoopPredRecurse.ll
2012-05-29-MulAddRec.ll
and-xor.ll
avoid-infinite-recursion-0.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
avoid-infinite-recursion-1.ll
avoid-smax-0.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
avoid-smax-1.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
div-overflow.ll
do-loop.ll
ext-antecedent.ll [SCEV] Revert bailout added in r75511. 2015-03-26 17:28:26 +00:00
flags-from-poison.ll [SCEV] Apply NSW and NUW flags via poison value analysis 2015-07-28 18:22:40 +00:00
fold.ll When simplifying a SCEV truncate by distributing, consider it a simplification to replace a cast, even if we end up with a trunc around the term. Fixes PR22960! 2015-03-20 02:25:00 +00:00
how-far-to-zero.ll
incorrect-nsw.ll Bugfix: SCEV incorrectly marks certain add recurrences as nsw 2015-02-09 18:34:55 +00:00
infer-prestart-no-wrap.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
infer-via-ranges.ll [SCEV] Make isImpliedCond smarter. 2015-03-18 00:41:29 +00:00
latch-dominating-conditions.ll [SCEV] Look at backedge dominating conditions (re-land r233447). 2015-04-01 18:24:06 +00:00
load-with-range-metadata.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
load.ll [SCEV] Add a `scalar-evolution-print-constant-ranges' option 2015-03-09 21:43:39 +00:00
max-trip-count-address-space.ll [SCEV] Add a `scalar-evolution-print-constant-ranges' option 2015-03-09 21:43:39 +00:00
max-trip-count.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
min-max-exprs.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
nowrap-preinc-limits.ll [SCEV] make SCEV smarter about proving no-wrap. 2015-03-04 22:24:17 +00:00
nsw-offset-assume.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
nsw-offset.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
nsw.ll [SCEV] Add a `scalar-evolution-print-constant-ranges' option 2015-03-09 21:43:39 +00:00
nw-sub-is-not-nw-add.ll Make ScalarEvolution less aggressive with respect to no-wrap flags. 2015-01-22 00:48:47 +00:00
pointer-sign-bits.ll
pr3909.ll
pr22179.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
pr22641.ll Fix bug 22641 2015-02-24 01:02:42 +00:00
pr22674.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
pr22856.ll [SCEV] Fix PR22856. 2015-03-13 18:31:19 +00:00
range-signedness.ll [SCEV] Unify getUnsignedRange and getSignedRange 2015-03-09 21:43:43 +00:00
scev-aa.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
scev-expander-incorrect-nowrap.ll Bugfix: SCEVExpander incorrectly marks increment operations as no-wrap 2015-02-25 20:02:59 +00:00
scev-invalid.ll
scev-prestart-nowrap.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
sext-inreg.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
sext-iv-0.ll [SCEV] Add a `scalar-evolution-print-constant-ranges' option 2015-03-09 21:43:39 +00:00
sext-iv-1.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
sext-iv-2.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
sle.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
smax.ll
SolveQuadraticEquation.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
trip-count2.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
trip-count3.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
trip-count4.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
trip-count5.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
trip-count6.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
trip-count7.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
trip-count8.ll
trip-count9.ll
trip-count10.ll
trip-count11.ll [SCEV] Add a `scalar-evolution-print-constant-ranges' option 2015-03-09 21:43:39 +00:00
trip-count12.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
trip-count-pow2.ll ScalarEvolution: HowFarToZero was wrongly using signed division 2014-11-16 07:30:35 +00:00
trip-count-switch.ll
trip-count.ll When forming an addrec out of a phi don't just look at the last computation and steal its flags for our own, there may be other computations in the middle. Check whether the LHS of the computation is the phi itself and then we know it's safe to steal the flags. Fixes PR22795. 2015-03-13 01:37:52 +00:00
undefined.ll
unreachable-code.ll
unsimplified-loop.ll
zext-signed-addrec.ll [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
zext-wrap.ll [SCEV] Add a `scalar-evolution-print-constant-ranges' option 2015-03-09 21:43:39 +00:00