- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The help page for compiler option O describes the following for the shortcut options /O1 and /O2 on IA32:
/O1:
/Qunroll0, /nofltconsistency (same as /Op-), /Oy, /Os, /Ob2, /Qftz
/O2:
/Og, /Ot, /Oy, /Ob2, /Gs, and /Qftz ... but with the added note This option sets other options that optimize for code speed. The options set are determined by the compiler depending on which architecture and operating system you are using.
I have a situation where the /O1 vs /O2 setting is changing numerical results. Id like to track down exactly which optimization is doing it, so that I can choose one way or the other which setting to use. None of the above-listed /O1 or /O2 settings seems to be the cause ofthis. Is there any way to know what other stuff gets changed by /O1 vs /O2?
I am compiling on an EM64T Windows7 machine, for IA32 and EM64T target machines.
Thanks!!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you depend on the order of evaluation of expressions, you should take care with use of parentheses, and set /assume:protect_parens.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have plenty of warnings and checks turned on. As the compiler is not reporting any such nasties, I hope that there are none.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So far, I haven't beenso lucky for 64-bit. /O2 with /fp:strict is stillgiving different results from /O1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page