1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/Transforms/LICM
Sanjoy Das e4e892e8a9 [LICM] Keep metadata on control equivalent hoists
Summary:
If the instruction we're hoisting out of a loop into its preheader is
guaranteed to have executed in the loop, then the metadata associated
with the instruction (e.g. !range or !dereferenceable) is valid in the
preheader.  This is because once we're in the preheader, we know we're
eventually going to reach the location the metadata was valid at.

This change makes LICM smarter around this, and helps it recognize cases
like these:

```
  do {
    int a = *ptr; !range !0
    ...
  } while (i++ < N);
```

to

```
  int a = *ptr; !range !0
  do {
    ...
  } while (i++ < N);
```

Earlier we'd drop the `!range` metadata after hoisting the load from
`ptr`.

Reviewers: igor-laevsky

Subscribers: mcrosier, llvm-commits

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

llvm-svn: 259053
2016-01-28 15:51:58 +00:00
..
2003-02-26-LoopExitNotDominated.ll
2003-02-27-NestedLoopExitBlocks.ll
2003-02-27-PreheaderExitNodeUpdate.ll
2003-02-27-PreheaderProblem.ll
2003-02-27-StoreSinkPHIs.ll
2003-02-28-PromoteDifferentType.ll
2003-05-02-LoadHoist.ll
2003-12-11-SinkingToPHI.ll
2004-09-14-AliasAnalysisInvalidate.ll
2004-11-17-UndefIndexCrash.ll
2006-09-12-DeadUserOfSunkInstr.ll
2007-05-22-VolatileSink.ll
2007-07-30-AliasSet.ll
2007-09-17-PromoteValue.ll
2007-09-24-PromoteNullValue.ll
2007-10-01-PromoteSafeValue.ll
2008-05-20-AliasSetVAArg.ll
2008-07-22-LoadGlobalConstant.ll
2009-12-10-LICM-Indbr-Crash.ll
2011-04-06-HoistMissedASTUpdate.ll
2011-04-06-PromoteResultOfPromotion.ll
2011-04-09-RAUW-AST.ll
2011-07-06-Alignment.ll
2014-09-10-doFinalizationAssert.ll
argmemonly-call.ll [LICM] Hoist calls to readonly argmemonly functions even with stores in the loop 2015-09-21 22:27:59 +00:00
atomics.ll
basictest.ll
constexpr.ll
crash.ll
debug-value.ll
extra-copies.ll
funclet.ll [LICM] Fix a small oversight introduced in r256763 2016-01-04 23:16:22 +00:00
hoist-bitcast-load.ll
hoist-deref-load.ll [LICM] Keep metadata on control equivalent hoists 2016-01-28 15:51:58 +00:00
hoist-invariant-load.ll
hoisting.ll
lcssa-ssa-promoter.ll
no-preheader-test.ll
pr23608.ll
PR19798.ll
PR21582.ll
PR24013.ll
preheader-safe.ll
Preserve-LCSSA.ll
promote-order.ll
scalar_promote.ll
scalar-promote-memmodel.ll
sinking.ll [LICM] Make instruction sinking funclet-aware 2016-01-04 03:37:39 +00:00
speculate.ll
volatile-alias.ll