This is the mail archive of the gcc-patches@gcc.gnu.org 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]

PATCH: remove if (0) code from final.c


While working in final.c, I discovered the following code, that was
disabled in 1998:

r22533 | jfc | 1998-09-22 03:21:44 +1000 (Tue, 22 Sep 1998) | 2 lines

        * final.c (final_scan_insn): Disable tracking CC across branches.

Okay to remove in mainline?
Ben


2008-03-29  Ben Elliston  <bje@au.ibm.com>

        * final.c (final_scan_insn): Remove if (0) code.

Index: final.c
===================================================================
--- final.c     (revision 133698)
+++ final.c     (working copy)
@@ -1980,28 +1980,6 @@ final_scan_insn (rtx insn, FILE *file, i
       CC_STATUS_INIT;
       /* If this label is reached from only one place, set the condition
         codes from the instruction just before the branch.  */
-
-      /* Disabled because some insns set cc_status in the C output code
-        and NOTICE_UPDATE_CC alone can set incorrect status.  */
-      if (0 /* optimize && LABEL_NUSES (insn) == 1*/)
-       {
-         rtx jump = LABEL_REFS (insn);
-         rtx barrier = prev_nonnote_insn (insn);
-         rtx prev;
-         /* If the LABEL_REFS field of this label has been set to point
-            at a branch, the predecessor of the branch is a regular
-            insn, and that branch is the only way to reach this label,
-            set the condition codes based on the branch and its
-            predecessor.  */
-         if (barrier && BARRIER_P (barrier)
-             && jump && JUMP_P (jump)
-             && (prev = prev_nonnote_insn (jump))
-             && NONJUMP_INSN_P (prev))
-           {
-             NOTICE_UPDATE_CC (PATTERN (prev), prev);
-             NOTICE_UPDATE_CC (PATTERN (jump), jump);
-           }
-       }
 #endif
 
       if (LABEL_NAME (insn))



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