Closed Bug 1313036 Opened 8 years ago Closed 8 years ago

Eliminate unnecessary LoadUnboxedExpando

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
LoadUnboxedExpando is redundant with the GuardAndLoadUnboxedExpando we emit first. I was aware of this when I added LoadUnboxedExpando but decided to match what the Ion ICs do (they have a similar issue). It's easy to fix for CacheIR though: we can simply return the expandoId from TestMatchingReceiver and reuse that.

I confirmed this eliminates a load on x86 and x64.
Attachment #8804623 - Flags: review?(hv1989)
Comment on attachment 8804623 [details] [diff] [review]
Patch

Review of attachment 8804623 [details] [diff] [review]:
-----------------------------------------------------------------

Glad it works out! Nice removal with perf benefits :D

::: js/src/jit/BaselineInspector.cpp
@@ +112,5 @@
>      // We match either:
>      //
>      //   GuardIsObject 0
>      //   GuardShape 0
> +    //   LoadFixedSlotResult 0 or LoadDynamicSlotResult 0

Nice
Attachment #8804623 - Flags: review?(hv1989) → review+
I assume this depends on the other CacheIR bug. Therefore marking it as P2. I'll review the other bug today again.
Priority: -- → P2
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f3b662e19b24
Remove unnecessary LoadUnboxedExpando. r=h4writer
https://hg.mozilla.org/mozilla-central/rev/f3b662e19b24
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.