diff mbox

Use NOTE_P, CALL_P, etc. instead of GET_CODE in a bunch of files

Message ID CABu31nP2TG-VQ5pGh7x1nzNyT=+5Fn9xG2eqcE=ww7DQvARrsQ@mail.gmail.com
State New
Headers show

Commit Message

Steven Bosscher March 23, 2013, 12:44 a.m. UTC
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:



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

Ciao!
Steven

Comments

Jeff Law March 23, 2013, 1:57 a.m. UTC | #1
On 03/22/2013 06:44 PM, Steven Bosscher wrote:
> 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:
I'll pre-approve the mechanical replacements.

jeff
diff mbox

Patch

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;