llvm/lib
Victor Hernandez 2491ce0353 Fix bug where array malloc with unexpected computation of the size argument resulted in MallocHelper
identifying the malloc as a non-array malloc.  This broke GlobalOpt's optimization of stores of mallocs 
to global variables.

The fix is to classify malloc's into 3 categories:
1. non-array mallocs
2. array mallocs whose array size can be determined
3. mallocs that cannot be determined to be of type 1 or 2 and cannot be optimized

getMallocArraySize() returns NULL for category 3, and all users of this function must avoid their 
malloc optimization if this function returns NULL.

Eventually, currently unexpected codegen for computing the malloc's size argument will be supported in
isArrayMalloc() and getMallocArraySize(), extending malloc optimizations to those examples.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-15 20:14:52 +00:00
..
Analysis Fix bug where array malloc with unexpected computation of the size argument resulted in MallocHelper 2009-10-15 20:14:52 +00:00
Archive
AsmParser Add an "msasm" flag to inline asm as suggested in PR 5125. 2009-10-13 20:46:56 +00:00
Bitcode Add an "msasm" flag to inline asm as suggested in PR 5125. 2009-10-13 20:46:56 +00:00
CodeGen Report errors correctly for unselected target intrinsics. 2009-10-15 18:50:03 +00:00
CompilerDriver
ExecutionEngine s/DebugLoc.CompileUnit/DebugLoc.Scope/g 2009-10-13 23:28:53 +00:00
Linker
MC Fixed MCSectionMachO::ParseSectionSpecifier to allow an attribute of "none" so 2009-10-07 20:57:20 +00:00
Support r83391 was completely broken since Twines keep references to their inputs, and 2009-10-06 21:45:26 +00:00
System Haiku porting patches, Credit to Paul Davey. 2009-10-12 04:57:20 +00:00
Target Add files Sanjiv forgot. 2009-10-15 19:46:34 +00:00
Transforms Fix bug where array malloc with unexpected computation of the size argument resulted in MallocHelper 2009-10-15 20:14:52 +00:00
VMCore Add copyMD to copy metadata from one instruction to another instruction. 2009-10-14 17:02:49 +00:00
Makefile remove llvm-db: it is completely broken and if anyone wants to do a debugger, 2009-10-05 02:29:51 +00:00