llvm-project/llvm/test/Analysis
Victor Hernandez 492ed30a32 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.

llvm-svn: 86077
2009-11-05 00:03:03 +00:00
..
Andersens Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
BasicAA 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
CallGraph Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
Dominators Eliminate more redundant llvm-as calls. 2009-09-11 18:17:12 +00:00
GlobalsModRef Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
LoopDependenceAnalysis Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
LoopInfo Update these tests to match what Loop::print now prints. 2009-10-24 23:52:07 +00:00
PointerTracking Update CreateMalloc so that its callers specify the size to allocate: 2009-11-05 00:03:03 +00:00
PostDominators Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
Profiling Change tests from "opt %s" to "opt < %s" so that opt doesn't see the 2009-09-11 18:01:28 +00:00
ScalarEvolution 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