Re: How to stop gcc from not calling noinline functions

2008-02-06 Thread Hans-Peter Nilsson
> Date: Wed, 06 Feb 2008 15:59:21 -0800 > From: Mark Mitchell <[EMAIL PROTECTED]> > Richard Guenther wrote: > > > You can apart from the other suggestions also mark the function weak > > which will prevent both inlining and pure/const analysis. > > How about just writing to a volatile variable f

Re: How to stop gcc from not calling noinline functions

2008-02-06 Thread Mark Mitchell
Richard Guenther wrote: You can apart from the other suggestions also mark the function weak which will prevent both inlining and pure/const analysis. How about just writing to a volatile variable from within the callee? void f() __attribute__((noinline)) { volatile int i; i = 3; } void

RE: How to stop gcc from not calling noinline functions

2008-01-14 Thread Dave Korn
On 14 January 2008 11:43, Hans-Peter Nilsson wrote: >> From: "Dave Korn" <[EMAIL PROTECTED]> >> Date: Mon, 14 Jan 2008 11:26:33 - > >> If you wanted to stick to standard C, you could surely force it with a >> call through function pointer, perhaps? (You might need to make it >> volatile to

Re: How to stop gcc from not calling noinline functions

2008-01-14 Thread Hans-Peter Nilsson
> From: "Dave Korn" <[EMAIL PROTECTED]> > Date: Mon, 14 Jan 2008 11:26:33 - > If you wanted to stick to standard C, you could surely force it with a call > through function pointer, perhaps? (You might need to make it volatile to > fool IPA.) No. No tricks in the calling function. To rei

Re: How to stop gcc from not calling noinline functions

2008-01-14 Thread Jan Hubicka
> On 14 January 2008 11:03, Hans-Peter Nilsson wrote: > > >> Date: Sat, 12 Jan 2008 11:16:23 +0100 > >> From: Paolo Bonzini <[EMAIL PROTECTED]> > > > >>> (Yeah, new attributes "impure" and/or "nonconst" would solve > >>> this, but only for IPA and there's already the existing option > >>> and asm

RE: How to stop gcc from not calling noinline functions

2008-01-14 Thread Dave Korn
On 14 January 2008 11:03, Hans-Peter Nilsson wrote: >> Date: Sat, 12 Jan 2008 11:16:23 +0100 >> From: Paolo Bonzini <[EMAIL PROTECTED]> > >>> (Yeah, new attributes "impure" and/or "nonconst" would solve >>> this, but only for IPA and there's already the existing option >>> and asm I mentioned. A

Re: How to stop gcc from not calling noinline functions

2008-01-14 Thread Hans-Peter Nilsson
> Date: Sat, 12 Jan 2008 11:16:23 +0100 > From: Paolo Bonzini <[EMAIL PROTECTED]> > > (Yeah, new attributes "impure" and/or "nonconst" would solve > > this, but only for IPA and there's already the existing option > > and asm I mentioned. And if you say different files/compilation > > units, I sa

Re: How to stop gcc from not calling noinline functions

2008-01-12 Thread Richard Guenther
On Jan 12, 2008 7:20 AM, Hans-Peter Nilsson <[EMAIL PROTECTED]> wrote: > Also known as "nooo, it's not *inlined*, it's just the call > being removed because the called function was found to be > pure/const". :) > > This happens when you try to synthesize executable test-cases > and you need e.g. a

Re: How to stop gcc from not calling noinline functions

2008-01-12 Thread Paolo Bonzini
(Yeah, new attributes "impure" and/or "nonconst" would solve this, but only for IPA and there's already the existing option and asm I mentioned. And if you say different files/compilation units, I say LTO.) I think the asm is your best bet. Paolo

Re: How to stop gcc from not calling noinline functions

2008-01-12 Thread kai-gcc
On Sat, Jan 12, 2008 at 07:20:03AM +0100, Hans-Peter Nilsson wrote: > Or, another attribute. Name? Maybe "always_extern", but I'm > not sure that's as intuitive and obvious as "noinline". I don't > like the perhaps immediately obvious "always_call", because I > think the calls should be deleted

How to stop gcc from not calling noinline functions

2008-01-11 Thread Hans-Peter Nilsson
Also known as "nooo, it's not *inlined*, it's just the call being removed because the called function was found to be pure/const". :) This happens when you try to synthesize executable test-cases and you need e.g. a call with such-and-such parameters, but the called function doesn't do anything; i