Closed Bug 1324561 Opened 7 years ago Closed 4 years ago

Compile CacheIR to MIR


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




Performance Impact none


(Reporter: jandem, Unassigned)


(Blocks 3 open bugs)


(Keywords: perf)

In IonBuilder, when we see a Baseline IC has a single stub (and no had-unoptimizable flag), we can take its ICStub + CacheIR code and inline it by compiling it to MIR instructions.

Many CacheIR ops correspond to a single MIR instruction. The nice thing is that we will be in IonBuilder, so we can use TI to improve things over what the ICs do, for instance it will be easy to eliminate GuardIsObject, GuardGroup, GuardProto etc in many cases (and then this would work for all ICs that use these ops).

This has some great benefits: when we want to optimize a particular case, we emit CacheIR for it, implement the ops in the IC + MIR backends (only if we need a new op), and then we have this optimization everywhere: Baseline ICs, Ion ICs, Ion inline paths with TI optimizations.

Once this works, we should be able to remove a bunch of code from IonBuilder/BaselineInspector. Maybe the code for getters/setters (we do some IR pattern matching for that atm) and maybe even some of the DOM optimizations.

I'm pretty excited about this, but converting the existing Baseline and Ion IC stubs is higher priority for me right now. Just filing this now in case someone else wants to work on it in the meantime.
Blocks: sm-js-perf
Keywords: perf

dupe of bug 1613592 ?

See Also: → WarpBuilder
Closed: 4 years ago
Resolution: --- → DUPLICATE
See Also: WarpBuilder
Performance Impact: --- → -
Whiteboard: [qf-]
You need to log in before you can comment on or make changes to this bug.