llvm-6502/test/Transforms/GVN
Philip Reames 8a5ad05c13 Pass QueryInst down through non-local dependency calculation
This change is mostly motivated by exposing information about the original query instruction to the actual scanning work in getPointerDependencyFrom when used by GVN PRE. In a follow up change, I will use this to be more precise with regards to the semantics of volatile instructions encountered in the scan of a basic block.

Worth noting, is that this change (despite appearing quite simple) is not semantically preserving. By providing more information to the helper routine, we allow some optimizations to kick in that weren't previously able to (when called from this code path.) In particular, we see that treatment of !invariant.load becomes more precise. In theory, we might see a difference with an ordered/atomic instruction as well, but I'm having a hard time actually finding a test case which shows that.

Test wise, I've included new tests for !invariant.load which illustrate this difference. I've also included some updated TBAA tests which highlight that this change isn't needed for that optimization to kick in - it's handled inside alias analysis itself. 

Eventually, it would be nice to factor the !invariant.load handling inside alias analysis as well.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227110 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 18:39:52 +00:00
..
2007-07-25-DominatedLoop.ll
2007-07-25-InfiniteLoop.ll
2007-07-25-Loop.ll
2007-07-25-NestedLoop.ll
2007-07-25-SinglePredecessor.ll
2007-07-26-InterlockingLoops.ll Fix PR17952. 2013-11-11 22:00:23 +00:00
2007-07-26-NonRedundant.ll
2007-07-26-PhiErasure.ll
2007-07-30-PredIDom.ll
2007-07-31-NoDomInherit.ll
2007-07-31-RedundantPhi.ll
2008-02-12-UndefLoad.ll
2008-02-13-NewPHI.ll
2008-07-02-Unreachable.ll Fix PR17952. 2013-11-11 22:00:23 +00:00
2008-12-09-SelfRemove.ll
2008-12-12-RLE-Crash.ll
2008-12-14-rle-reanalyze.ll
2008-12-15-CacheVisited.ll
2009-01-21-SortInvalidation.ll
2009-01-22-SortInvalidation.ll
2009-02-17-LoadPRECrash.ll
2009-03-10-PREOnVoid.ll Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
2009-06-17-InvalidPRE.ll
2009-07-13-MemDepSortFail.ll
2009-11-12-MemDepMallocBitCast.ll
2010-03-31-RedundantPHIs.ll
2010-05-08-OneBit.ll
2010-11-13-Simplify.ll
2011-04-27-phioperands.ll
2011-06-01-NonLocalMemdepMiscompile.ll Use variable for register name in test 2013-11-10 00:57:17 +00:00
2011-07-07-MatchIntrinsicExtract.ll
2011-09-07-TypeIdFor.ll
2012-05-22-PreCrash.ll
atomic.ll Relax the constraint more in MemoryDependencyAnalysis.cpp 2014-08-29 20:32:58 +00:00
basic.ll
bitcast-of-call.ll
calloc-load-removal.ll GVN: Enable value forwarding for calloc 2014-06-12 21:16:19 +00:00
calls-nonlocal.ll
calls-readonly.ll
commute.ll
cond_br2.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
cond_br.ll Fix PR17952. 2013-11-11 22:00:23 +00:00
condprop.ll GVN: propagate equalities for floating point compares 2015-01-12 19:29:48 +00:00
crash-no-aa.ll
crash.ll
edge.ll GVN: propagate equalities for floating point compares 2015-01-12 19:29:48 +00:00
fpmath.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
invariant-load.ll Pass QueryInst down through non-local dependency calculation 2015-01-26 18:39:52 +00:00
lifetime-simple.ll
load-constant-mem.ll
load-from-unreachable-predecessor.ll Relax an assert a bit to avoid a crash on unreachable code. 2014-12-01 02:55:24 +00:00
load-pre-align.ll
load-pre-licm.ll
load-pre-nonlocal.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
local-pre.ll Fix PR17952. 2013-11-11 22:00:23 +00:00
lpre-call-wrap-2.ll
lpre-call-wrap.ll
malloc-load-removal.ll MemoryBuiltins: Reinstate optimizing (uninitialized) loads from operator new. 2013-09-24 17:34:29 +00:00
MemdepMiscompile.ll
noalias.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
non-local-offset.ll
nonescaping-malloc.ll
null-aliases-nothing.ll
phi-translate-partial-alias.ll
phi-translate.ll
pr10820.ll
pr12979.ll
pr14166.ll
pr17732.ll IR: Do not canonicalize constant GEPs into an out-of-bounds array access 2013-11-07 22:15:53 +00:00
pr17852.ll Add a testcase for pr17852. 2013-11-11 15:37:52 +00:00
pre-basic-add.ll
pre-compare.ll
pre-gep-load.ll Re-reapply r221924: "[GVN] Perform Scalar PRE on gep indices that feed loads before 2015-01-09 19:19:56 +00:00
pre-load.ll
pre-single-pred.ll
preserve-tbaa.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
range.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
readattrs.ll Catch more CHECK that can be converted to CHECK-LABEL in Transforms for easier debugging. No functionality change. 2013-07-14 01:50:49 +00:00
rle-must-alias.ll
rle-no-phi-translate.ll
rle-nonlocal.ll Fix PR17952. 2013-11-11 22:00:23 +00:00
rle-phi-translate.ll
rle-semidominated.ll Fix PR17952. 2013-11-11 22:00:23 +00:00
rle.ll Look through addrspacecast in GetPointerBaseWithConstantOffset 2014-07-14 22:39:22 +00:00
tbaa.ll Pass QueryInst down through non-local dependency calculation 2015-01-26 18:39:52 +00:00
unreachable_block_infinite_loop.ll Fix broken CHECK lines. 2014-01-11 21:06:00 +00:00