C++ PATCH: Fix -O3

Daniel Berlin dan@www.cgsoftware.com
Thu May 3 22:50:00 GMT 2001


On Thu, 3 May 2001, Mark Mitchell wrote:

>
>
>   If the function we are considering inlining is too large, don't inline it
>   If the function we are considering inlining would make the number of
>   inlined insns over the course of entire compilation too large, don't
>   inline it.
>
> I agree that this would be wrong, but I don't think it behaves this
> way.  There's no global data here.
>
> The inline_data structure is reset at the beginning of
> the inlining pass for each function.
Whoops, you are correct.
my bad.

>
> You'll have to show an example.

I have one, i'll submit it to gcc-bugs after distilling it a bit, if
possible.
This just makes me wonder why it's happening.
It's certainly failing that particular test.

It's a bunch of small inline functions that stop getting inlined after a
certain point in the file (IE i could copy the function it was inlined
into earlier, paste it and rename it after this point in the file, and it
wouldn't generate the same code).

It's probably my fault, though. Knowing my luck, one of the other passes
i've been working on is overwriting the exact right spot in memory, or something
dumb and equally improbable.
I'll try it with a clean tree, and see what happens.

--Dan



More information about the Gcc mailing list