diff options
author | Chris Lattner <sabre@nondot.org> | 2002-02-25 00:31:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-02-25 00:31:02 +0000 |
commit | f20671a6b6bab7a7ab3b3b9b6595e9dd6eb59006 (patch) | |
tree | a011d96271c6f2e30713cbe691675547ee2f2bad /llvm/lib/Transforms/IPO/InlineSimple.cpp | |
parent | 5b46fa248fee595d56cc5f9a5617afa3424c1d96 (diff) | |
download | bcm5719-llvm-f20671a6b6bab7a7ab3b3b9b6595e9dd6eb59006.tar.gz bcm5719-llvm-f20671a6b6bab7a7ab3b3b9b6595e9dd6eb59006.zip |
When inlining basic blocks and instructions, give them a name!
llvm-svn: 1796
Diffstat (limited to 'llvm/lib/Transforms/IPO/InlineSimple.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/InlineSimple.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/InlineSimple.cpp b/llvm/lib/Transforms/IPO/InlineSimple.cpp index a71acd2a79f..d4c23a92089 100644 --- a/llvm/lib/Transforms/IPO/InlineSimple.cpp +++ b/llvm/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... |