aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/SCCP.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-05-11 01:55:59 +0000
committerChris Lattner <sabre@nondot.org>2008-05-11 01:55:59 +0000
commit5c8e8d7fc5b042153fe8b0f0813368c49ec007a5 (patch)
treedfaf2590208ea9543b51558fb034ba20d89d529b /lib/Transforms/Scalar/SCCP.cpp
parent3a73c9e5f9e1f9baf77b744adf3adb53639b8af5 (diff)
downloadexternal_llvm-5c8e8d7fc5b042153fe8b0f0813368c49ec007a5.zip
external_llvm-5c8e8d7fc5b042153fe8b0f0813368c49ec007a5.tar.gz
external_llvm-5c8e8d7fc5b042153fe8b0f0813368c49ec007a5.tar.bz2
Fix various DOUTs to not call the extremely expensive Value::getName()
method. DOUT statements are disabled when assertions are off, but the side effects of getName() are still evaluated. Just call getNameSTart, which is close enough and doesn't cause heap traffic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp
index 6e76f4c..168e544 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/lib/Transforms/Scalar/SCCP.cpp
@@ -179,7 +179,7 @@ public:
/// MarkBlockExecutable - This method can be used by clients to mark all of
/// the blocks that are known to be intrinsically live in the processed unit.
void MarkBlockExecutable(BasicBlock *BB) {
- DOUT << "Marking Block Executable: " << BB->getName() << "\n";
+ DOUT << "Marking Block Executable: " << BB->getNameStart() << "\n";
BBExecutable.insert(BB); // Basic block is executable!
BBWorkList.push_back(BB); // Add the block to the work list!
}
@@ -334,8 +334,8 @@ private:
return; // This edge is already known to be executable!
if (BBExecutable.count(Dest)) {
- DOUT << "Marking Edge Executable: " << Source->getName()
- << " -> " << Dest->getName() << "\n";
+ DOUT << "Marking Edge Executable: " << Source->getNameStart()
+ << " -> " << Dest->getNameStart() << "\n";
// The destination is already executable, but we just made an edge
// feasible that wasn't before. Revisit the PHI nodes in the block
@@ -1451,7 +1451,7 @@ FunctionPass *llvm::createSCCPPass() {
// and return true if the function was modified.
//
bool SCCP::runOnFunction(Function &F) {
- DOUT << "SCCP on function '" << F.getName() << "'\n";
+ DOUT << "SCCP on function '" << F.getNameStart() << "'\n";
SCCPSolver Solver;
// Mark the first block of the function as being executable.
@@ -1774,7 +1774,7 @@ bool IPSCCP::runOnModule(Module &M) {
GlobalVariable *GV = I->first;
assert(!I->second.isOverdefined() &&
"Overdefined values should have been taken out of the map!");
- DOUT << "Found that GV '" << GV->getName()<< "' is constant!\n";
+ DOUT << "Found that GV '" << GV->getNameStart() << "' is constant!\n";
while (!GV->use_empty()) {
StoreInst *SI = cast<StoreInst>(GV->use_back());
SI->eraseFromParent();