diff options
author | Devang Patel <dpatel@apple.com> | 2009-03-09 23:04:12 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-03-09 23:04:12 +0000 |
commit | 412a4469746d468c46b7e7e4f1c77407dab0a1ce (patch) | |
tree | 945be7e5a29982db375445645f8dc288bae42c0e /lib/Transforms/IPO | |
parent | 9d10086797b4dfe58f8b13a71534b28805f0713d (diff) |
Ignore debug info while evaluating function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r-- | lib/Transforms/IPO/GlobalOpt.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 6faf4d0bb2..b804e2b358 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -2199,6 +2199,13 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal, AI->getName())); InstResult = AllocaTmps.back(); } else if (CallInst *CI = dyn_cast<CallInst>(CurInst)) { + + // Debug info can safely be ignored here. + if (isa<DbgInfoIntrinsic>(CI)) { + ++CurInst; + continue; + } + // Cannot handle inline asm. if (isa<InlineAsm>(CI->getOperand(0))) return false; @@ -2224,7 +2231,6 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal, return false; Constant *RetVal; - // Execute the call, if successful, use the return value. if (!EvaluateFunction(Callee, RetVal, Formals, CallStack, MutatedMemory, AllocaTmps)) |