This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Small emit-rtl.c / reorg.c cleanup
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 16 May 2013 13:55:43 +0200
- Subject: Re: [patch] Small emit-rtl.c / reorg.c cleanup
- References: <CABu31nOKsw=ZHnfwk+2EB+_79+QzmZgEb3yn8LGns7uAxLNcRw at mail dot gmail dot com>
Steven Bosscher <stevenb.gcc@gmail.com> writes:
> This just removes one unused function, and moves two functions from
> emit-rtl.c to reorg.c which is the only place where they're used.
>
> Will commit in a few days, barring objections.
>
> Ciao!
> Steven
>
>
> * rtl.h (next_label, skip_consecutive_labels, link_cc0_insns):
> Remove prototypes.
> * emit-rtl.c (next_label): Remove unused function.
> (skip_consecutive_labels, link_cc0_insns): Move to ...
> * reorg.c (skip_consecutive_labels, link_cc0_insns): ... here, the
> only place where these functions are used.
Unfortunately, this patch broke SPARC bootstrap since it lost the
HAVE_cc0 guard around link_cc0_insns:
/vol/gcc/src/hg/trunk/local/gcc/reorg.c:164:1: error: 'void link_cc0_insns(rtx)' defined but not used [-Werror=unused-function]
link_cc0_insns (rtx insn)
^
cc1plus: all warnings being treated as errors
make[3]: *** [reorg.o] Error 1
I'll install the obvious patch once testing on sparc-sun-solaris2.11 has
gotten into stage 3.
Rainer
2013-05-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* reorg.c (link_cc0_insns): Wrap in #ifdef HAVE_cc0.
# HG changeset patch
# Parent 4901ecbded49adb7097c93614fa708cb6cd53695
Restore bootstrap on non-cc0 targets
diff --git a/gcc/reorg.c b/gcc/reorg.c
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -157,6 +157,7 @@ skip_consecutive_labels (rtx label)
return label;
}
+#ifdef HAVE_cc0
/* INSN uses CC0 and is being moved into a delay slot. Set up REG_CC_SETTER
and REG_CC_USER notes so we can find it. */
@@ -171,6 +172,7 @@ link_cc0_insns (rtx insn)
add_reg_note (user, REG_CC_SETTER, insn);
add_reg_note (insn, REG_CC_USER, user);
}
+#endif
/* Insns which have delay slots that have not yet been filled. */
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University