diff options
author | Owen Anderson <resistor@mac.com> | 2009-02-24 05:44:18 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-02-24 05:44:18 +0000 |
commit | 3d8bde8dfb2177dabbc6225a451889305d3756dd (patch) | |
tree | 4e843a33c7cac5030eabbc431e5d050a3e04c5ec /lib/CodeGen | |
parent | 5aa4977fba97e816b5735f0bc53f16a46b24de63 (diff) | |
download | external_llvm-3d8bde8dfb2177dabbc6225a451889305d3756dd.zip external_llvm-3d8bde8dfb2177dabbc6225a451889305d3756dd.tar.gz external_llvm-3d8bde8dfb2177dabbc6225a451889305d3756dd.tar.bz2 |
Add a debugging option for SSC DCE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/StackSlotColoring.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/StackSlotColoring.cpp b/lib/CodeGen/StackSlotColoring.cpp index 39b0c59..60b8fad 100644 --- a/lib/CodeGen/StackSlotColoring.cpp +++ b/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; |