On Fri, Aug 02, 2019 at 01:38:21PM -0400, Arvind Sankar wrote:
> Hi, I have taken a crack at the beginner GCC project mentioned at
> https://gcc.gnu.org/projects/beginner.html to replace uses of GET_CODE
> to check rtx_code with the appropriate predicate macros.
> 
> Would someone be able to review/actually apply the changes if they look
> acceptable?
> 
> Most of the change is auto-generated using the enclosed script [1]. In
> addition I have added 3 new predicates to rtl.h: CONST_VECTOR_P,
> CONST_STRING_P and CONST_P. After the autogenned patch there is a small
> cleanup for a couple instances where the existing comparison is split
> across source lines and wasn't picked up by the script.

Thank you for doing this!

I don't think there should be a CONST_P like this, the name suggests
too much that the macro returns true for constants, which isn't what it
does (not in either direction; neither more or less than it).

It's worse than SET_P or PLUS_P would be even, imo.

Maybe you can put a script like this in contrib/ ?


Segher

Reply via email to