This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why scheduler do not re-emit REG_DEAD notes?

On 09/07/2015 10:05 AM, Konstantin Vladimirov wrote:

In private backend for GCC 5.2.0, we do have target-specific scheduler
(running in TARGET_SCHED_FINISH hook), that do some instruction
packing/pairing on sched2 and relies on REG_DEAD notes, that should be

But they aren't because inside haifa-sched.c, that is being run first
in the sched2 pass, reemit_notes function processes only REG_SAVE_NOTE
case, and, after this scheduler, some insns with REG_DEAD on register,
say r1, might be moved before previous r1 usage (input dependency
case) and things become totally wrong.

Now I appllied some minimal patch locally to fix it (just added
separate REG_DEAD case).

But may be it is part of design and may be it is generally true, that
we can't rely on correct REG_DEAD notes in platform-specific
You can not rely on death notes within the scheduler. That's been in its design as long as I can remember (circa 1992).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]