This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Speed up for_each_rtx
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: Ian Lance Taylor <ian at airs dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 21 Jan 2005 10:23:13 +0100
- Subject: Re: [PATCH] Speed up for_each_rtx
- References: <41EFAC3B.email@example.com> <firstname.lastname@example.org>
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.