Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),

which is significantly more efficient.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49614 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2008-04-13 19:15:17 +00:00
parent 4a6da60787
commit 386ea355e7
6 changed files with 7 additions and 7 deletions

View File

@@ -226,7 +226,7 @@ bool LoopRotate::rotateLoop(Loop *Lp, LPPassManager &LPM) {
// If this instruction is using a value from same basic block then
// update it to use value from cloned instruction.
Instruction *C = In->clone();
C->setName(In->getName());
C->takeName(In);
OrigPreHeader->getInstList().push_back(C);
for (unsigned opi = 0, e = In->getNumOperands(); opi != e; ++opi) {