Re: *PING* Re: [PATCH] Fix handling of very long asm statements in inliner

2013-09-08 Thread Jan Hubicka
> Andi Kleen writes: > > Ping! > > This problem is still open, and afaik no better solution has been > proposed. It is also a regression. > > Is it ok to commit if I rerun the tests and they pass? OK. Honza

*PING* Re: [PATCH] Fix handling of very long asm statements in inliner

2013-09-08 Thread Andi Kleen
Andi Kleen writes: Ping! This problem is still open, and afaik no better solution has been proposed. It is also a regression. Is it ok to commit if I rerun the tests and they pass? > An auto generated program with a 6.4mio line asm statement gave > with 4.7 and 4.8: > > xxx.c:6400017:1: intern

Re: [PATCH] Fix handling of very long asm statements in inliner

2013-02-21 Thread Andi Kleen
On Thu, Feb 21, 2013 at 07:19:10PM +0100, Andi Kleen wrote: > > So I am fine with the cutoff. We may need to add more overflow guards (we > > already have quite few for time) that makes me wonder if all this should > > not be > > done all in saturating arithmetic now when it can be done theoretic

Re: [PATCH] Fix handling of very long asm statements in inliner

2013-02-21 Thread Richard Earnshaw
On 21/02/13 15:59, Andi Kleen wrote: That doesn't sound enough, unless there is already code out there that respects this count. 1000 at 4 bytes per instruction is only 4k. More that small enough for the rest of the compiler to think that it could jump around such blocks cheaply. I think a li

Re: [PATCH] Fix handling of very long asm statements in inliner

2013-02-21 Thread Andi Kleen
> So I am fine with the cutoff. We may need to add more overflow guards (we > already have quite few for time) that makes me wonder if all this should not > be > done all in saturating arithmetic now when it can be done theoretically with > one > C++ class? Sounds like a good idea, although I d

Re: [PATCH] Fix handling of very long asm statements in inliner

2013-02-21 Thread Jan Hubicka
> > This was not for jump shortening, but the inliner heuristics. > > > > In the worst case we could separate the two, would be a larger > > patch though. > > Actually it's already separated, I don't affect the jump shortening > at all. Only the inliner code adds the limit. > > So it would depen

Re: [PATCH] Fix handling of very long asm statements in inliner

2013-02-21 Thread Andi Kleen
> This was not for jump shortening, but the inliner heuristics. > > In the worst case we could separate the two, would be a larger > patch though. Actually it's already separated, I don't affect the jump shortening at all. Only the inliner code adds the limit. So it would depend whether 1000 * w

Re: [PATCH] Fix handling of very long asm statements in inliner

2013-02-21 Thread Andi Kleen
> That doesn't sound enough, unless there is already code out there > that respects this count. 1000 at 4 bytes per instruction is only > 4k. More that small enough for the rest of the compiler to think > that it could jump around such blocks cheaply. > > I think a limit of 1M or more might be

Re: [PATCH] Fix handling of very long asm statements in inliner

2013-02-21 Thread Richard Earnshaw
On 21/02/13 14:05, Andi Kleen wrote: An auto generated program with a 6.4mio line asm statement gave with 4.7 and 4.8: xxx.c:6400017:1: internal compiler error: in account_size_time, at ipa-inline-analysis.c:601 The problem is that the inliner counts the number of lines in the asm statement and

[PATCH] Fix handling of very long asm statements in inliner

2013-02-21 Thread Andi Kleen
An auto generated program with a 6.4mio line asm statement gave with 4.7 and 4.8: xxx.c:6400017:1: internal compiler error: in account_size_time, at ipa-inline-analysis.c:601 The problem is that the inliner counts the number of lines in the asm statement and multiplies that with a weight. With th