[PATCH] ignore DEBUG_INSN from shorten branches.

Hariharan hariharans@picochip.com
Thu Sep 10 08:40:00 GMT 2009


Hello,
I am attaching a small patch to ignore DEBUG_INSNs from 
shorten_branches. This seems to be a problem only for ports that call 
shorten_branches multiple times.

Okay to commit?

Thanks
Hari


ChangeLog:

* final.c (shorten_branches): Ignore DEBUG_INSNs.

Index: final.c
===================================================================
--- final.c     (revision 151579)
+++ final.c     (working copy)
@@ -1081,7 +1081,7 @@
      INSN_ADDRESSES (uid) = insn_current_address + insn_lengths[uid];


      if (NOTE_P (insn) || BARRIER_P (insn)
-         || LABEL_P (insn))
+         || LABEL_P (insn) || DEBUG_INSN_P(insn))
       continue;
      if (INSN_DELETED_P (insn))
       continue;



More information about the Gcc-patches mailing list