refactor the MemoryBuiltin analysis:
authorNuno Lopes <nunoplopes@sapo.pt>
Thu, 21 Jun 2012 15:45:28 +0000 (15:45 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Thu, 21 Jun 2012 15:45:28 +0000 (15:45 +0000)
commit9e72a79ef4a9fcda482ce0b0e1f0bd6a4f16cffd
tree8861b7712018795653a7eace205bdaa6d10f2c70
parent2114a8aaba99e901735e69818bb789757ed05cfd
refactor the MemoryBuiltin analysis:
 - provide more extensive set of functions to detect library allocation functions (e.g., malloc, calloc, strdup, etc)
 - provide an API to compute the size and offset of an object pointed by

Move a few clients (GVN, AA, instcombine, ...) to the new API.
This implementation is a lot more aggressive than each of the custom implementations being replaced.

Patch reviewed by Nick Lewycky and Chandler Carruth, thanks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158919 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/MemoryBuiltins.h
lib/Analysis/BasicAliasAnalysis.cpp
lib/Analysis/IPA/GlobalsModRef.cpp
lib/Analysis/MemoryBuiltins.cpp
lib/Analysis/MemoryDependenceAnalysis.cpp
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/InstCombine/InstructionCombining.cpp
lib/Transforms/Scalar/DeadStoreElimination.cpp
lib/Transforms/Scalar/GVN.cpp
lib/Transforms/Utils/Local.cpp
test/Transforms/InstCombine/objsize.ll