[llvm-commits] [llvm] r61175 - /llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp
Chris Lattner
sabre at nondot.org
Wed Dec 17 16:33:12 PST 2008
Author: lattner
Date: Wed Dec 17 18:33:11 2008
New Revision: 61175
URL: http://llvm.org/viewvc/llvm-project?rev=61175&view=rev
Log:
make instnamer name unnamed blocks as well as instructions and args.
Modified:
llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp
Modified: llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp?rev=61175&r1=61174&r2=61175&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp Wed Dec 17 18:33:11 2008
@@ -35,10 +35,14 @@
if (!AI->hasName() && AI->getType() != Type::VoidTy)
AI->setName("tmp");
- for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB)
+ for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
+ if (!BB->hasName())
+ BB->setName("BB");
+
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)
if (!I->hasName() && I->getType() != Type::VoidTy)
I->setName("tmp");
+ }
return true;
}
};
More information about the llvm-commits
mailing list