https://codereview.chromium.org/11437015/diff/1/src/lithium-allocator.cc File src/lithium-allocator.cc (right):
https://codereview.chromium.org/11437015/diff/1/src/lithium-allocator.cc#newcode1956 src/lithium-allocator.cc:1956: loop_header->first_instruction_index()); On 2013/01/07 06:42:25, Vyacheslav Egorov (Google) wrote:
On 2013/01/02 17:35:14, danno wrote: > Don't you want last_instruction_index() in case the loop header
itself
contains > uses?
Not sure I understand. If I make it last_instruction_index then I'll
miss those
uses. NextUsePositionRegisterIsBeneficial is searching forward.
Maybe I'm just confused. My thought was that you want to split at the latest possible point before entering the loop (i.e. at the very end of the loop header at last_instruction). If you split earlier than that (e.g. at the very beginning at first_instruction), then if there is a use in the header later than that point, then range->NextUsePositionRegisterIsBeneficial(pos) will return non-NULL and the split won't be hoisted, even though it would have been a beneficial hoist at the end of loop_header (last_instruction), at which position NextUsePositionRegisterIsBeneficial of that position would return NULL. Does that make sense? https://codereview.chromium.org/11437015/diff/1/src/lithium-allocator.cc#newcode1983 src/lithium-allocator.cc:1983: SpillAfter(range, split_pos); Ah, I see. Got it. On 2013/01/07 06:42:25, Vyacheslav Egorov (Google) wrote:
I don't think it applies here (or below): the loop is either
completely in the
lifetime hole or not at all.
On 2013/01/02 17:35:14, danno wrote: > Same applies here, doesn't it, or am I confused? Even if the range
is
inactive, > it's still not a good idea to put the spill in a loop if it can be
avoided. https://codereview.chromium.org/11437015/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
