site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Feb 20, 2009, at 4:54 PM, Jan Brittenson wrote: These are shorthand to turn on/off the various optimization options. Ryan McGann wrote: We are currently using -O3 because the code is pretty compute- bound, and on other platforms -O3 has a nice 5% boost compared to - O2. But changing it to -O2 doesn't even help, we have to go all the way to -O1 to get a usable stack of 400 bytes (still 4x larger than our Linux driver). If I were you I'd find out what exactly they expand to, and which of the options cause the stack bloat. Then I'd explicitly turn off that, or those, optimizations. It may take some guesswork and experimentation with the a la carte options. You might also be able to find a way to reorder the code to work around. For instance, if it's caused by -fstack-realign, then try compiling with -O3 -fno-stack-realign. The difference from your Linux driver is probably just a function of gcc version used. When your Linux build environment catches up you'll likely find you have the foot print issues there as well. I should have mentioned that all the drivers use g++ 4.0.1 to compile. For whatever reason, on Linux and FreeBSD, -O3 expands to something very different on Mac OS X. I guess the divide & conquer approach is the one I'll take to figure out the offending compiler option(s) but I was hoping somebody had a smoking gun, since -O3 expands to about 25 options. Ryan _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Ryan McGann