llvm-6502/test/Transforms/ScalarRepl
Bob Wilson 73a1b67cb9 Revise scalar replacement to be more flexible about handle bitcasts and GEPs.
While scanning through the uses of an alloca, keep track of the current offset
relative to the start of the alloca, and check memory references to see if
the offset & size correspond to a component within the alloca.  This has the
nice benefit of unifying much of the code from isSafeUseOfAllocation,
isSafeElementUse, and isSafeUseOfBitCastedAllocation.  The code to rewrite
the uses of a promoted alloca, after it is determined to be safe, is
reorganized in the same way.

Also, when rewriting GEP instructions, mark them as "in-bounds" since all the
indices are known to be safe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91184 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 23:47:40 +00:00
..
2003-05-29-ArrayFail.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
2003-05-30-InvalidIndices.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2003-05-30-MultiLevel.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2003-09-12-IncorrectPromote.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2003-10-29-ArrayProblem.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2005-12-14-UnionPromoteCrash.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2006-01-24-IllegalUnionPromoteCrash.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2006-04-20-PromoteCrash.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2006-10-23-PointerUnionCrash.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2006-11-07-InvalidArrayPromote.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
2006-12-11-SROA-Crash.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2007-03-19-CanonicalizeMemcpy.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2007-05-24-LargeAggregate.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2007-05-29-MemcpyPreserve.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2007-11-03-bigendian_apint.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2008-01-29-PromoteBug.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2008-02-28-SubElementExtractCrash.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2008-06-05-loadstore-agg.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
2008-06-22-LargeArray.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2008-08-22-out-of-range-array-promote.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2008-09-22-vector-gep.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
2009-01-09-scalarrepl-empty.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2009-02-02-ScalarPromoteOutOfRange.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2009-02-05-LoadFCA.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2009-03-04-MemCpyAlign.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
2009-03-05-Aggre2Scalar-dbg.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2009-03-17-CleanUp.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2009-04-21-ZeroLengthMemSet.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2009-05-08-I1Crash.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2009-06-01-BitcastIntPadding.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2009-08-16-VLA.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
2009-12-11-NeonTypes.ll Revise scalar replacement to be more flexible about handle bitcasts and GEPs. 2009-12-11 23:47:40 +00:00
AggregatePromote.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
arraytest.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
badarray.ll fix PR5436 by making the 'simple' case of SRoA not promote out of range 2009-11-27 16:37:41 +00:00
basictest.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
bitfield-sroa.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
copy-aggregate.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
debuginfo.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
dg.exp sabre brings to my attention that the 'tr' suffix is also obsolete 2008-05-20 21:00:03 +00:00
DifferingTypes.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
load-store-aggregate.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
memcpy-from-global.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
memset-aggregate-byte-leader.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
memset-aggregate.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
not-a-vector.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
phinodepromote.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
select_promote.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
sroa_two.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
sroa-fca.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
union-fp-int.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
union-packed.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
union-pointer.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
vector_memcpy.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
vector_promote.ll Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test 2009-11-03 15:29:06 +00:00
volatile.ll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00