mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
Bug 1093674 - Disable Sink phase. r=jandem
This commit is contained in:
parent
9ffa252b52
commit
603f482db6
@ -1538,7 +1538,7 @@ OptimizeMIR(MIRGenerator *mir)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mir->optimizationInfo().sinkEnabled()) {
|
||||
{
|
||||
AutoTraceLog log(logger, TraceLogger::EliminateDeadCode);
|
||||
if (!Sink(mir, graph))
|
||||
return false;
|
||||
|
@ -82,7 +82,7 @@ JitOptions::JitOptions()
|
||||
SET_DEFAULT(disableRangeAnalysis, false);
|
||||
|
||||
// Toggles whether sink code motion is globally disabled.
|
||||
SET_DEFAULT(disableSink, false);
|
||||
SET_DEFAULT(disableSink, true);
|
||||
|
||||
// Toggles whether Loop Unrolling is globally disabled.
|
||||
SET_DEFAULT(disableLoopUnrolling, true);
|
||||
|
@ -46,6 +46,7 @@ bool
|
||||
Sink(MIRGenerator *mir, MIRGraph &graph)
|
||||
{
|
||||
TempAllocator &alloc = graph.alloc();
|
||||
bool sinkEnabled = mir->optimizationInfo().sinkEnabled();
|
||||
|
||||
for (PostorderIterator block = graph.poBegin(); block != graph.poEnd(); block++) {
|
||||
if (mir->shouldCancel("Sink"))
|
||||
@ -106,6 +107,13 @@ Sink(MIRGenerator *mir, MIRGraph &graph)
|
||||
continue;
|
||||
}
|
||||
|
||||
// This guard is temporarly moved here as the above code deals with
|
||||
// Dead Code elimination, which got moved into this Sink phase, as
|
||||
// the Dead Code elimination used to move instructions with no-live
|
||||
// uses to the bailout path.
|
||||
if (!sinkEnabled)
|
||||
continue;
|
||||
|
||||
// If all the uses are under a loop, we might not want to work
|
||||
// against LICM by moving everything back into the loop, but if the
|
||||
// loop is it-self inside an if, then we still want to move the
|
||||
|
@ -5808,7 +5808,7 @@ main(int argc, char **argv, char **envp)
|
||||
|| !op.addStringOption('\0', "ion-range-analysis", "on/off",
|
||||
"Range analysis (default: on, off to disable)")
|
||||
|| !op.addStringOption('\0', "ion-sink", "on/off",
|
||||
"Sink code motion (default: on, off to disable)")
|
||||
"Sink code motion (default: off, on to enable)")
|
||||
|| !op.addStringOption('\0', "ion-loop-unrolling", "on/off",
|
||||
"Loop unrolling (default: off, on to enable)")
|
||||
|| !op.addBoolOption('\0', "ion-check-range-analysis",
|
||||
|
Loading…
x
Reference in New Issue
Block a user