Message ID | CAFULd4ZBjrjUF6fdV_VNiV5DhmMS7w524of3DO8qy=6hvdKuyQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Mon, Jan 21, 2013 at 1:27 PM, Uros Bizjak <ubizjak@gmail.com> wrote: >> We should not update ticks of instructions, dependent on debug >> instruction. Without the patch, the scheduling order depends on the >> presence of debug instructions and leads to -fcompare-debug failures. > > Attached patch refines previous patch to reject only cases where > non-debug insns depend on debug instructions. We can still fix > inter-ticks of dependent debug insns, without affecting emitted > real-insn sequences. FTR, from offline discussion with Vlad, setting ticks of debug instructions is not necessary (and just wastes cycles), so I will commit version 1 of the patch. Uros.
Index: haifa-sched.c =================================================================== --- haifa-sched.c (revision 195330) +++ haifa-sched.c (working copy) @@ -3686,9 +3686,11 @@ fix_inter_tick (rtx head, rtx tail) FOR_EACH_DEP (head, SD_LIST_RES_FORW, sd_it, dep) { - rtx next; + rtx next = DEP_CON (dep); - next = DEP_CON (dep); + if (DEBUG_INSN_P (head) && !DEBUG_INSN_P (next)) + continue; + tick = INSN_TICK (next); if (tick != INVALID_TICK