diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-10-17 00:00:19 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-10-17 00:00:19 +0000 |
commit | c7d6a8327c703297afc45391771975b2db9740ee (patch) | |
tree | aded3b1bc0206680af43b37fe4a32a386e96deec /llvm/lib/Transforms/Scalar/Reassociate.cpp | |
parent | 956127de22267e9ceb01f3464c1dd9f33acb6974 (diff) | |
download | bcm5719-llvm-c7d6a8327c703297afc45391771975b2db9740ee.tar.gz bcm5719-llvm-c7d6a8327c703297afc45391771975b2db9740ee.zip |
Autoupgrade malloc insts to malloc calls.
Update testcases that rely on malloc insts being present.
Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step.
llvm-svn: 84292
Diffstat (limited to 'llvm/lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/Reassociate.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp index e6ffac251b7..9160654c3d8 100644 --- a/llvm/lib/Transforms/Scalar/Reassociate.cpp +++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp @@ -29,6 +29,7 @@ #include "llvm/IntrinsicInst.h" #include "llvm/LLVMContext.h" #include "llvm/Pass.h" +#include "llvm/Analysis/MallocHelper.h" #include "llvm/Assembly/Writer.h" #include "llvm/Support/CFG.h" #include "llvm/Support/Debug.h" @@ -121,7 +122,7 @@ static bool isUnmovableInstruction(Instruction *I) { if (I->getOpcode() == Instruction::PHI || I->getOpcode() == Instruction::Alloca || I->getOpcode() == Instruction::Load || - I->getOpcode() == Instruction::Malloc || + I->getOpcode() == Instruction::Malloc || isMalloc(I) || I->getOpcode() == Instruction::Invoke || (I->getOpcode() == Instruction::Call && !isa<DbgInfoIntrinsic>(I)) || |