Re: [LAD] gcc and pointer aliasing... missing optimizations in some cases

2009-12-26 Thread torbenh
On Sat, Dec 26, 2009 at 10:50:40AM +0100, Tim Blechmann wrote: > >>> Thus telling the compiler that `this` is not an alias when > >>> process() is called. > >> > >> On second thought... since those didn't work for me, perhaps part of > >> the problem is that osc_block is a global variable, and thus

Re: [LAD] gcc and pointer aliasing... missing optimizations in some cases

2009-12-26 Thread Tim Blechmann
>>> Thus telling the compiler that `this` is not an alias when >>> process() is called. >> >> On second thought... since those didn't work for me, perhaps part of >> the problem is that osc_block is a global variable, and thus there's >> no way to prove __restrict__ on it. >> >> -gabriel > > fields

Re: [LAD] gcc and pointer aliasing... missing optimizations in some cases

2009-12-22 Thread torbenh
On Tue, Dec 22, 2009 at 02:11:23PM -0600, Gabriel M. Beddingfield wrote: > > > On Tue, 22 Dec 2009, Gabriel M. Beddingfield wrote: > > >Thus telling the compiler that `this` is not an alias when > >process() is called. > > On second thought... since those didn't work for me, perhaps part of > t

Re: [LAD] gcc and pointer aliasing... missing optimizations in some cases

2009-12-22 Thread Gabriel M. Beddingfield
On Tue, 22 Dec 2009, Gabriel M. Beddingfield wrote: > Thus telling the compiler that `this` is not an alias when > process() is called. On second thought... since those didn't work for me, perhaps part of the problem is that osc_block is a global variable, and thus there's no way to prove __r

Re: [LAD] gcc and pointer aliasing... missing optimizations in some cases

2009-12-22 Thread Gabriel M. Beddingfield
On Tue, 22 Dec 2009, torbenh wrote: > class Ramp > { >private: > float _phase; > float _omega; >public: > Ramp(); > float process() > { > _phase += _omega; > return _phase; > } > }; Is the problem that _phase and _omega get reload

Re: [LAD] gcc and pointer aliasing... missing optimizations in some cases

2009-12-22 Thread torbenh
On Tue, Dec 22, 2009 at 05:55:08PM +0100, torbenh wrote: > > hi... > > i discovered yesterday, that gcc cant optimize something like: > > --- > class Ramp > { > private: > float _phase; > float _omega; > publ

[LAD] gcc and pointer aliasing... missing optimizations in some cases

2009-12-22 Thread torbenh
hi... i discovered yesterday, that gcc cant optimize something like: --- class Ramp { private: float _phase; float _omega; public: Ramp(); float process() { _phase += _