Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiler Optimization with GCC

Status
Not open for further replies.

mas027

Programmer
Aug 27, 2007
2
Does anyone know where I could get any information on how to know which specific GCC compiler optimizations were used during compilation (and a little more specific than the O1, O2, O3 optimizations)??


thanks a bunch!
 
Did you try the manual page?
Eg.
-O turns on the following optimization flags:


--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
Thanks...Yeah I checked out the manual page, but I want to know what the "optimization flags" actually do. Like what do these flags do?... -fthread-jumps
-fcrossjumping
-foptimize-sibling-calls
-fcse-follow-jumps -fcse-skip-blocks
-fgcse -fgcse-lm
-fexpensive-optimizations
-frerun-cse-after-loop
-fcaller-saves
-fpeephole2
-fschedule-insns -fschedule-insns2
-fsched-interblock -fsched-spec
-fregmove


I cant seem to find any information on these.
thanks a lot!
 
How about scrolling down the page of the very link I posted?
gcc manual said:
-fthread-jumps
Perform optimizations where we check to see if a jump branches to a location where another comparison subsumed by the first is found. If so, the first branch is redirected to either the destination of the second branch or a point immediately following it, depending on whether the condition is known to be true or false.

Enabled at levels -O2, -O3, -Os.

--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top