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: Speedup CSE by 5%


On Mon, 17 Jan 2005, Jeffrey A Law wrote:

> > If by "inlining for_each_rtx" you include the constant propagation that avoids
> > the indirect function call to approx_reg_cost_1, then probably yes.
> Well, if avoiding the indirection is a significant component (or the
> major component), then another possibility we could look into would be
> turning for_each_rtx into an inline function itself.
> 
> That wouldn't get all the specializations you're doing and could 
> potentially have bad icache effects.  But it would have the positive
> effect that everyone using for_each_rtx would avoid the indirect call
> overhead.

Again, I don't see how this works with for_each_rtx being a recursive
function. I think all you could achieve is to get rid of the indirect
function call on the first recursion level.

Profile numbers (for lpgparse.i) also show that the majority of calls to
for_each_rtx come from for_each_rtx itself, so that just optimizing the
first recursion level at the cost of I-cache seems hardly worth it.

Arend



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