开发者

Pragmas swp,ivdep,prefetch support in various compilers

In good Altix manual (altix_single_cpu_optimization http://wwwuser.gwdg.de/~parallel/parallelrechner/altix_documentation/altix_single_cpu_optimization.pdf ) I've found this list of pragmas-hints for optimizing compilers

#pragma ivdep               // no aliasing
#pragma swp                 // try to software-pipeline
#pragma noswp               // disable software-pipelining
#pragma loop count (NN)     // hint for SWP
#pragma distribute point    // split this large loop
#pragma unroll (n)          // unroll n times
#pragma nounroll            // do not unroll
#开发者_Go百科pragma prefetch a          // prefetch array “a”
#pragma noprefetch c        // do not prefetch array “c”

What compilers does support these pragmas? And what does implement linked optimizations (software pipelining is one of the rather hard optimization for low ipc and low reg count processors) ?


Sun Studio 12 http://docs.oracle.com/cd/E19205-01/819-5265/bjaby/index.html

#pragma nomemorydepend
#pragma no_side_effect (funcs)
#pragma opt N (funcs)
#pragma pipeloop(n)          // like swp, m.b. noswp 
#pragma rarely_called(funcs)
#pragma unroll (N)

Intel http://software.intel.com/en-us/articles/use-pragmas-with-the-intel-c-compiler-for-linux-on-64-bit-architecture/

 #pragma swp
 #pragma noswp
 #pragma unroll
 #pragma distribute point
 #pragma prefetch *arrays*
 #pragma loop count 
 #pragma ivdep

IBM http://publib.boulder.ibm.com/infocenter/comphelp/v7v91/topic/com.ibm.vacpp7a.doc/compiler/ref/rupragen.htm

#pragma block_loop
#pragma disjoint
#pragma execution_frequency
#pragma isolated_call
#pragma stream_unroll
#pragma unroll
#pragma unrollandfuse

Open64 http://wiki.open64.net/index.php/Pragmas_Support_in_Open64 (with bunch or links to other compilers)

#pragma unroll
#pragma blockable
#pragma prefetch
#pragma ivdep

PGI 9 http://www.math.hkbu.edu.hk/parallel/pgi/doc/pgiws_ug/pgi32u10.htm

#pragma depchk 
#pragma opt 
#pragma unroll 
#pragma vector 

MSvs2003 http://msdn.microsoft.com/en-us/library/d9x1s805(VS.71).aspx

#pragma optimize

HP http://www.docs.hp.com/en/B3901-90024/ch03s06.html

#pragma if_convert
#pragma rarely_called
#pragma unroll // or unroll factor

CRAY http://docs.cray.com/books/004-2179-001/html-004-2179-001/xgaslrwh.html

#pragma _CRI ivdep
#pragma _CRI opt // or noopt
#pragma _CRI novector // novsearch
#pragma _CRI shortloop
#pragma _CRI prefervector
#pragma _CRI split
#pragma _CRI unroll [n]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜