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] Speed up for_each_rtx


Interesting approach.  Since non_rtx_starting_operands is in fact a
compile time constant, this suggests the approach of writing a genrtl
program which writes out an optimized for_each_rtx function.  The
optimized function would never call GET_RTX_FORMAT and would never
loop (except over vectors).  Instead it would switch on GET_CODE and
have direct calls for the operands specific to that code.

Thanks for the idea... Something to chew in 4.1 -- I won't hide that I'm more comfortable with the small rtlanal.c that is going in. Even though I liked the FOR_EACH_RTX syntax and idea, this approach also has the advantage of smaller code size.


Paolo


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