Re: gcc and optimizing (Common Subexpressions)
Re: gcc and optimizing (Common Subexpressions)
- Subject: Re: gcc and optimizing (Common Subexpressions)
- From: Steve Checkoway <email@hidden>
- Date: Fri, 08 Jun 2007 19:50:00 -0700
Tommy Nordgren wrote:
Are there any flags I can set to make this available with the -Os option
instead of -O3?
I looked through the man page but I didn't see anything that looked like
CSE that was in -O3 but not -Os. -fweb mentions that it strengthens
other optimization passes like CSE, but I couldn't really say for sure.
Also, so far I've only tested with calls of sin and cos. Are there
anything special that I need to
do to make this facility available with application-defined functions as
well (in particular GSL)
See
<http://developer.apple.com/documentation/DeveloperTools/gcc-4.0.1/gcc/Function-Attributes.html>.
The attribute you want is const if your function does not touch global
memory and the return value only depends on the arguments. If you do
look at global memory as well, then pure is the one you want. (I've
never had cause to use pure.)
--
Steve Checkoway
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden