On Jan 19, 2015, Maxim Kuvyrkov <maxim.kuvyr...@linaro.org> wrote:

> Presence or absence of DEBUG_INSNs in the ready list can change the
> comparison order, and cause slightly different instruction schedules.

> The solution that I propose (and that the patch implements) is to sort
> DEBUG_INSNs separately from normal insns.  If DEBUG_INSNs are present
> in the ready_list, sort the DEBUG_INSNs only among themselves, while
> preserving order of the normal insns.  Once there are no DEBUG_INSNs
> in the ready list, sort using the rank_for_schedule heuristic, just as
> when we would when compiling without debug info.

I like that.  Thanks!

I wonder if it having a separate ready list for debug insns would make
things simpler.  In general, you shouldn't have to sort debug insns at
all, since they're not supposed to be reordered in the first place, but
keeping them separate would presumably avoid differences in sorting of
the non-debug ready list.

This is not so different from what you do, though; it just requires
different bookkeeping.

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer

Reply via email to