Re: Frame pointer optimization issues

2014-09-11 Thread Jiong Wang
On 20/08/14 16:22, Wilco Dijkstra wrote: Hi, Various targets implement -momit-leaf-frame-pointer to avoid using a frame pointer in leaf functions. Currently the GCC mid-end does not provide a way of doing this, so targets have resorted to hacks. Typically this involves forcing flag_omit_frame

RE: Frame pointer optimization issues

2014-08-21 Thread Wilco Dijkstra
> Richard Henderson wrote: > On 08/20/2014 08:22 AM, Wilco Dijkstra wrote: > > 2. Change the mid-end to call _frame_pointer_required even when > > !flag_omit_frame_pointer. > > Um, it does that already. At least as far as I can see from > ira_setup_eliminable_regset and update_eliminables. No, i

RE: Frame pointer optimization issues

2014-08-21 Thread Thomas Preud'homme
> From: gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@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 >

Re: Frame pointer optimization issues

2014-08-21 Thread Richard Earnshaw
On 21/08/14 00:24, Richard Henderson wrote: > On 08/20/2014 08:22 AM, Wilco Dijkstra wrote: >> 2. Change the mid-end to call _frame_pointer_required even when >> !flag_omit_frame_pointer. > > Um, it does that already. At least as far as I can see from > ira_setup_eliminable_regset and update_elim

Re: Frame pointer optimization issues

2014-08-20 Thread Richard Henderson
On 08/20/2014 08:22 AM, Wilco Dijkstra wrote: > 2. Change the mid-end to call _frame_pointer_required even when > !flag_omit_frame_pointer. Um, it does that already. At least as far as I can see from ira_setup_eliminable_regset and update_eliminables. It turns out to be much easier to re-enable