llvm-6502/test
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
..
Analysis Update CreateMalloc so that its callers specify the size to allocate: 2009-11-05 00:03:03 +00:00
Archive
Assembler Adjust testcases for msasm -> alignstack. 2009-10-21 23:29:12 +00:00
Bindings/Ocaml Fix test/Bindings/Ocaml/vmcore.ml. When IRBuilder::CreateMalloc was removed, 2009-10-17 23:52:26 +00:00
Bitcode
BugPoint
CodeGen Add PowerPC codegen for indirect branches. 2009-11-04 21:31:18 +00:00
DebugInfo Parse debug info attached with insertvalue and extractvalue instructions. 2009-11-03 19:06:07 +00:00
ExecutionEngine
Feature add bitcode reader support for blockaddress. We can now fully 2009-10-28 05:53:48 +00:00
FrontendAda Check that accessing a struct field that occurs before the start 2009-10-22 12:53:25 +00:00
FrontendC Adjust testcases for msasm -> alignstack. 2009-10-21 23:29:12 +00:00
FrontendC++ turn IPSCCP back on by default, try #3 or 4? Woo. 2009-11-03 19:35:13 +00:00
FrontendFortran
FrontendObjC These tests now pass. 2009-10-13 20:45:18 +00:00
FrontendObjC++
Integer
lib
Linker
LLVMC Add a test for OptionPreprocessor. 2009-10-25 01:43:50 +00:00
MC Force triple in tests. 2009-10-16 16:30:02 +00:00
Other Update these tests to match what Loop::print now prints. 2009-10-24 23:52:07 +00:00
Scripts Teach macho-dump to dump UUIDs. 2009-10-24 20:32:36 +00:00
TableGen
Transforms Update CreateMalloc so that its callers specify the size to allocate: 2009-11-05 00:03:03 +00:00
Unit
Verifier
CMakeLists.txt
lit.cfg Add missing substitution for %llvmgcc_only. 2009-10-30 21:13:59 +00:00
lit.site.cfg.in
Makefile Fix gmake check for AuroraUX triple. 2009-10-26 02:37:56 +00:00
Makefile.tests
site.exp.in
TestRunner.sh