Updated article on compiler options

An updated version of my article on compiler options has been put up. I think I last refreshed this a couple of years back. It's interesting to see what difference a couple of years makes. I'd started the update with the expectation that things would have become much simpler, although this is true, there's still some complexity left. The major changes were:

  • More focus on -xtarget=generic. Really that's the best option to start with and to use when possible. But there are exceptions....
    • For x86 it's a good plan to use -xarch=sse2 -xvector=simd to get the compiler to use the SSE2 instruction set which is common on all recent x86 processors.
    • For SPARC the SPARC64 VI processor supports floating point multiply accumulate instructions. These are a boost for floating point codes, and are generated under the flags -xarch=sparcfmaf -xfma=fused
  • The compiler is pretty good at generating prefetch instructions by default, so there's no real need to emphasise the prefetch flags.
  • Profile feedback and crossfile optimisation are pretty common options, and should be considered for all applications.
Comments:

Post a Comment:
Comments are closed for this entry.
About

Darryl Gove is a senior engineer in the Solaris Studio team, working on optimising applications and benchmarks for current and future processors. He is also the author of the books:
Multicore Application Programming
Solaris Application Programming
The Developer's Edge

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
5
6
8
9
10
12
13
14
15
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks
The Developer's Edge
Solaris Application Programming
Publications
Webcasts
Presentations
OpenSPARC Book
Multicore Application Programming
Docs