Re: Docs for allocation sinking optimization

  • From: Geoff Leyland <geoff_leyland@xxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 17 Jul 2012 07:55:43 +1200

On 17/07/2012, at 2:25 AM, Mike Pall wrote:

> Umm, no. The patch looked wrong, though. E.g. the ra_*() macros
> belong to the register allocator, not anywhere else. And IR() is
> for the current trace, not for the trace handled by snapshot
> restore or replay.

I had those more or less covered by "obvious flaws" - no doubt there are more.  
I'll keep chipping away, but I'm out of time for the moment.

> Anyway, the more important thing would be to find out if sinking
> these operations is actually beneficial for any realistic example.

Would it be interesting to ask "How many of the values restored/replayed at 
trace exit are unused on-trace, and what operation produced those values?".  I 
think lj_snap could be instrumented to count values restored from spill rather 
than from registers, but that's not really answering the same question.  Is 
there a good place to discriminate between use of a value for an exit and for, 
well, actual use?

Other related posts: