This is the mail archive of the
mailing list for the GCC project.
Re: Use predicates for RTL objects
On Mon, Aug 05, 2019 at 12:48:46PM -0500, Segher Boessenkool wrote:
> Hi Arvind,
> First: do you have a copyright assignment? See
> for instructions.
Nope, is this really substantial enough to warrant one?
> This is easier to review, and even to commit as obvious, if you did a
> patch per macro, certainly for the new macros; and, put the script in
> contrib/, and then say with every patch that is just the output of the
> script that that is the case.
Ok, I can split it up that way.
> Some (mostly changelog) comments:
> On Mon, Aug 05, 2019 at 01:09:10PM -0400, Arvind Sankar wrote:
> > * gcc/alias.c, gcc/asan.c, gcc/bb-reorder.c, gcc/bt-load.c: Use predicate macros for rtx_code comparisons.
> Many of your changelog lines are much too long. Don't use more than 80
> columns (including the leading tab, which is 8 columns).
> Please mention the exact macros you now use, and/or the actual rtx codes.
That'll be easier once its split up by macro. I'll combine the backend +
target code into one patch per macro.
> Filenames are relative to the directory containing the changelog file
> itself, so you shouldn't have the gcc/ in those filenames.
> > * gcc/config/microblaze/predicates.md,
> There shouldn't be trailing spaces.
> > * gcc/config/rx/constraints.md, gcc/config/rx/rx.c, gcc/config/rx/rx.h: Likewise.
> And you normally have a separate entry for every file.
I tried to make the changelog a bit shorter by combining filenames into
the same line-- should be easier all around to generate that with one entry per file.
> > -/* Predicate yielding true iff X is an rtx for a double-int. */
> > +/* Predicate yielding true iff X is an rtx for a floating point constant. */
> > #define CONST_DOUBLE_AS_FLOAT_P(X) \
> > (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != VOIDmode)
> Is const_double really only used for floating point these days?
Are you asking if the CONST_DOUBLE_AS_INT_P possibility is dead code
now? That's beyond my current level of understanding of the code,
hopefully someone else will chime in.