[llvm-commits] [llvm] r65375 - /llvm/trunk/lib/CodeGen/StackSlotColoring.cpp
Owen Anderson
resistor at mac.com
Mon Feb 23 21:44:19 PST 2009
Author: resistor
Date: Mon Feb 23 23:44:18 2009
New Revision: 65375
URL: http://llvm.org/viewvc/llvm-project?rev=65375&view=rev
Log:
Add a debugging option for SSC DCE.
Modified:
llvm/trunk/lib/CodeGen/StackSlotColoring.cpp
Modified: llvm/trunk/lib/CodeGen/StackSlotColoring.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackSlotColoring.cpp?rev=65375&r1=65374&r2=65375&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/StackSlotColoring.cpp (original)
+++ llvm/trunk/lib/CodeGen/StackSlotColoring.cpp Mon Feb 23 23:44:18 2009
@@ -37,6 +37,8 @@
cl::init(false), cl::Hidden,
cl::desc("Enable slot coloring DCE"));
+static cl::opt<int> DCELimit("ssc-dce-limit", cl::init(-1), cl::Hidden);
+
STATISTIC(NumEliminated, "Number of stack slots eliminated due to coloring");
STATISTIC(NumDeadAccesses,
"Number of trivially dead stack accesses eliminated");
@@ -286,6 +288,9 @@
for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();
I != E; ++I) {
+ if (DCELimit != -1 && (int)NumDeadAccesses >= DCELimit)
+ break;
+
MachineBasicBlock::iterator NextMI = next(I);
if (NextMI == MBB->end()) continue;
More information about the llvm-commits
mailing list