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