Closed Bug 461205 Opened 16 years ago Closed 16 years ago

TM: make callee-save LIR_param use optional, optimize for both cases

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: graydon, Unassigned)

References

Details

Attachments

(1 file)

The tamarin-redux patches moved to a model of explicitly marking callee-saved registers using LIR_param instructions. This benefits small traces by permitting them to avoid extra save/restore traffic. In large traces -- or independently-compiled fragments patched together with LIR_x -- it is pessimistic, since the save and restore activity moves to *after* the patch entry point in the fragment, and we wind up pointlessly restoring and re-saving on every cross-fragment LIR_x.

This patch changes the default behavior back to the former mode of saving and restoring in the prologue / epilogue, but still permits callers to manually override this default by inserting LIR_params. When a callee-save LIR_param is inserted, the flag controlling this behavior is flipped and the bulk save/restore in the prologue/epilogue is omitted.

In other words, it's a "best of both worlds" patch that dynamically changes which mode it's using based on caller assumptions. Seems to work for me on x86. Will confirm on my arm simulator shortly. Meanwhile, opinions? I think this is about the best we can get.
Attachment #344336 - Flags: superreview?(edwsmith)
Attachment #344336 - Flags: review?(gal)
I like it. So we go back to LIR_x with this?
Also, what exactly is the difference between LIR_x and LIR_loop and could we get LIR_loop to work? Or delete it?
Attachment #344336 - Flags: superreview?(edwsmith)
Attachment #344336 - Flags: review?(gal)
Attachment #344336 - Flags: review?(edwsmith)
Attachment #344336 - Flags: review+
Attachment #344336 - Flags: review?(edwsmith) → review+
I think LIR_loop is dead now, its either handled by LIR_j or LIR_x with special handling for when we know we're jumping back to the current fragment.
Blocks: 461231
Pushed in revision c6a6e9883a06.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: