This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Use NOTE_P, CALL_P, etc. instead of GET_CODE in a bunch of files
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 23 Mar 2013 01:44:57 +0100
- Subject: Re: [patch] Use NOTE_P, CALL_P, etc. instead of GET_CODE in a bunch of files
- References: <CABu31nPbL0CuoAuhze=Eayqpm23j+Uk+r67EAh_yN0DjdjF5OQ at mail dot gmail dot com>
On Fri, Mar 22, 2013 at 8:09 PM, Steven Bosscher wrote:
> This is an almost completely mechanical replacement of GET_CODE(thing)
> == ... with the equivalent predicate macro from rtl.h. This particular
> set of files fell victim to my plans for GCC 4.9 to make
> JUMP_TABLE_DATA_P a separate rtx instead of a JUMP_INSN. The script I
> used is in the patch. I checked and cleaned up the changes by hand and
> modified a few places by hand.
> Bootstrapped&tested on powerpc64-unknown-linux-gnu and on
> ia64-unknown-linux-gnu. Also did a quick cross to a few of the
> affected ports (sparc, bfin).
> OK for trunk?
> Can I please have pre-approval for similar changes to other files,
> subject to posting and waiting at least 2 days for
FWIW, the only other instance where the silly script triggers (apart
from a few wrong INSN_LIST changes) is in mmix.c:
--- config/mmix/mmix.c (revision 196975)
+++ config/mmix/mmix.c (working copy)
@@ -1728,7 +1728,7 @@ mmix_print_operand (FILE *stream, rtx x, int code)
if (CONSTANT_P (modified_x)
/* Strangely enough, this is not included in CONSTANT_P.
FIXME: Ask/check about sanity here. */
- || GET_CODE (modified_x) == CODE_LABEL)
+ || LABEL_P (modified_x))
output_addr_const (stream, modified_x);
It looks like the gcc/ directory was already completely converted to
the _P idiom.