llvm-6502/test/Transforms
Victor Hernandez 24f934d055 Update CreateMalloc so that its callers specify the size to allocate:
MallocInst-autoupgrade users use non-TargetData-computed allocation sizes.
Optimization uses use TargetData to compute the allocation size.

Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays.
Extend getMallocType() to support malloc calls that have non-bitcast uses.

Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses.  The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.

Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses.  The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.

Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.

Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86077 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 00:03:03 +00:00
..
ADCE Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
ArgumentPromotion 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
BlockPlacement Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
BranchFolding Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
CodeExtractor Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
CodeGenPrepare Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
CondProp Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
ConstantMerge Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
ConstProp Convert a few tests to FileCheck for PR5307. 2009-10-26 22:52:03 +00:00
DeadArgElim Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
DeadStoreElimination improve DSE when TargetData is not around, based on work by 2009-11-04 23:20:12 +00:00
FunctionAttrs Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
GlobalDCE Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
GlobalOpt Update CreateMalloc so that its callers specify the size to allocate: 2009-11-05 00:03:03 +00:00
GVN Treat lifetime begin/end markers as allocations/frees respectively for the 2009-10-28 07:05:35 +00:00
IndVarSimplify 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
Inline 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
InstCombine move two functions up higher in the file. Delete a useless argument 2009-11-04 08:05:20 +00:00
Internalize Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
IPConstantProp Constant propagating byval pointer is safe if function is readonly. 2009-09-24 18:33:42 +00:00
JumpThreading Make these tests more interesting by using 2009-10-24 23:23:04 +00:00
LCSSA Move the dominator verification code out of special code embedded within 2009-09-28 00:27:48 +00:00
LICM Convert a few tests to FileCheck for PR5307. 2009-10-26 22:52:03 +00:00
LoopDeletion Make LoopDeletion check the maximum backedge taken count, rather than the 2009-10-23 17:10:01 +00:00
LoopIndexSplit Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
LoopRotate Make these tests more interesting by using 2009-10-24 23:23:04 +00:00
LoopSimplify Make these tests more interesting by using 2009-10-24 23:23:04 +00:00
LoopStrengthReduce Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
LoopUnroll Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
LoopUnswitch Move the dominator verification code out of special code embedded within 2009-09-28 00:27:48 +00:00
LowerInvoke Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
LowerSetJmp Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
LowerSwitch Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
Mem2Reg fix a bug exposed by moving SRoA earlier which caused a crash building kc++ 2009-11-02 04:37:17 +00:00
MemCpyOpt 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
MergeFunc Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
PruneEH Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
Reassociate Convert more tests to avoid llvm-as. 2009-09-11 18:36:27 +00:00
ScalarRepl 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
SCCP reimplement multiple return value handling in IPSCCP, making it 2009-11-03 23:40:48 +00:00
SimplifyCFG Revert r85667. LoopUnroll currently can't call utility functions which 2009-10-31 17:33:01 +00:00
SimplifyLibCalls Fix SimplifyLibCalls to transfer attributes from callees rather than 2009-09-26 18:10:13 +00:00
SRETPromotion Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
SSI Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
StripSymbols Update test. 2009-09-09 02:41:50 +00:00
TailCallElim Convert more tests to avoid llvm-as. 2009-09-11 18:36:27 +00:00
TailDup Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00