Paolo Bonzini - [PATCH] delete (almost) last use of LABEL_REFS (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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] |
- From: Paolo Bonzini
- To: GCC Patches
- Date: Fri, 16 Feb 2007 17:38:39 +0100
- Subject: [PATCH] delete (almost) last use of LABEL_REFS
While it is not so beneficial to remove a field from CODE_LABEL, this still removes the last use of LABEL_REFS in non-backend code. Now the last user is SH, but I don't have time to look into it.The usage was introduced in http://gcc.gnu.org/ml/gcc-patches/1998-09/msg00050.html (nine years) and disabled pretty soon after its checkin (could not find the posting for this one).Just for extra safety, this does not affect SH as SH is not a CC0 target, and this patch is only for CC0 targets. Tested by building m68k-elf.Ok for mainline?Paolo
2007-02-17 Paolo Bonzini bonzini@gnu.org
* final.c (final): Remove code to set LABEL_REFS.
(final_scan_insn): Remove disabled code.
Index: gcc-test-df/base-gcc-src/gcc/final.c
--- gcc-test-df/base-gcc-src/gcc/final.c (revision 122035) +++ gcc-test-df/base-gcc-src/gcc/final.c (working copy) @@ -1573,22 +1573,8 @@ final (rtx first, FILE file, int optimi #endif for (insn = first; insn; insn = NEXT_INSN (insn)) - { - if (INSN_UID (insn) > max_uid) / Find largest UID. / - max_uid = INSN_UID (insn); -#ifdef HAVE_cc0 - / If CC tracking across branches is enabled, record the insn which - jumps to each branch only reached from one place. / - if (optimize && JUMP_P (insn)) - { - rtx lab = JUMP_LABEL (insn); - if (lab && LABEL_NUSES (lab) == 1) - { - LABEL_REFS (lab) = insn; - } - } -#endif - } + if (INSN_UID (insn) > max_uid) / Find largest UID. */ + max_uid = INSN_UID (insn); init_recog (); @@ -1859,30 +1845,6 @@ final_scan_insn (rtx insn, FILE file, i } #ifdef HAVE_cc0 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] |