This is the mail archive of the gcc@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: Frame pointer optimization issues


> From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On Behalf Of
> Wilco Dijkstra
> 
> One could hack this a bit further and set flag_omit_frame_pointer = 2 to
> differentiate between a
> user setting and the override hack, but that's just making things even worse.
> So I see 3 possible
> solutions:
> 
> 1. Add a copy of flag_omit_frame_pointer, and only modify that in the
> override. This is the generic
> correct solution that allows any kind of modifications on the copies. This
> could be done by making
> all flags separate variables and automating the copy in the options parsing
> code. Any code that
> writes the x_flag_ variables should eventually be fixed to stop doing this to
> avoid these bugs (i386
> does this 22 times and c6x 2x).

I just sent a patch [1] following a similar approach for a problem on ARM target
when compiling for thumb1 and optimizing for size. In this case call_used_regs
will be modified to not save some registers in the prologue, ignoring any
value the user might have set.

[1] https://gcc.gnu.org/ml/gcc-patches/2014-08/msg01970.html

So I think a general solution would be useful.

Best regards,

Thomas




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