This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Move compressible registers to the beginning of the FP allocation order.
ClosedPublic

Authored by craig.topper on Mar 20 2023, 6:11 PM.

Details

Summary

We don't have very many compressible FP instructions, just load and store.
These instruction require the FP register to be f8-f15.

This patch changes the FP allocation order to prioritize f10-f15 first.
These are also the FP argument registers. So I allocated them in reverse
order starting at f15 to avoid taking the first argument registers.
This appears to match gcc allocation order.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 20 2023, 6:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2023, 6:11 PM
craig.topper requested review of this revision.Mar 20 2023, 6:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2023, 6:11 PM

Vote +1 from me. Thanks!
Performance and code size should have some improvements according to my previous assessment in D118020.

asb accepted this revision.EditedMar 27 2023, 2:29 AM

I can't say I've done any real performance analysis (I think the analysis from the previous thread should still be valid), but this seems sensible to me and I didn't spot any obvious regressions from kicking the tires.

This revision is now accepted and ready to land.Mar 27 2023, 2:29 AM