If we were to stick with this patch, they should be qualified in the headers too so that you get a compile error instead of a linker error if release code does try to access them.<br><br><div class="gmail_quote">On Fri, Sep 7, 2012 at 9:38 AM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Craig,<div class="im"><br>
<br>
On 07/09/12 18:18, Craig Topper wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Wouldn't dead code stripping in the linker have removed these from a released build?<br>
</blockquote>
<br></div>
good question, but it seems not since I regularly use these when debugging<br>
release build problems on linux (usually buildbot crashes). (I don't have<br>
time to look into why they aren't removed right now, sorry). If it was the<br>
case that the linker removes them then Manman's patch wouldn't really be<br>
needed :)<br>
<br>
Ciao, Duncan.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
On Fri, Sep 7, 2012 at 4:07 AM, Duncan Sands <<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a><br></div><div class="im">
<mailto:<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>>> wrote:<br>
<br>
Hi Manman,<br>
<br>
Release build: guard dump functions with "ifndef NDEBUG"<br>
<br>
<br>
is this a good idea? It is sometimes necessary to debug release builds, in<br>
which case it is helpful to be able to call "dump" routines from the debugger.<br>
<br>
Ciao, Duncan.<br>
<br>
<br>
No functional change.<br>
<br>
Modified:<br></div>
llvm/trunk/lib/CodeGen/__<u></u>LiveInterval.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>LiveIntervalAnalysis.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>LiveVariables.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>MachineBasicBlock.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>MachineFunction.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>MachineInstr.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>MachineLoopInfo.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>MachineScheduler.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>PostRASchedulerList.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>RegisterPressure.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>ScheduleDAG.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>ScheduleDAGInstrs.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>ScoreboardHazardRecognizer.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>SelectionDAG/__<u></u>ScheduleDAGRRList.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>SelectionDAG/__<u></u>ScheduleDAGSDNodes.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>SlotIndexes.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>SplitKit.cpp<br>
llvm/trunk/lib/CodeGen/__<u></u>VirtRegMap.cpp<br>
llvm/trunk/lib/Target/X86/__<u></u>X86FloatingPoint.cpp<br>
llvm/trunk/lib/Target/X86/__<u></u>X86ISelDAGToDAG.cpp<br>
<br>
Modified: llvm/trunk/lib/CodeGen/__<u></u>LiveInterval.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/LiveInterval.cpp?rev=__163339&r1=163338&r2=163339&__view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/LiveInterval.cpp?rev=_<u></u>_163339&r1=163338&r2=163339&__<u></u>view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveInterval.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/LiveInterval.cpp?rev=<u></u>163339&r1=163338&r2=163339&<u></u>view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>LiveInterval.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>LiveInterval.cpp Thu Sep 6 14:06:06 2012<div class="im"><br>
@@ -748,9 +748,11 @@<br>
return os << '[' << LR.start << ',' << LR.end << ':' <<<br>
LR.valno->id << ")";<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void LiveRange::dump() const {<br>
dbgs() << *this << "\n";<br>
}<br>
+#endif<br>
<br></div>
void LiveInterval::print(raw___<u></u>ostream &OS) const {<div class="im"><br>
if (empty())<br>
@@ -783,9 +785,11 @@<br>
}<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void LiveInterval::dump() const {<br>
dbgs() << *this << "\n";<br>
}<br>
+#endif<br>
<br>
#ifndef NDEBUG<br>
void LiveInterval::verify() const {<br>
<br></div>
Modified: llvm/trunk/lib/CodeGen/__<u></u>LiveIntervalAnalysis.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/LiveIntervalAnalysis.__cpp?rev=163339&r1=163338&r2=__163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/LiveIntervalAnalysis._<u></u>_cpp?rev=163339&r1=163338&r2=_<u></u>_163339&view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/LiveIntervalAnalysis.<u></u>cpp?rev=163339&r1=163338&r2=<u></u>163339&view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>LiveIntervalAnalysis.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>LiveIntervalAnalysis.cpp Thu Sep 6<div class="im"><br>
14:06:06 2012<br>
@@ -156,9 +156,11 @@<br>
MF->print(OS, Indexes);<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void LiveIntervals::dumpInstrs() const {<br>
printInstrs(dbgs());<br>
}<br>
+#endif<br>
<br>
static<br>
bool MultipleDefsBySameMI(const MachineInstr &MI, unsigned MOIdx) {<br>
<br></div>
Modified: llvm/trunk/lib/CodeGen/__<u></u>LiveVariables.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/LiveVariables.cpp?rev=__163339&r1=163338&r2=163339&__view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/LiveVariables.cpp?rev=<u></u>__163339&r1=163338&r2=163339&_<u></u>_view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveVariables.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/LiveVariables.cpp?rev=<u></u>163339&r1=163338&r2=163339&<u></u>view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>LiveVariables.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>LiveVariables.cpp Thu Sep 6 14:06:06 2012<div class="im"><br>
@@ -65,6 +65,7 @@<br>
}<br>
<br>
void LiveVariables::VarInfo::dump() const {<br>
+#ifndef NDEBUG<br>
dbgs() << " Alive in blocks: ";<br>
for (SparseBitVector<>::iterator I = AliveBlocks.begin(),<br>
E = AliveBlocks.end(); I != E; ++I)<br>
@@ -77,6 +78,7 @@<br>
dbgs() << "\n #" << i << ": " << *Kills[i];<br>
dbgs() << "\n";<br>
}<br>
+#endif<br>
}<br>
<br>
/// getVarInfo - Get (possibly creating) a VarInfo object for the<br>
given vreg.<br>
<br></div>
Modified: llvm/trunk/lib/CodeGen/__<u></u>MachineBasicBlock.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/MachineBasicBlock.cpp?__rev=163339&r1=163338&r2=__163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/MachineBasicBlock.cpp?<u></u>__rev=163339&r1=163338&r2=__<u></u>163339&view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/MachineBasicBlock.cpp?<u></u>rev=163339&r1=163338&r2=<u></u>163339&view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>MachineBasicBlock.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>MachineBasicBlock.cpp Thu Sep 6 14:06:06 2012<div class="im"><br>
@@ -228,9 +228,11 @@<br>
return 0;<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void MachineBasicBlock::dump() const {<br>
print(dbgs());<br>
}<br>
+#endif<br>
<br>
StringRef MachineBasicBlock::getName() const {<br>
if (const BasicBlock *LBB = getBasicBlock())<br>
<br></div>
Modified: llvm/trunk/lib/CodeGen/__<u></u>MachineFunction.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/MachineFunction.cpp?__rev=163339&r1=163338&r2=__163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/MachineFunction.cpp?__<u></u>rev=163339&r1=163338&r2=__<u></u>163339&view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/MachineFunction.cpp?<u></u>rev=163339&r1=163338&r2=<u></u>163339&view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>MachineFunction.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>MachineFunction.cpp Thu Sep 6 14:06:06 2012<div class="im"><br>
@@ -284,9 +284,11 @@<br>
return std::make_pair(Result, Result + Num);<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void MachineFunction::dump() const {<br>
print(dbgs());<br>
}<br>
+#endif<br>
<br>
StringRef MachineFunction::getName() const {<br>
assert(getFunction() && "No function!");<br>
@@ -532,9 +534,11 @@<br>
}<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void MachineFrameInfo::dump(const MachineFunction &MF) const {<br>
print(MF, dbgs());<br>
}<br>
+#endif<br>
<br>
<br></div>
//===-------------------------<u></u>__----------------------------<u></u>--__---------------===//<div class="im"><br>
// MachineJumpTableInfo implementation<br>
@@ -629,7 +633,9 @@<br>
OS << '\n';<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void MachineJumpTableInfo::dump() const { print(dbgs()); }<br>
+#endif<br>
<br>
<br>
<br></div>
//===-------------------------<u></u>__----------------------------<u></u>--__---------------===//<div class="im"><br>
@@ -762,4 +768,6 @@<br>
}<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void MachineConstantPool::dump() const { print(dbgs()); }<br>
+#endif<br>
<br></div>
Modified: llvm/trunk/lib/CodeGen/__<u></u>MachineInstr.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/MachineInstr.cpp?rev=__163339&r1=163338&r2=163339&__view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/MachineInstr.cpp?rev=_<u></u>_163339&r1=163338&r2=163339&__<u></u>view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/MachineInstr.cpp?rev=<u></u>163339&r1=163338&r2=163339&<u></u>view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>MachineInstr.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>MachineInstr.cpp Thu Sep 6 14:06:06 2012<div class="im"><br>
@@ -1496,7 +1496,9 @@<br>
}<br>
<br>
void MachineInstr::dump() const {<br>
+#ifndef NDEBUG<br>
dbgs() << " " << *this;<br>
+#endif<br>
}<br>
<br>
static void printDebugLoc(DebugLoc DL, const MachineFunction *MF,<br>
<br></div>
Modified: llvm/trunk/lib/CodeGen/__<u></u>MachineLoopInfo.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/MachineLoopInfo.cpp?__rev=163339&r1=163338&r2=__163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/MachineLoopInfo.cpp?__<u></u>rev=163339&r1=163338&r2=__<u></u>163339&view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLoopInfo.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/MachineLoopInfo.cpp?<u></u>rev=163339&r1=163338&r2=<u></u>163339&view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>MachineLoopInfo.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>MachineLoopInfo.cpp Thu Sep 6 14:06:06 2012<div class="im"><br>
@@ -74,6 +74,8 @@<br>
return BotMBB;<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void MachineLoop::dump() const {<br>
print(dbgs());<br>
}<br>
+#endif<br>
<br></div>
Modified: llvm/trunk/lib/CodeGen/__<u></u>MachineScheduler.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/MachineScheduler.cpp?__rev=163339&r1=163338&r2=__163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/MachineScheduler.cpp?_<u></u>_rev=163339&r1=163338&r2=__<u></u>163339&view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/MachineScheduler.cpp?<u></u>rev=163339&r1=163338&r2=<u></u>163339&view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>MachineScheduler.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>MachineScheduler.cpp Thu Sep 6 14:06:06 2012<div class="im"><br>
@@ -764,12 +764,14 @@<br>
Queue.pop_back();<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void dump() {<br>
dbgs() << Name << ": ";<br>
for (unsigned i = 0, e = Queue.size(); i < e; ++i)<br>
dbgs() << Queue[i]->NodeNum << " ";<br>
dbgs() << "\n";<br>
}<br>
+#endif<br>
};<br>
<br>
/// ConvergingScheduler shrinks the unscheduled zone using heuristics<br>
to balance<br>
<br></div>
Modified: llvm/trunk/lib/CodeGen/__<u></u>PostRASchedulerList.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/PostRASchedulerList.__cpp?rev=163339&r1=163338&r2=__163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/PostRASchedulerList.__<u></u>cpp?rev=163339&r1=163338&r2=__<u></u>163339&view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/PostRASchedulerList.<u></u>cpp?rev=163339&r1=163338&r2=<u></u>163339&view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>PostRASchedulerList.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>PostRASchedulerList.cpp Thu Sep 6 14:06:06<div class="im"><br>
2012<br>
@@ -240,6 +240,7 @@<br></div>
ScheduleDAGInstrs::exitRegion(<u></u>__);<div class="im"><br>
}<br>
<br>
+#ifndef NDEBUG<br>
/// dumpSchedule - dump the scheduled Sequence.<br></div>
void SchedulePostRATDList::__<u></u>dumpSchedule() const {<div class="im"><br>
for (unsigned i = 0, e = Sequence.size(); i != e; i++) {<br>
@@ -249,6 +250,7 @@<br>
dbgs() << "**** NOOP ****\n";<br>
}<br>
}<br>
+#endif<br>
<br></div>
bool PostRAScheduler::__<u></u>runOnMachineFunction(__<u></u>MachineFunction &Fn) {<br>
TII = Fn.getTarget().getInstrInfo();<br>
<br>
Modified: llvm/trunk/lib/CodeGen/__<u></u>RegisterPressure.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/RegisterPressure.cpp?__rev=163339&r1=163338&r2=__163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/RegisterPressure.cpp?_<u></u>_rev=163339&r1=163338&r2=__<u></u>163339&view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterPressure.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/RegisterPressure.cpp?<u></u>rev=163339&r1=163338&r2=<u></u>163339&view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>RegisterPressure.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>RegisterPressure.cpp Thu Sep 6 14:06:06 2012<br>
@@ -63,6 +63,7 @@<br>
decreaseSetPressure(__<u></u>MaxSetPressure, RC, TRI);<div class="im"><br>
}<br>
<br>
+#ifndef NDEBUG<br>
void RegisterPressure::dump(const TargetRegisterInfo *TRI) {<br>
dbgs() << "Live In: ";<br>
for (unsigned i = 0, e = LiveInRegs.size(); i < e; ++i)<br>
@@ -78,6 +79,7 @@<br>
<< '\n';<br>
}<br>
}<br>
+#endif<br>
<br>
/// Increase the current pressure as impacted by these physical<br>
registers and<br>
/// bump the high water mark if needed.<br>
<br></div>
Modified: llvm/trunk/lib/CodeGen/__<u></u>ScheduleDAG.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/ScheduleDAG.cpp?rev=__163339&r1=163338&r2=163339&__view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/ScheduleDAG.cpp?rev=__<u></u>163339&r1=163338&r2=163339&__<u></u>view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAG.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/ScheduleDAG.cpp?rev=<u></u>163339&r1=163338&r2=163339&<u></u>view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>ScheduleDAG.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>ScheduleDAG.cpp Thu Sep 6 14:06:06 2012<div class="im"><br>
@@ -279,6 +279,7 @@<br>
} while (!WorkList.empty());<br>
}<br>
<br>
+#ifndef NDEBUG<br>
/// SUnit - Scheduling unit. It's an wrapper around either a single<br>
SDNode or<br>
/// a group of nodes flagged together.<br>
void SUnit::dump(const ScheduleDAG *G) const {<br>
@@ -336,6 +337,7 @@<br>
}<br>
dbgs() << "\n";<br>
}<br>
+#endif<br>
<br>
#ifndef NDEBUG<br>
/// VerifyScheduledDAG - Verify that all SUnits were scheduled and that<br>
<br></div>
Modified: llvm/trunk/lib/CodeGen/__<u></u>ScheduleDAGInstrs.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/ScheduleDAGInstrs.cpp?__rev=163339&r1=163338&r2=__163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/ScheduleDAGInstrs.cpp?<u></u>__rev=163339&r1=163338&r2=__<u></u>163339&view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/ScheduleDAGInstrs.cpp?<u></u>rev=163339&r1=163338&r2=<u></u>163339&view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>ScheduleDAGInstrs.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>ScheduleDAGInstrs.cpp Thu Sep 6 14:06:06 2012<br>
@@ -1012,7 +1012,9 @@<br>
}<br>
<br>
void ScheduleDAGInstrs::dumpNode(__<u></u>const SUnit *SU) const {<div class="im"><br>
+#ifndef NDEBUG<br>
SU->getInstr()->dump();<br>
+#endif<br>
}<br>
<br></div>
std::string ScheduleDAGInstrs::__<u></u>getGraphNodeLabel(const SUnit *SU)<br>
const {<br>
<br>
Modified: llvm/trunk/lib/CodeGen/__<u></u>ScoreboardHazardRecognizer.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/__ScoreboardHazardRecognizer.__cpp?rev=163339&r1=163338&r2=__163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/__<u></u>ScoreboardHazardRecognizer.__<u></u>cpp?rev=163339&r1=163338&r2=__<u></u>163339&view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScoreboardHazardRecognizer.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/<u></u>ScoreboardHazardRecognizer.<u></u>cpp?rev=163339&r1=163338&r2=<u></u>163339&view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>ScoreboardHazardRecognizer.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>ScoreboardHazardRecognizer.cpp Thu Sep 6<div class="im"><br>
14:06:06 2012<br>
@@ -89,6 +89,7 @@<br>
ReservedScoreboard.reset();<br>
}<br>
<br>
+#ifndef NDEBUG<br></div>
void ScoreboardHazardRecognizer::__<u></u>Scoreboard::dump() const {<div class="im"><br>
dbgs() << "Scoreboard:\n";<br>
<br>
@@ -104,6 +105,7 @@<br>
dbgs() << '\n';<br>
}<br>
}<br>
+#endif<br>
<br></div>
bool ScoreboardHazardRecognizer::__<u></u>atIssueLimit() const {<br>
if (IssueWidth == 0)<br>
<br>
Modified: llvm/trunk/lib/CodeGen/__<u></u>SelectionDAG/__<u></u>ScheduleDAGRRList.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/SelectionDAG/__ScheduleDAGRRList.cpp?rev=__163339&r1=163338&r2=163339&__view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/SelectionDAG/__<u></u>ScheduleDAGRRList.cpp?rev=__<u></u>163339&r1=163338&r2=163339&__<u></u>view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/SelectionDAG/<u></u>ScheduleDAGRRList.cpp?rev=<u></u>163339&r1=163338&r2=163339&<u></u>view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>SelectionDAG/__<u></u>ScheduleDAGRRList.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>SelectionDAG/__<u></u>ScheduleDAGRRList.cpp Thu<div class="im"><br>
Sep 6 14:06:06 2012<br>
@@ -1758,6 +1758,7 @@<br>
return V;<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void dump(ScheduleDAG *DAG) const {<br>
// Emulate pop() without clobbering NodeQueueIds.<br>
std::vector<SUnit*> DumpQueue = Queue;<br>
@@ -1768,6 +1769,7 @@<br>
SU->dump(DAG);<br>
}<br>
}<br>
+#endif<br>
};<br>
<br></div>
typedef RegReductionPriorityQueue<bu__<u></u>_ls_rr_sort><br>
@@ -1895,6 +1897,7 @@<br>
<br>
//===-------------------------<u></u>__----------------------------<u></u>--__---------------===//<br>
<br>
void RegReductionPQBase::__<u></u>dumpRegPressure() const {<br>
+#ifndef NDEBUG<br>
for (TargetRegisterInfo::regclass_<u></u>__iterator I = TRI->regclass_begin(),<div class="im"><br>
E = TRI->regclass_end(); I != E; ++I) {<br>
const TargetRegisterClass *RC = *I;<br>
@@ -1904,6 +1907,7 @@<br>
DEBUG(dbgs() << RC->getName() << ": " << RP << " / " << RegLimit[Id]<br>
<< '\n');<br>
}<br>
+#endif<br>
}<br>
<br></div>
bool RegReductionPQBase::__<u></u>HighRegPressure(const SUnit *SU) const {<br>
<br>
Modified: llvm/trunk/lib/CodeGen/__<u></u>SelectionDAG/__<u></u>ScheduleDAGSDNodes.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/SelectionDAG/__ScheduleDAGSDNodes.cpp?rev=__163339&r1=163338&r2=163339&__view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/SelectionDAG/__<u></u>ScheduleDAGSDNodes.cpp?rev=__<u></u>163339&r1=163338&r2=163339&__<u></u>view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/SelectionDAG/<u></u>ScheduleDAGSDNodes.cpp?rev=<u></u>163339&r1=163338&r2=163339&<u></u>view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>SelectionDAG/__<u></u>ScheduleDAGSDNodes.cpp<br>
(original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>SelectionDAG/__<u></u>ScheduleDAGSDNodes.cpp Thu<div class="im"><br>
Sep 6 14:06:06 2012<br>
@@ -643,6 +643,7 @@<br>
}<br>
<br></div>
void ScheduleDAGSDNodes::dumpNode(_<u></u>_const SUnit *SU) const {<div class="im"><br>
+#ifndef NDEBUG<br>
if (!SU->getNode()) {<br>
dbgs() << "PHYS REG COPY\n";<br>
return;<br>
@@ -659,8 +660,10 @@<br>
dbgs() << "\n";<br>
GluedNodes.pop_back();<br>
}<br>
+#endif<br>
}<br>
<br>
+#ifndef NDEBUG<br></div>
void ScheduleDAGSDNodes::__<u></u>dumpSchedule() const {<div class="im"><br>
for (unsigned i = 0, e = Sequence.size(); i != e; i++) {<br>
if (SUnit *SU = Sequence[i])<br>
@@ -669,6 +672,7 @@<br>
dbgs() << "**** NOOP ****\n";<br>
}<br>
}<br>
+#endif<br>
<br>
#ifndef NDEBUG<br>
/// VerifyScheduledSequence - Verify that all SUnits were scheduled<br>
and that<br>
<br></div>
Modified: llvm/trunk/lib/CodeGen/__<u></u>SlotIndexes.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/SlotIndexes.cpp?rev=__163339&r1=163338&r2=163339&__view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/SlotIndexes.cpp?rev=__<u></u>163339&r1=163338&r2=163339&__<u></u>view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SlotIndexes.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/SlotIndexes.cpp?rev=<u></u>163339&r1=163338&r2=163339&<u></u>view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>SlotIndexes.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>SlotIndexes.cpp Thu Sep 6 14:06:06 2012<div class="im"><br>
@@ -143,6 +143,7 @@<br>
}<br>
<br>
<br>
+#ifndef NDEBUG<br>
void SlotIndexes::dump() const {<br>
for (IndexList::const_iterator itr = indexList.begin();<br>
itr != indexList.end(); ++itr) {<br>
@@ -159,6 +160,7 @@<br>
dbgs() << "BB#" << i << "\t[" << MBBRanges[i].first << ';'<br>
<< MBBRanges[i].second << ")\n";<br>
}<br>
+#endif<br>
<br>
// Print a SlotIndex to a raw_ostream.<br>
void SlotIndex::print(raw_ostream &os) const {<br>
@@ -168,9 +170,11 @@<br>
os << "invalid";<br>
}<br>
<br>
+#ifndef NDEBUG<br>
// Dump a SlotIndex to stderr.<br>
void SlotIndex::dump() const {<br>
print(dbgs());<br>
dbgs() << "\n";<br>
}<br>
+#endif<br>
<br>
<br></div>
Modified: llvm/trunk/lib/CodeGen/__<u></u>SplitKit.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/SplitKit.cpp?rev=__163339&r1=163338&r2=163339&__view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/SplitKit.cpp?rev=__<u></u>163339&r1=163338&r2=163339&__<u></u>view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/SplitKit.cpp?rev=<u></u>163339&r1=163338&r2=163339&<u></u>view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>SplitKit.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>SplitKit.cpp Thu Sep 6 14:06:06 2012<div class="im"><br>
@@ -356,6 +356,7 @@<br>
Edit->anyRematerializable(0);<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void SplitEditor::dump() const {<br>
if (RegAssign.empty()) {<br>
dbgs() << " empty\n";<br>
@@ -366,6 +367,7 @@<br>
dbgs() << " [" << I.start() << ';' << I.stop() << "):" << I.value();<br>
dbgs() << '\n';<br>
}<br>
+#endif<br>
<br></div>
VNInfo *SplitEditor::defValue(__<u></u>unsigned RegIdx,<br>
const VNInfo *ParentVNI,<br>
<br>
Modified: llvm/trunk/lib/CodeGen/__<u></u>VirtRegMap.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/__CodeGen/VirtRegMap.cpp?rev=__163339&r1=163338&r2=163339&__view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/__<u></u>CodeGen/VirtRegMap.cpp?rev=__<u></u>163339&r1=163338&r2=163339&__<u></u>view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegMap.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/<u></u>CodeGen/VirtRegMap.cpp?rev=<u></u>163339&r1=163338&r2=163339&<u></u>view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/CodeGen/__<u></u>VirtRegMap.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/__<u></u>VirtRegMap.cpp Thu Sep 6 14:06:06 2012<div class="im"><br>
@@ -126,9 +126,11 @@<br>
OS << '\n';<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void VirtRegMap::dump() const {<br>
print(dbgs());<br>
}<br>
+#endif<br>
<br>
<br></div>
//===-------------------------<u></u>__----------------------------<u></u>--__---------------===//<br>
// VirtRegRewriter<br>
<br>
Modified: llvm/trunk/lib/Target/X86/__<u></u>X86FloatingPoint.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/Target/__X86/X86FloatingPoint.cpp?rev=__163339&r1=163338&r2=163339&__view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/Target/<u></u>__X86/X86FloatingPoint.cpp?<u></u>rev=__163339&r1=163338&r2=<u></u>163339&__view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/Target/<u></u>X86/X86FloatingPoint.cpp?rev=<u></u>163339&r1=163338&r2=163339&<u></u>view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/Target/X86/__<u></u>X86FloatingPoint.cpp (original)<br>
+++ llvm/trunk/lib/Target/X86/__<u></u>X86FloatingPoint.cpp Thu Sep 6 14:06:06<div class="im"><br>
2012<br>
@@ -171,6 +171,7 @@<br>
// Shuffle live registers to match the expectations of successor<br>
blocks.<br>
void finishBlockStack();<br>
<br>
+#ifndef NDEBUG<br>
void dumpStack() const {<br>
dbgs() << "Stack contents:";<br>
for (unsigned i = 0; i != StackTop; ++i) {<br>
@@ -181,6 +182,7 @@<br>
dbgs() << ", ST" << i << " in FP" << unsigned(PendingST[i]);<br>
dbgs() << "\n";<br>
}<br>
+#endif<br>
<br>
/// getSlot - Return the stack slot number a particular register<br>
number is<br>
/// in.<br>
<br></div>
Modified: llvm/trunk/lib/Target/X86/__<u></u>X86ISelDAGToDAG.cpp<br>
URL:<br>
<a href="http://llvm.org/viewvc/llvm-__project/llvm/trunk/lib/Target/__X86/X86ISelDAGToDAG.cpp?rev=__163339&r1=163338&r2=163339&__view=diff" target="_blank">http://llvm.org/viewvc/llvm-__<u></u>project/llvm/trunk/lib/Target/<u></u>__X86/X86ISelDAGToDAG.cpp?rev=<u></u>__163339&r1=163338&r2=163339&_<u></u>_view=diff</a><br>
<<a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=163339&r1=163338&r2=163339&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/llvm/trunk/lib/Target/<u></u>X86/X86ISelDAGToDAG.cpp?rev=<u></u>163339&r1=163338&r2=163339&<u></u>view=diff</a>><br>
==============================<u></u>__============================<u></u>==__==================<br>
--- llvm/trunk/lib/Target/X86/__<u></u>X86ISelDAGToDAG.cpp (original)<br>
+++ llvm/trunk/lib/Target/X86/__<u></u>X86ISelDAGToDAG.cpp Thu Sep 6 14:06:06 2012<div class="im"><br>
@@ -100,6 +100,7 @@<br>
Base_Reg = Reg;<br>
}<br>
<br>
+#ifndef NDEBUG<br>
void dump() {<br>
dbgs() << "X86ISelAddressMode " << this << '\n';<br>
dbgs() << "Base_Reg ";<br>
@@ -133,6 +134,7 @@<br>
dbgs() << "nul";<br>
dbgs() << " JT" << JT << " Align" << Align << '\n';<br>
}<br>
+#endif<br>
};<br>
}<br>
<br>
<br>
<br></div>
______________________________<u></u>___________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a> <mailto:<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.<u></u>edu</a>><br>
<a href="http://lists.cs.uiuc.edu/__mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/__<u></u>mailman/listinfo/llvm-commits</a><br>
<<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a>><br>
<br>
<br>
______________________________<u></u>___________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a> <mailto:<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.<u></u>edu</a>><br>
<a href="http://lists.cs.uiuc.edu/__mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/__<u></u>mailman/listinfo/llvm-commits</a><br>
<<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a>><br>
<br>
<br>
<br><span class="HOEnZb"><font color="#888888">
<br>
--<br>
~Craig<br>
</font></span></blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>~Craig<br>