diff options
Diffstat (limited to 'lib/Transforms/Utils/InlineCost.cpp')
-rw-r--r-- | lib/Transforms/Utils/InlineCost.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/InlineCost.cpp b/lib/Transforms/Utils/InlineCost.cpp index fe4d060e9a..7bf2366158 100644 --- a/lib/Transforms/Utils/InlineCost.cpp +++ b/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; |