This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: {PATCH,x86] Workarond for 55970


On Fri, Feb 1, 2013 at 5:10 AM, Yuri Rumyantsev <ysrumyan@gmail.com> wrote:
>
> This is simple fix that is aimed to help users in porting their
> applications to x86 platforms which rely on an order of function
> argument evaluation. To preserve direct order of argument evaluation
> they need to be added additional option '-mno-push-args' to compile
> that looks reasonable price for non-C/C++ Standard conformance.
> I checked that adding this option does not affect on performance on
> Corei7 and Atom platforms. Note also that option "-push-args" is
> passed by default on all x86 platforms and it means that changing this
> macros will not likely affect on almost all gcc users.

If your goal is to preserve the order in which function arguments are
evaluated, this patch is not going to be reliable.  It only affects
the conversion from GIMPLE to RTL.  The GIMPLE optimizers will have
already had plenty of opportunity to change the function argument
evaluation order.

I don't think we should change the compiler to generate less efficient
code in order to help non-standard-conforming programs when the change
won't work reliably anyhow.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]