This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: FOR_EACH_RTX
- To: jh at suse dot cz
- Subject: Re: FOR_EACH_RTX
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Wed, 20 Sep 2000 19:55:31 -0700
- Cc: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com
- Organization: CodeSourcery, LLC
- References: <20000920214357.A28616@atrey.karlin.mff.cuni.cz>
>>>>> "Jan" == Jan Hubicka <jh@suse.cz> writes:
Jan> Hi This patch adds macro equivalent of for_each_rtx function.
Jan> It's advantage is the fact, that it is not recursive and
Jan> manage it's own stack instead, so it is usually faster and
Jan> allows you to drop in code directly, instead of writing
Jan> separate function and on i386 even usually results in shorter
Jan> code (that was quite surprise to me).
But it's ugly. :-(
The stack-based speedups you can gain simply by implementing that
approach, rather than recursion, in for_each_rtx. If you can measure
a noticable speedup, then that makes sense.
Then, make for_each_rtx inline if we're compiling with GCC (as in
stage2 and subsequent stages). Then, if the compiler doesn't do what
it should, improve the optimizers. :-)
I would much prefer this approach rather than the massive macro thing.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com