summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
diff options
context:
space:
mode:
authorVictor Hernandez <vhernandez@apple.com>2009-10-15 20:14:52 +0000
committerVictor Hernandez <vhernandez@apple.com>2009-10-15 20:14:52 +0000
commit13020b1fafa3e523a15777b572f200926143b413 (patch)
tree203bafc6b7841db42900460519bac1bfa16b20fb /llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
parent7781daa4e034a4a25fa5566c701f8a3afbd5ce11 (diff)
downloadbcm5719-llvm-13020b1fafa3e523a15777b572f200926143b413.tar.gz
bcm5719-llvm-13020b1fafa3e523a15777b572f200926143b413.zip
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
Diffstat (limited to 'llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud