- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello - Can anyone suggest optimal GCC compile flags (march, tune, sse, etc) for 2nd gen i7?
I read GCC 4.6 adds support for -march=corei7, but I am using GCC 4.4 and 4.5. Also, I am cross compilng on a pentium4 host so -march=native may not be ideal.
Any suggestions would be appreciated.
Thanks
I read GCC 4.6 adds support for -march=corei7, but I am using GCC 4.4 and 4.5. Also, I am cross compilng on a pentium4 host so -march=native may not be ideal.
Any suggestions would be appreciated.
Thanks
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Pentium4 native options are probably OK, if you want a 32-bit build. If you are able to get auto-vectorization at -O3, -march=pentium4 -mtune=barcelona will favor performance on CoreI7 while still running on Pentium4. Adding -msse4should help certain applications (e.g. complex data types), but won't run on Pentium4.
The -march=corei7 option of gcc 4.6 (replacing the pentium4 and barcelona options)is intended for the original Core I7 (still OK for I7-2). With gcc 4.5 on I7-2,you can use -mavx in place of -msse4and sometimes get an advantage. I expect 4.6 would get more out of -mavx.I've never tried -mavx for 32-bit compilation.
The -march=corei7 option of gcc 4.6 (replacing the pentium4 and barcelona options)is intended for the original Core I7 (still OK for I7-2). With gcc 4.5 on I7-2,you can use -mavx in place of -msse4and sometimes get an advantage. I expect 4.6 would get more out of -mavx.I've never tried -mavx for 32-bit compilation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Recent gcc versions support -flto (link time optimization) which is said to work well with suitable applications.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page