1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/lib/Transforms
Victor Hernandez 603a11de4e 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.

llvm-svn: 84199
2009-10-15 20:14:52 +00:00
..
Hello Kill off more cerr/cout uses and prune includes a bit. 2009-08-23 11:37:21 +00:00
Instrumentation Introduce and use convenience methods for getting pointer types 2009-10-06 15:40:36 +00:00
IPO Fix bug where array malloc with unexpected computation of the size argument resulted in MallocHelper 2009-10-15 20:14:52 +00:00
Scalar only try to fold constantexpr operands when the worklist is first populated, 2009-10-15 04:59:28 +00:00
Utils Update CMake file. 2009-10-13 18:48:07 +00:00
Makefile The attached patches attempt to fix cross builds. For example, if you 2009-08-18 00:40:33 +00:00