This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to suppress frame pointer usage by default?
- From: Ian Lance Taylor <iant at google dot com>
- To: Konstantin Vladimirov <konstantin dot vladimirov at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 21 Feb 2012 05:51:39 -0800
- Subject: Re: How to suppress frame pointer usage by default?
- Authentication-results: mr.google.com; spf=pass (google.com: domain of iant@google.com designates 10.229.76.139 as permitted sender) smtp.mail=iant@google.com; dkim=pass header.i=iant@google.com
- References: <CADn89gQoqykFgU628hHsjisscm3fQYfZBxwd+13B8uMvRdMB8g@mail.gmail.com>
Konstantin Vladimirov <konstantin.vladimirov@gmail.com> writes:
> What one must use in custom backend to suppress frame pointer usage by default?
>
> Frame pointer is mentioned in ELIMINABLE_REGS:
>
> #define ELIMINABLE_REGS \
> { \
> {ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
> {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
> {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
> }
>
> TARGET_CAN_ELIMINATE is defined to be always true,
>
> TARGET_FRAME_POINTER_REQUIRED is defined to be always false
>
> Instead of this, gcc generates code with frame pointer usage, and I
> need manually specify -fomit-frame-pointer to suppress this behavior.
> What else may influence this?
You may need to set flag_omit_frame_pointer in your
TARGET_OPTION_OVERRIDE or TARGET_OPTION_OPTIMIZATION_TABLE or
TARGET_OPTION_OVERRIDE (note that these have different names in earlier
versions of gcc).
Ian