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]

Re: FOR_EACH_RTX


>>>>> "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

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