summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-25 00:31:02 +0000
committerChris Lattner <sabre@nondot.org>2002-02-25 00:31:02 +0000
commit41b66b12e8be5024b0d8506b5b61a425a2becd49 (patch)
tree40bcfafae6f2a973392dfaf792a9022def8d7220 /lib/Transforms
parentec4913ea7c848e0c3a7cf97815188b194edc1e09 (diff)
downloadllvm-41b66b12e8be5024b0d8506b5b61a425a2becd49.tar.gz
llvm-41b66b12e8be5024b0d8506b5b61a425a2becd49.tar.bz2
llvm-41b66b12e8be5024b0d8506b5b61a425a2becd49.tar.xz
When inlining basic blocks and instructions, give them a name!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1796 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/IPO/InlineSimple.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp
index a71acd2a79..d4c23a9208 100644
--- a/lib/Transforms/IPO/InlineSimple.cpp
+++ b/lib/Transforms/IPO/InlineSimple.cpp
@@ -82,6 +82,7 @@ bool InlineMethod(BasicBlock::iterator CIIt) {
// unconditional branch to NewBB, and NewBB starts with the call instruction.
//
BasicBlock *NewBB = OrigBB->splitBasicBlock(CIIt);
+ NewBB->setName("InlinedFunctionReturnNode");
// Remove (unlink) the CallInst from the start of the new basic block.
NewBB->getInstList().remove(CI);
@@ -131,6 +132,7 @@ bool InlineMethod(BasicBlock::iterator CIIt) {
// Create a new basic block to copy instructions into!
BasicBlock *IBB = new BasicBlock("", NewBB->getParent());
+ if (BB->hasName()) IBB->setName(BB->getName()+".i"); // .i = inlined once
ValueMap[BB] = IBB; // Add basic block mapping.
@@ -146,6 +148,8 @@ bool InlineMethod(BasicBlock::iterator CIIt) {
II != (BB->end()-1); ++II) {
IBB->getInstList().push_back((NewInst = (*II)->clone()));
ValueMap[*II] = NewInst; // Add instruction map to value.
+ if ((*II)->hasName())
+ NewInst->setName((*II)->getName()+".i"); // .i = inlined once
}
// Copy over the terminator now...