mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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:
@@ -179,8 +179,8 @@ BasicBlock *LoopUnroll::FoldBlockIntoPredecessor(BasicBlock *BB) {
|
||||
BB->eraseFromParent();
|
||||
|
||||
// Inherit predecessor's name if it exists...
|
||||
if (!OldName.empty() && !OnlyPred->hasName())
|
||||
OnlyPred->setName(OldName);
|
||||
if (BB->hasName() && !OnlyPred->hasName())
|
||||
OnlyPred->takeName(BB);
|
||||
|
||||
return OnlyPred;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user