aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-09-30 18:36:11 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-09-30 18:36:11 +0000
commit2f00786128f190a4ad7a0819a84026cd8be19ad4 (patch)
tree77d073fc875526d85db3c49a3a2cfcd3033cdb04 /gcc/go
parent021f65807164b2770e8f113b0f85b1bb193020ef (diff)
downloadgcc-2f00786128f190a4ad7a0819a84026cd8be19ad4.zip
gcc-2f00786128f190a4ad7a0819a84026cd8be19ad4.tar.gz
gcc-2f00786128f190a4ad7a0819a84026cd8be19ad4.tar.bz2
[x86] Cache result of expensive_function_p between frame layouts
ix86_compute_frame_layout sets use_fast_prologue_epilogue if the function isn't more expensive than a certain threshold, where the threshold depends on the number of saved registers. However, the RA is allowed to insert and delete instructions as it goes along, which can change whether this threshold is crossed or not. I hit this with an RA change I'm working on. Rematerialisation was able to remove an instruction and avoid a spill, which happened to bring the size of the function below the threshold. But since nothing legitimately frame-related had changed, there was no need for the RA to lay out the frame again. We then failed the final sanity check in lra_eliminate. 2019-09-30 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/i386/i386.h (ix86_frame::expensive_p): New field. (ix86_frame::expensive_count): Likewise. * config/i386/i386.c (ix86_compute_frame_layout): Make the choice of use_fast_prologue_epilogue robust against incidental changes in function size. From-SVN: r276361
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions