Open Bug 1109195 Opened 10 years ago Updated 8 months ago

IonMonkey: Enable Sink by default.

Categories

(Core :: JavaScript Engine: JIT, defect, P5)

x86_64
Linux
defect

Tracking

()

People

(Reporter: nbp, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Fix all issues causing Sink to be a top-crasher.  In the mean time, this optimization can be tested by running the JS shell with --ion-sink=on.
Depends on: 1108413
Depends on: 1107886
Depends on: 1107011
Priority: -- → P5
Severity: normal → S3

Sink has been partially enabled since the creation of this bug. The Sink phase contains 2 parts, the first part analyze where instructions are consumed, while the second part decides how to modify these instructions.

Currently, we only modify instructions by flagging them as recovered as bailout if there is no consumer except ResumePoints.

What has been disabled in the end of 2014 is the ability to duplicate instructions in branches which are consuming these instructions while flagging existing instructions as being recovered on bailout.

Today, what is disable is the code which convert the following:

function titanic(a) {
  x = 1 + a;
  if (…) {
    print(x)
  } else {
    // does not use x.
  }
}

into:

function titanic(a) {
  // x = 1 + a; is flagged as RecoveredOnBailout.
  if (…) {
    x = 1 + a; // Cloned here
    print(x)
  } else {
    // does not use x.
  }
}

Iain, I will let you choose what to do with this bug. Either to drop it or to give it a chance.

Removing it would probably be as simple as trashing the following lines: https://searchfox.org/mozilla-central/source/js/src/jit/Sink.cpp#114-247

Blocks: sm-opt-jits
Severity: S3 → S4
Flags: needinfo?(iireland)

I think it's worth trying to get this working.

I'll test a local build with --ion-sink=on to see what fails. Once we're passing jit-tests, we can consider fuzzing it.

Flags: needinfo?(iireland)
You need to log in before you can comment on or make changes to this bug.