[llvm] r251517 - [GlobalOpt] Add newlines to DEBUG messages
James Molloy via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 28 07:30:54 PDT 2015
Author: jamesm
Date: Wed Oct 28 09:30:53 2015
New Revision: 251517
URL: http://llvm.org/viewvc/llvm-project?rev=251517&view=rev
Log:
[GlobalOpt] Add newlines to DEBUG messages
I think these were affected by a change way back when to stop printing newlines in Value::dump() by default. This change simply allows the debug output to be readable.
NFC.
Modified:
llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=251517&r1=251516&r2=251517&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Wed Oct 28 09:30:53 2015
@@ -545,7 +545,7 @@ static GlobalVariable *SRAGlobal(GlobalV
if (NewGlobals.empty())
return nullptr;
- DEBUG(dbgs() << "PERFORMING GLOBAL SRA ON: " << *GV);
+ DEBUG(dbgs() << "PERFORMING GLOBAL SRA ON: " << *GV << "\n");
Constant *NullInt =Constant::getNullValue(Type::getInt32Ty(GV->getContext()));
@@ -778,7 +778,7 @@ static bool OptimizeAwayTrappingUsesOfLo
}
if (Changed) {
- DEBUG(dbgs() << "OPTIMIZED LOADS FROM STORED ONCE POINTER: " << *GV);
+ DEBUG(dbgs() << "OPTIMIZED LOADS FROM STORED ONCE POINTER: " << *GV << "\n");
++NumGlobUses;
}
@@ -1613,7 +1613,7 @@ static bool TryToShrinkGlobalToBoolean(G
if (!isa<LoadInst>(U) && !isa<StoreInst>(U))
return false;
- DEBUG(dbgs() << " *** SHRINKING TO BOOL: " << *GV);
+ DEBUG(dbgs() << " *** SHRINKING TO BOOL: " << *GV << "\n");
// Create the new global, initializing it to false.
GlobalVariable *NewGV = new GlobalVariable(Type::getInt1Ty(GV->getContext()),
@@ -1700,7 +1700,7 @@ bool GlobalOpt::ProcessGlobal(GlobalVari
GV->removeDeadConstantUsers();
if (GV->use_empty()) {
- DEBUG(dbgs() << "GLOBAL DEAD: " << *GV);
+ DEBUG(dbgs() << "GLOBAL DEAD: " << *GV << "\n");
GV->eraseFromParent();
++NumDeleted;
return true;
More information about the llvm-commits
mailing list