llvm-6502/include/llvm
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
..
ADT add newline to make cl.exe happy. 2009-10-29 05:07:14 +00:00
Analysis Update CreateMalloc so that its callers specify the size to allocate: 2009-11-05 00:03:03 +00:00
Assembly Use MemoryBuffer::getBufferIdentifier() in the AsmPrinter instead 2009-09-08 22:20:35 +00:00
Bitcode bitcode writer support for blockaddress. 2009-10-28 05:24:40 +00:00
CodeGen Handle empty/tombstone keys for LiveIndex more cleanly. Check for index sanity when constructing index list entries. 2009-11-04 21:24:15 +00:00
CompilerDriver Forgot a declaration. 2009-10-22 04:15:24 +00:00
Config Undo pthread patch from rev. 83930 & 83823. Credit to Paul Davey. 2009-10-14 11:12:33 +00:00
ExecutionEngine add interpreter support for indirect goto / blockaddress. The interpreter 2009-10-29 05:26:09 +00:00
MC Remove a redundant copy constructor. 2009-10-30 00:14:33 +00:00
Support make IRBuilder zap "X|0" and "X&-1" when building IR, this happens 2009-11-04 05:00:12 +00:00
System Move DataTypes.h to include/llvm/System, update all users. This breaks the last 2009-10-26 01:35:46 +00:00
Target Add a couple more target nodes 2009-11-03 03:30:51 +00:00
Transforms Improve the other instance of the comment. 2009-11-01 19:16:21 +00:00
AbstractTypeUser.h When a constant's type is refined, update the constant in place 2009-09-15 15:58:07 +00:00
Argument.h Initial update to VMCore to use Twines for string arguments. 2009-07-25 04:41:11 +00:00
Attributes.h Add an 'inline hint' attribute to represent source 2009-08-26 01:08:21 +00:00
AutoUpgrade.h Reapply 79977. 2009-08-28 23:24:31 +00:00
BasicBlock.h the verifier shouldn't modify the IR. 2009-11-01 18:11:50 +00:00
CallGraphSCCPass.h Fix some nasty callgraph dangling pointer problems in 2009-08-31 00:19:58 +00:00
CallingConv.h Address review comments: add 3 ARM calling conventions. 2009-06-16 18:50:49 +00:00
CMakeLists.txt CMake: Have generated Xcode projects also contain the LLVM header files. 2009-04-01 15:40:21 +00:00
Constant.h the verifier shouldn't modify the IR. 2009-11-01 18:11:50 +00:00
Constants.h Revert 85678/85680. The decision is to stay with the current form of 2009-11-01 01:27:45 +00:00
DerivedTypes.h Actually privatize a IntegerTypes, and fix a few bugs exposed by this. 2009-08-13 23:27:32 +00:00
Function.h Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson. 2009-09-02 08:44:58 +00:00
GlobalAlias.h Public and private corrections, warned about by icc (#304). 2009-09-06 08:55:57 +00:00
GlobalValue.h Finish migrating VMCore to StringRef/Twine based APIs. 2009-07-25 06:02:13 +00:00
GlobalVariable.h Public and private corrections, warned about by icc (#304). 2009-09-06 08:55:57 +00:00
InlineAsm.h Rename msasm to alignstack per review. 2009-10-21 23:28:00 +00:00
InstrTypes.h Factor out redundancy from clone() implementations. 2009-10-27 22:16:29 +00:00
Instruction.def rename indbr -> indirectbr to appease the residents of #llvm. 2009-10-28 00:19:10 +00:00
Instruction.h Factor out redundancy from clone() implementations. 2009-10-27 22:16:29 +00:00
Instructions.h Update CreateMalloc so that its callers specify the size to allocate: 2009-11-05 00:03:03 +00:00
IntrinsicInst.h Don't put in these EH changes. 2009-10-29 00:37:35 +00:00
Intrinsics.h Make LLVMContext and LLVMContextImpl classes instead of structs. 2009-08-11 17:45:13 +00:00
Intrinsics.td Add objectsize intrinsic and hook it up through codegen. Doesn't 2009-10-27 00:52:25 +00:00
IntrinsicsAlpha.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsARM.td Add new intrinsics for Neon vldN_lane and vstN_lane operations. 2009-08-22 02:28:46 +00:00
IntrinsicsCellSPU.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsPowerPC.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsX86.td Add sse4.2 string/text processing intrinsics. We'll select these later. 2009-08-14 20:27:57 +00:00
IntrinsicsXCore.td Add XCore intrinsics for getid (returns thread id) and bitrev (reverses 2008-11-14 10:12:16 +00:00
LinkAllPasses.h Remove CodeGenLICM. It's largely obsoleted by MachineLICM's new ability 2009-10-31 14:35:41 +00:00
LinkAllVMCore.h Push LLVMContexts through the IntegerType APIs. 2009-08-13 21:58:54 +00:00
Linker.h Prune #includes from llvm/Linker.h and llvm/System/Path.h, 2009-08-23 22:45:37 +00:00
LLVMContext.h Derive metadata hierarchy from Value instead of User. 2009-10-21 23:57:35 +00:00
Metadata.h Silence implicit conversion warnings. 2009-11-04 03:08:57 +00:00
Module.h Added a comment to a function that had none 2009-11-03 15:25:20 +00:00
ModuleProvider.h Remove warnings about unused parameters and shadowed variables. 2008-05-19 20:15:12 +00:00
OperandTraits.h Public and private corrections, warned about by icc (#304). 2009-09-06 08:55:57 +00:00
Operator.h Remove a bunch of unused arguments from functions, silencing a 2009-10-14 20:28:33 +00:00
Pass.h Move DataTypes.h to include/llvm/System, update all users. This breaks the last 2009-10-26 01:35:46 +00:00
PassAnalysisSupport.h Add another required #include for freestanding .h files. 2009-10-17 08:12:36 +00:00
PassManager.h Reverting 85714, 85715, 85716, which are breaking the build 2009-11-01 16:42:53 +00:00
PassManagers.h Reverting 85714, 85715, 85716, which are breaking the build 2009-11-01 16:42:53 +00:00
PassSupport.h Add required #includes for freestanding .h files. 2009-10-17 03:28:07 +00:00
SymbolTableListTraits.h Forward-declare ValueSymbolTable so that SymbolTableListTraits.h can be parsed by itself 2009-09-30 00:08:25 +00:00
Type.h Type.h doesn't need to #include LLVMContext.h 2009-10-27 17:08:31 +00:00
TypeSymbolTable.h remove a bunch of locking from LLVMContextImpl. Since only one thread 2009-11-01 18:42:03 +00:00
Use.h eliminate all 80-col violations that I have introduced in my recent checkins (and some others more) 2009-08-27 23:44:33 +00:00
User.h Remove some dead functions, patch by Ryan Flynn! 2009-07-14 18:58:35 +00:00
Value.h IR support for the new BlockAddress constant kind. This is 2009-10-28 00:01:44 +00:00
ValueSymbolTable.h Move DataTypes.h to include/llvm/System, update all users. This breaks the last 2009-10-26 01:35:46 +00:00