summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-02-24 05:44:18 +0000
committerOwen Anderson <resistor@mac.com>2009-02-24 05:44:18 +0000
commit0fb12efbc11ebe36399489ead5fc8665a1799de6 (patch)
tree35cf9a9c724866671b6c91b07e741e1bcd47fb1d /llvm/lib/CodeGen
parent59da739613234ed71b3273ba28a09f79e0adc456 (diff)
downloadbcm5719-llvm-0fb12efbc11ebe36399489ead5fc8665a1799de6.tar.gz
bcm5719-llvm-0fb12efbc11ebe36399489ead5fc8665a1799de6.zip
Add a debugging option for SSC DCE.
llvm-svn: 65375
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/StackSlotColoring.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/StackSlotColoring.cpp b/llvm/lib/CodeGen/StackSlotColoring.cpp
index 39b0c59a1bf..60b8fad9dfd 100644
--- a/llvm/lib/CodeGen/StackSlotColoring.cpp
+++ b/llvm/lib/CodeGen/StackSlotColoring.cpp
@@ -37,6 +37,8 @@ EnableDCE("enable-ssc-dce",
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 @@ bool StackSlotColoring::removeDeadStores(MachineBasicBlock* MBB) {
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;
OpenPOWER on IntegriCloud