Closed Bug 1639113 Opened 5 years ago Closed 5 years ago

Optimize Math.round in CacheIR and Warp

Categories

(Core :: JavaScript Engine: JIT, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

Based on the uses in Kraken, it seems we need to support:

  • number => int32
  • number => double (easy after bug 1638798)

Ion has optimized codegen for the first one, it would be nice to move that to the MacroAssembler and reuse it.

The reason for doing this is to ensure these float registers are available for the
Math instructions (Ion doesn't have a Call IC yet but that might change).

This found an actual bug with StoreTypedObjectScalarProperty, fixed by adding
FloatReg0 also as temp register for SetProp ICs (in addition to SetElem ICs).

Depends on D75957

Depends on D75958

Depends on D75959

Severity: normal → N/A
Priority: -- → P2
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/180e48bc3c41 part 1 - Add truncateDoubleToInt32/truncateFloat32ToInt32 to the MacroAssembler. r=evilpie https://hg.mozilla.org/integration/autoland/rev/bc823c0fd292 part 2 - Move LRound/LRoundF code to the MacroAssembler. r=evilpie https://hg.mozilla.org/integration/autoland/rev/c8cc2b355422 part 3 - Add AutoAvailableFloatRegister class to assert correct FloatRegister use. r=anba https://hg.mozilla.org/integration/autoland/rev/5aff4aae9701 part 4 - Optimize Math.round in CacheIR. r=evilpie https://hg.mozilla.org/integration/autoland/rev/b939cecf3fca part 5 - Transpile Math.round in Warp. r=evilpie
Blocks: 1641471
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: