Re: [GD-Windows] Strange prolog function issue
Brought to you by:
vexxed72
From: Dan T. <da...@ar...> - 2006-07-26 22:03:59
|
Huh, I had heard frame pointer omission wasn't a huge optimization. We turned it off to get reliable stacks off of our release builds. A quick google doesn't mention much other than how to turn it off or that it affects ebp. Does anyone have any numbers on performance, or in what circumstances it makes a large difference? By the way, in VS8.0 "Optimize for Speed" and "Optimize for Size" both force enable frame pointer omission. From the docs: "The /Ox (Full Optimization) <http://msdn2.microsoft.com/en-us/library/59a3b321.aspx> (Full Optimization) and /O1, /O2 (Minimize Size, Maximize Speed) <http://msdn2.microsoft.com/en-us/library/8f8h5cxt.aspx> (Fast Code) options imply */Oy*. Specifying */Oy–* after the */Ox*, */O1*, or */O2* option disables */Oy*, whether it is explicit or implied." -Dan Kevin Wasserman wrote: > Make sure properties->optimization "omit frame pointers" is set to "No" for > your release build, otherwise the compiler will feel free to do what it > wants with ebp. > > My understanding was that if you ever use _alloca() in a function, though, > the compiler would be forced to use ebp as a frame pointer regardless > because of the exception handling cleanup issue. This was a strong reason > not to use _alloca because the "omit frame pointers" optimization can be a > quite significant performance gain. All this may have changed with 7.1, > however. > > -Kevin Wasserman > > >> Date: Tue, 25 Jul 2006 23:12:40 +0000 (GMT) >> From: Emmanuel Astier <e_a...@ya...> >> Subject: [GD-Windows] Re : Strange prolog function issue >> To: Game Development for MS Windows >> <gam...@li...> >> Message-ID: <200...@we...> >> Content-Type: text/plain; charset=utf-8 >> >> Hi, >> >> It only happens in release build. And as you said, I suspect a compiler >> bug. >> >> Actually, I don't understand when the compiler decide to switch to a >> different prolog for the function, where ebp doesn't have the same meaning. >> It is all fine as the function code knows the different ebp meaning, and >> has no trouble accessing local vars, but the exception handler seems not to >> be aware of the change in the ebp meaning. >> >> Thanks for your help, >> we send a mail to microsoft, we will wait for their anwser... >> >> Emmanuel >> >> Ps : Kent, replying to your mails only replies to you, not to the list... >> > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > > |