aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-03-10 22:20:02 +0000
committerDale Johannesen <dalej@apple.com>2009-03-10 22:20:02 +0000
commit8aa90feb3d391145d2bc82a9d51a5714a4fe71f8 (patch)
tree74d9de80d18de3f890ce24a288838cf3140e8799 /lib/Transforms/Utils/CloneFunction.cpp
parent7b69720ff42cad9b3eabe273a21948d23e220caf (diff)
downloadexternal_llvm-8aa90feb3d391145d2bc82a9d51a5714a4fe71f8.zip
external_llvm-8aa90feb3d391145d2bc82a9d51a5714a4fe71f8.tar.gz
external_llvm-8aa90feb3d391145d2bc82a9d51a5714a4fe71f8.tar.bz2
Don't consider debug intrinsics when checking
whether a callee to be inlined is a leaf. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66588 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--lib/Transforms/Utils/CloneFunction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp
index 50340d1..5921102 100644
--- a/lib/Transforms/Utils/CloneFunction.cpp
+++ b/lib/Transforms/Utils/CloneFunction.cpp
@@ -47,7 +47,7 @@ BasicBlock *llvm::CloneBasicBlock(const BasicBlock *BB,
NewBB->getInstList().push_back(NewInst);
ValueMap[II] = NewInst; // Add instruction map to value.
- hasCalls |= isa<CallInst>(II);
+ hasCalls |= (isa<CallInst>(II) && !isa<DbgInfoIntrinsic>(II));
if (const AllocaInst *AI = dyn_cast<AllocaInst>(II)) {
if (isa<ConstantInt>(AI->getArraySize()))
hasStaticAllocas = true;
@@ -249,7 +249,7 @@ void PruningFunctionCloner::CloneBlock(const BasicBlock *BB,
NewBB->getInstList().push_back(NewInst);
ValueMap[II] = NewInst; // Add instruction map to value.
- hasCalls |= isa<CallInst>(II);
+ hasCalls |= (isa<CallInst>(II) && !isa<DbgInfoIntrinsic>(II));
if (const AllocaInst *AI = dyn_cast<AllocaInst>(II)) {
if (isa<ConstantInt>(AI->getArraySize()))
hasStaticAllocas = true;