This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: prefetching on pentium 4


ranjith kumar <ranjit_kumar_b4u@yahoo.co.uk> writes:

>    1) Will "gcc" insert prefetch instructions
> automatically on "pentium 4" processor?
> Which flags should be enabled while compiling sothat
> gcc  automatically insert prefetch instructions?

gcc will insert prefetch instructions if you use the
-fprefetch-loop-arrays option.

> 2) Or programmer has to include some functions?
>    If so, what is the syntax of that function?

You can use the __builtin_prefetch function.  See the documentation.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]