• Advertisement
Sign in to follow this  

Viewing compiler optimizations

This topic is 3185 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'd like to see the code a compiler generates when I compile a program. I know there is a way to do it, I just can find any info on it. Help? :) Additionally, where can I choose which optimizations are made when I build?

Share this post


Link to post
Share on other sites
Advertisement
You can view the assembly that a the compiler spits out with any decent debugger. What compiler/IDE are you using?

Share this post


Link to post
Share on other sites
You can get MSVC to output the assembly it generates with the /FA family of switches. Optimizations can be controlled by going to Project Properties -> C/C++ -> Optimization.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
You can get MSVC to output the assembly it generates with the /FA family of switches. Optimizations can be controlled by going to Project Properties -> C/C++ -> Optimization.


I just put a breakpoint in the code I'm interested in and hit alt-8.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement