[llvm-commits] [llvm] r49657 - in /llvm/trunk: lib/Linker/LinkModules.cpp lib/Transforms/Scalar/LoopRotation.cpp lib/Transforms/Scalar/LoopUnroll.cpp lib/Transforms/Scalar/TailDuplication.cpp lib/Transforms/Utils/CodeExtractor.cpp tools/bugpoint/Miscompilation.cpp
Owen Anderson
resistor at mac.com
Mon Apr 14 10:38:21 PDT 2008
Author: resistor
Date: Mon Apr 14 12:38:21 2008
New Revision: 49657
URL: http://llvm.org/viewvc/llvm-project?rev=49657&view=rev
Log:
Revert r49614. As Dan pointed out, some of these aren't correct.
Modified:
llvm/trunk/lib/Linker/LinkModules.cpp
llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp
llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp
llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
llvm/trunk/tools/bugpoint/Miscompilation.cpp
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=49657&r1=49656&r2=49657&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Mon Apr 14 12:38:21 2008
@@ -930,7 +930,7 @@
Function::arg_iterator DI = Dest->arg_begin();
for (Function::arg_iterator I = Src->arg_begin(), E = Src->arg_end();
I != E; ++I, ++DI) {
- DI->takeName(I); // Copy the name information over...
+ DI->setName(I->getName()); // Copy the name information over...
// Add a mapping to our local map
ValueMap[I] = DI;
Modified: llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp?rev=49657&r1=49656&r2=49657&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp Mon Apr 14 12:38:21 2008
@@ -226,7 +226,7 @@
// 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->takeName(In);
+ C->setName(In->getName());
OrigPreHeader->getInstList().push_back(C);
for (unsigned opi = 0, e = In->getNumOperands(); opi != e; ++opi) {
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp?rev=49657&r1=49656&r2=49657&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp Mon Apr 14 12:38:21 2008
@@ -179,8 +179,8 @@
BB->eraseFromParent();
// Inherit predecessor's name if it exists...
- if (BB->hasName() && !OnlyPred->hasName())
- OnlyPred->takeName(BB);
+ if (!OldName.empty() && !OnlyPred->hasName())
+ OnlyPred->setName(OldName);
return OnlyPred;
}
Modified: llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp?rev=49657&r1=49656&r2=49657&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp Mon Apr 14 12:38:21 2008
@@ -317,7 +317,7 @@
//
for (; BI != DestBlock->end(); ++BI) {
Instruction *New = BI->clone();
- New->takeName(BI);
+ New->setName(BI->getName());
SourceBlock->getInstList().push_back(New);
ValueMapping[BI] = New;
}
Modified: llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp?rev=49657&r1=49656&r2=49657&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp Mon Apr 14 12:38:21 2008
@@ -317,7 +317,7 @@
if (!AggregateArgs) {
AI = newFunction->arg_begin();
for (unsigned i = 0, e = inputs.size(); i != e; ++i, ++AI)
- AI->takeName(inputs[i]);
+ AI->setName(inputs[i]->getName());
for (unsigned i = 0, e = outputs.size(); i != e; ++i, ++AI)
AI->setName(outputs[i]->getName()+".out");
}
Modified: llvm/trunk/tools/bugpoint/Miscompilation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/Miscompilation.cpp?rev=49657&r1=49656&r2=49657&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/Miscompilation.cpp (original)
+++ llvm/trunk/tools/bugpoint/Miscompilation.cpp Mon Apr 14 12:38:21 2008
@@ -657,7 +657,7 @@
for (Function::arg_iterator
I = newMain->arg_begin(), E = newMain->arg_end(),
OI = oldMain->arg_begin(); I != E; ++I, ++OI) {
- I->takeName(OI); // Copy argument names from oldMain
+ I->setName(OI->getName()); // Copy argument names from oldMain
args.push_back(I);
}
More information about the llvm-commits
mailing list