If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

eliminate fid in LirWriter pipeline, use CallInfo* directly

VERIFIED FIXED

Status

Tamarin
Baseline JIT (CodegenLIR)
VERIFIED FIXED
9 years ago
8 years ago

People

(Reporter: Edwin Smith, Assigned: Edwin Smith)

Tracking

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

9 years ago
Enables separation of concerns since no single function table is required by nanojit.
(Assignee)

Comment 1

9 years ago
Created attachment 343909 [details] [diff] [review]
Initial patch provided by Graydon
(Assignee)

Comment 2

9 years ago
Created attachment 343911 [details] [diff] [review]
Updated to build & pass tests

Original work by jorendorrf, updated to redux by Graydon.

Changes insCall() to use a CallInfo* and saves the CallInfo* in the LIR instruction stream, eliminating the need for a single shared table.  This is a bump in LIR code size but worth it, for the cleaner separation of concerns.

(if LIR code size increase is a problem, it can be mitigated by sharing callInfo struct pointers, thus shrinking the size of each reference closer to 1 byte). 

This also enables >256 unique functions to be used in a single LirBuffer
Assignee: nobody → edwsmith
Attachment #343909 - Attachment is obsolete: true
Attachment #343911 - Flags: review?(rreitmai)

Comment 3

9 years ago
Comment on attachment 343911 [details] [diff] [review]
Updated to build & pass tests

looks good.
Attachment #343911 - Flags: review?(rreitmai) → review+
(Assignee)

Comment 4

9 years ago
Created attachment 344413 [details] [diff] [review]
More cleanup; eliminate k_functions array and int fid entirely.

This is more cleanup, inspired by actually using the new decoupled callinfo in the armjit work.
Attachment #343911 - Attachment is obsolete: true
Attachment #344413 - Flags: review?(rreitmai)

Comment 5

9 years ago
Comment on attachment 344413 [details] [diff] [review]
More cleanup; eliminate k_functions array and int fid entirely.

Not an important point, but just curious if there was any space savings (loss?) with using non-table CallInfo entries.
Attachment #344413 - Flags: review?(rreitmai) → review+
(Assignee)

Comment 6

9 years ago
Yes, space loss of 4 (x64 needs 8) bytes per LIR_call.  The argc field is now redundant since you can get it from the CallInfo w/out knowing the table pointer, and the fid field is now unused.  So we could pack the first 2 arg references into those fields.  calls of 0,1,2 args are probably a majority, so we'd net out to zero if that was done.

Also, robarnold may modify the format to make the CallInfo* be in a separate LIR_int (const) instruction, which could then be shared, saving some space.

So i'm not that worried about the space increase for now.
(Assignee)

Comment 7

9 years ago
fixed a long time ago
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED

Updated

8 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.