On 2014/06/03 08:27:25, Alexandre Rames wrote:
On 2014/06/03 08:01:16, danno wrote:
> Actually, the right thing to do is to treat constants as normal values and
teach
> the register allocator how to split constant ranges and rematerialize on
demand
> without spilling. This is something that Jaro and Benedikt have thought
about
> recently, and I think this is generally a cleaner way to approach the
problem
> than the ad-hoc "EmitAsUses" approach which is just a brittle heuristic.

I did a bit of work on this as a follow-up for this patch:
I augmented lithium instructions with a method indicating if it was better to
regenerate the value (re-visit the instruction) instead of spilling and
restoring it. LiveRanges and LOperands kept track of which lithium instruction
output they referred to. The gap resolver skips spilling moves when
appropriate,
and instead of moving from the stack re-visits the lithium instruction.
I think there is some more work to do around that, but if you are interested I
could upload this so you can have a look.

Yes, it would be great if you could share your work. (I am currently working on
a different optimisation in the register allocator, but I was thinking about
doing the rematerialization, too.)

https://codereview.chromium.org/308313002/

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to