This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, MIPS] Frame header optimization for MIPS (part 2)
- From: Bernd Schmidt <bschmidt at redhat dot com>
- To: Steve Ellcey <sellcey at imgtec dot com>, gcc-patches at gcc dot gnu dot org
- Cc: matthew dot fortune at imgtec dot com, clm at codesourcery dot com
- Date: Wed, 21 Oct 2015 00:55:32 +0200
- Subject: Re: [Patch, MIPS] Frame header optimization for MIPS (part 2)
- Authentication-results: sourceware.org; auth=none
- References: <befba71c-8b02-4ee9-b93b-2d7087b955b0 at BAMAIL02 dot ba dot imgtec dot org>
On 10/16/2015 10:21 PM, Steve Ellcey wrote:
Here is the second part of the MIPS frame header optimization patch.
I'll leave reviewing the functionality to the MIPS maintainers. But...
+ return TARGET_OLDABI && flag_frame_header_optimization && (optimize > 0);
+ if ((fn != NULL) && fn->machine->optimize_call_stack)
+ if (TARGET_OLDABI
+ && (optimize > 0)
+ && flag_frame_header_optimization
+ && !MAIN_NAME_P (DECL_NAME (current_function_decl))
+ && (cfun->machine->varargs_size == 0)
+ && (crtl->args.pretend_args_size == 0)
+ && (frame->var_size == 0)
+ && (frame->num_acc == 0)
+ && (frame->num_cop0_regs == 0)
+ && (frame->num_fp == 0)
+ && (frame->num_gp > 0)
+ && (frame->num_gp <= MAX_ARGS_IN_REGISTERS)
+ && (!GENERATE_MIPS16E_SAVE_RESTORE)
+ && (!cfun->machine->interrupt_handler_p)
+ && (cfun->machine->does_not_use_frame_header)
+ && (cfun->machine->optimize_call_stack)
+ && (!cfun->machine->callers_may_not_allocate_frame)
+ && !mips_cfun_has_cprestore_slot_p ())
+ return ((cfun->machine->frame.total_size == 0)
+ && !cfun->machine->use_frame_header_for_callee_saved_regs);
There are many unnecessary parentheses in this patch which should be
removed.
Bernd