From 900aaa3d1e6e63d972f50bac5acc2da63f63defa Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Tue, 10 Mar 2009 22:20:02 +0000 Subject: [PATCH] Don't consider debug intrinsics when checking whether a callee to be inlined is a leaf. llvm-svn: 66588 --- llvm/lib/Transforms/Utils/CloneFunction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index 50340d18508d..59211028f313 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/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(II); + hasCalls |= (isa(II) && !isa(II)); if (const AllocaInst *AI = dyn_cast(II)) { if (isa(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(II); + hasCalls |= (isa(II) && !isa(II)); if (const AllocaInst *AI = dyn_cast(II)) { if (isa(AI->getArraySize())) hasStaticAllocas = true;