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]

Re: [patch] Use NOTE_P, CALL_P, etc. instead of GET_CODE in a bunch of files


On Fri, Mar 22, 2013 at 8:09 PM, Steven Bosscher wrote:
> Hello,
>
> 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
> comments/objections?

FWIW, the only other instance where the silly script triggers (apart
from a few wrong INSN_LIST changes) is in mmix.c:

Index: config/mmix/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);
          return;


It looks like the gcc/ directory was already completely converted to
the _P idiom.

Ciao!
Steven


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