[LLVMbugs] [Bug 5948] llvm-gcc not turning 'restrict' into 'noalias'

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Jan 6 23:37:30 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=5948


Chris Lattner <clattner at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #5 from Chris Lattner <clattner at apple.com>  2010-01-07 01:37:30 ---
Ah, __restrict__ is the keyword I wanted.  This:

#include <stdlib.h>
struct Ramp
{
   float phase;
   inline float process() { return phase++; }
} ramp;

void fill_buffer( float *__restrict__ buf, size_t nframes )
{
        for( size_t i=0; i<nframes; i++ )
                buf[i] = ramp.process();
}

compiles to nicely optimized code.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list