Closed Bug 901273 Opened 9 years ago Closed 9 years ago

Reduce the size of IC calls

Categories

(Core :: JavaScript Engine, enhancement)

x86_64
All
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: sunfish, Assigned: sunfish)

Details

Attachments

(1 file)

IC calls are a common code sequence which currently look like this (on x64):

     movq  8(%rdi), %rdi  # 4 bytes
     callq *8(%rdi)       # 3 bytes

Those 8 offsets are to access the firstStub_ and stubCode_ members of ICEntry and ICStub, respectively. Reordering the members in those structs to put those fields at the beginning shortens this common sequence to this:

     movq  (%rdi), %rdi  # 3 bytes
     callq *(%rdi)       # 2 bytes
Attachment #785434 - Flags: review?(kvijayan)
Comment on attachment 785434 [details] [diff] [review]
optimize-call-ic.patch

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

Nice.
Attachment #785434 - Flags: review?(kvijayan) → review+
https://hg.mozilla.org/mozilla-central/rev/6231ff256efa
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.