llvm-6502/lib/VMCore
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
..
AsmWriter.cpp Revert 85678/85680. The decision is to stay with the current form of 2009-11-01 01:27:45 +00:00
Attributes.cpp Add an 'inline hint' attribute to represent source 2009-08-26 01:08:21 +00:00
AutoUpgrade.cpp I don't see any point in having both eh.selector.i32 and eh.selector.i64, 2009-10-14 16:11:37 +00:00
BasicBlock.cpp Revert 85678/85680. The decision is to stay with the current form of 2009-11-01 01:27:45 +00:00
CMakeLists.txt Update CMakeLists. 2009-08-04 23:02:53 +00:00
ConstantFold.cpp Previously, all operands to Constant were themselves constant. 2009-10-28 05:14:34 +00:00
ConstantFold.h Value* were never meant to be const. Removing constness from the constant 2009-09-20 01:35:59 +00:00
Constants.cpp remove a bunch of locking from LLVMContextImpl. Since only one thread 2009-11-01 18:42:03 +00:00
ConstantsContext.h remove a bunch of locking from LLVMContextImpl. Since only one thread 2009-11-01 18:42:03 +00:00
Core.cpp Update CreateMalloc so that its callers specify the size to allocate: 2009-11-05 00:03:03 +00:00
Dominators.cpp Make DominanceFrontierBase::print's output prettier. 2009-10-24 20:01:11 +00:00
Function.cpp when we tear down a module, we need to be careful to 2009-10-28 03:37:35 +00:00
Globals.cpp the verifier shouldn't modify the IR. 2009-11-01 18:11:50 +00:00
InlineAsm.cpp Rename msasm to alignstack per review. 2009-10-21 23:28:00 +00:00
Instruction.cpp Changes requested (avoid getFunction(), avoid Type creation via isVoidTy(), and avoid redundant isFreeCall cases) in feedback to r85176 2009-11-03 20:39:35 +00:00
Instructions.cpp Update CreateMalloc so that its callers specify the size to allocate: 2009-11-05 00:03:03 +00:00
IntrinsicInst.cpp Fix DbgStopPointInst->getFileName/getDirectory, broken by the MDNodification in 2009-09-02 11:13:56 +00:00
LeakDetector.cpp remove a bunch of locking from LLVMContextImpl. Since only one thread 2009-11-01 18:42:03 +00:00
LeaksContext.h remove a bunch of locking from LLVMContextImpl. Since only one thread 2009-11-01 18:42:03 +00:00
LLVMContext.cpp Derive metadata hierarchy from Value instead of User. 2009-10-21 23:57:35 +00:00
LLVMContextImpl.h remove a bunch of locking from LLVMContextImpl. Since only one thread 2009-11-01 18:42:03 +00:00
Makefile
Mangler.cpp initialize SymbolsCanStartWithDigit to false by default 2009-09-21 14:11:56 +00:00
Metadata.cpp Do not use expensive sort(). 2009-10-26 17:09:00 +00:00
Module.cpp Push LLVMContexts through the IntegerType APIs. 2009-08-13 21:58:54 +00:00
ModuleProvider.cpp
Pass.cpp Hide MetadataContext implementation details. 2009-10-22 19:36:54 +00:00
PassManager.cpp Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces. 2009-10-25 06:33:48 +00:00
PrintModulePass.cpp Remove includes of Support/Compiler.h that are no longer needed after the 2009-10-25 06:57:41 +00:00
SymbolTableListTraitsImpl.h
Type.cpp remove a bunch of locking from LLVMContextImpl. Since only one thread 2009-11-01 18:42:03 +00:00
TypesContext.h Free the constants that have no uses in ~LLVMContext. 2009-08-31 16:14:59 +00:00
TypeSymbolTable.cpp remove a bunch of locking from LLVMContextImpl. Since only one thread 2009-11-01 18:42:03 +00:00
Use.cpp Public and private corrections, warned about by icc (#304). 2009-09-06 08:55:57 +00:00
Value.cpp remove a bunch of locking from LLVMContextImpl. Since only one thread 2009-11-01 18:42:03 +00:00
ValueSymbolTable.cpp remove some DOUTs 2009-08-23 04:44:11 +00:00
ValueTypes.cpp Reapply 79977. 2009-08-28 23:24:31 +00:00
Verifier.cpp the verifier shouldn't modify the IR. 2009-11-01 18:11:50 +00:00