diff options
author | Dale Johannesen <dalej@apple.com> | 2009-03-10 22:20:02 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-03-10 22:20:02 +0000 |
commit | 900aaa3d1e6e63d972f50bac5acc2da63f63defa (patch) | |
tree | 35547c7d82c175233e3fd9d39e720b8c8d17d29a /llvm | |
parent | ff1faf70333677e3af48b8589c3123dec5e01763 (diff) | |
download | bcm5719-llvm-900aaa3d1e6e63d972f50bac5acc2da63f63defa.tar.gz bcm5719-llvm-900aaa3d1e6e63d972f50bac5acc2da63f63defa.zip |
Don't consider debug intrinsics when checking
whether a callee to be inlined is a leaf.
llvm-svn: 66588
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index 50340d18508..59211028f31 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<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; |