Re: Docs for allocation sinking optimization

  • From: Mike Pall <mike-1207@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 18 Jul 2012 01:31:34 +0200

Geoff Leyland wrote:
> On 17/07/2012, at 2:25 AM, Mike Pall wrote:
> > 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?

More interesting is whether the change would enable more
allocations to be sunk or not. I'm not too worried about the
simple add/sub operations themselves. E.g. (untested):
  luajit -jdump=i script.lua | egrep -c "}.*(TNEW|TDUP|CNEW|CNEWI)"
with/without the patch.


Other related posts: