aa27696b79
Beware, tm.texi doesn't tell the whole story: a defined HARD_FRAME_POINTER_REGNUM (different to FRAME_POINTER_REGNUM) is supposed to make work easier for reload, being able to easily tell actual frame-pointer-related addresses from those that happen to use the same register or something to that effect. On reasonable code the performance effect is barely measurable. Looking at libgcc changes for -march=v10, the effect (where noticeable) is mostly indeterminate churn. Instances where it's not just insns moved around at no obvious effect: one more insn for addvdi3, subvdi3; two insns more in floatdisf; three insns shorter fixunsdfdi. Some of those seem related to pairing r8 with r9. The only effect on coremark is an infinitesimal positive effect from a three(!) cycles total (from the 15 calls) faster execution paths in vfprintf_r. Local microbenchmarks give similar results. With that in mind and not forgetting that expectations in the register allocator and reload leaning towards HARD_FRAME_POINTER_REGNUM defined (and different to) FRAME_POINTER_REGNUM or to wit, "all the kids do it", why not. Note that the offset at elimination really is 0. gcc: * config/cris/cris.h (HARD_FRAME_POINTER_REGNUM): Define. Change FRAME_POINTER_REGNUM to correspond to a new faked register faked_fp, part of GENNONACR_REGS like faked_ap. (CRIS_FAKED_REGS_CONTENTS): New helper macro. (FIRST_PSEUDO_REGISTER, FIXED_REGISTERS, CALL_USED_REGISTERS): (REG_ALLOC_ORDER, REG_CLASS_CONTENTS, REGNO_OK_FOR_BASE_P) (ELIMINABLE_REGS, REGISTER_NAMES): Adjust accordingly. * config/cris/cris.md (CRIS_FP_REGNUM): Renumber to new faked register. (CRIS_REAL_FP_REGNUM): New constant. * config/cris/cris.c (cris_reg_saved_in_regsave_area): Check for HARD_FRAME_POINTER_REGNUM instead of FRAME_POINTER_REGNUM. (cris_initial_elimination_offset): Handle elimination changes to HARD_FRAME_POINTER_REGNUM instead of FRAME_POINTER_REGNUM and add one from FRAME_POINTER_REGNUM to HARD_FRAME_POINTER_REGNUM. (cris_expand_prologue, cris_expand_epilogue): Emit code for hard_frame_pointer_rtx instead of frame_pointer_rtx. |
||
---|---|---|
.. | ||
constraints.md | ||
cris-modes.def | ||
cris-passes.def | ||
cris-protos.h | ||
cris.c | ||
cris.h | ||
cris.md | ||
cris.opt | ||
elf.opt | ||
predicates.md | ||
sync.md | ||
t-cris | ||
t-elfmulti |