mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 02:16:46 +00:00
Add a debugging option for SSC DCE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5aa4977fba
commit
3d8bde8dfb
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user