This is the mail archive of the gcc@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: Inlining again...


On 7 May 2003, Steven Bosscher wrote:

> Op wo 07-05-2003, om 20:17 schreef Richard Guenther:
> > Note that I just checked and found that _still_ not all empty functions
> > are inlined... btw. how is the following counted insns wise?
> >
> > is in this case the size of foo counted with or without the code inside
> > the if statement?
>
> You can look at that in gdb:
>
> (gdb) b tree-inline.c:inlinable_function_p
>
> Then run for some time until you hit the breakpoint, and do:
>
> (gdb) p (fn->decl.u1.i * 10)
>
> That's your stmt count: 130 if you repace "some code" with "return;":
>
> template <bool f>
> struct blah {
> 	void foo() { if (f) { return; } }
> };
>
> void bar()
> {
> 	blah<false>().foo();
> }
>
> Yes. 130. I can only: ouch.

Ouch. I suppose this wont improve until we get at least, say, DCE at the
tree level? Dont we have something like that - I remember a patch during
the last month doing early DCE...

http://gcc.gnu.org/ml/gcc-patches/2003-03/msg02443.html

Roger - does this "help" insn counting for inlining or is this already too
late? Maybe we can even get this into 3.3.1 if it helps ... (I'll check it
out, if it applies to 3.3)

Richard.


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