diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-09-18 22:35:49 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-09-18 22:35:49 +0000 |
commit | 5d034499ad2b0cd99833dd66e9359bf17088fa11 (patch) | |
tree | c7c7349c462240747f9fcdd168666acfcc8464c5 /llvm/lib/Transforms/Utils | |
parent | 3d8f8625967ac153e80ff100ac88a3393631df24 (diff) | |
download | bcm5719-llvm-5d034499ad2b0cd99833dd66e9359bf17088fa11.tar.gz bcm5719-llvm-5d034499ad2b0cd99833dd66e9359bf17088fa11.zip |
Enhance transform passes so that they apply the same tranforms to malloc calls as to MallocInst.
Reviewed by Dan Gohman.
llvm-svn: 82300
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineCost.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineCost.cpp b/llvm/lib/Transforms/Utils/InlineCost.cpp index fe4d060e9ac..7bf23661587 100644 --- a/llvm/lib/Transforms/Utils/InlineCost.cpp +++ b/llvm/lib/Transforms/Utils/InlineCost.cpp @@ -13,6 +13,7 @@ #include "llvm/Transforms/Utils/InlineCost.h" +#include "llvm/Analysis/MallocHelper.h" #include "llvm/Support/CallSite.h" #include "llvm/CallingConv.h" #include "llvm/IntrinsicInst.h" @@ -51,7 +52,7 @@ unsigned InlineCostAnalyzer::FunctionInfo:: // Unfortunately, we don't know the pointer that may get propagated here, // so we can't make this decision. if (Inst.mayReadFromMemory() || Inst.mayHaveSideEffects() || - isa<AllocationInst>(Inst)) + isa<AllocationInst>(Inst) || isMalloc(&Inst)) continue; bool AllOperandsConstant = true; |