This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Restructure eliminateFrameIndex to share more code. NFC
ClosedPublic

Authored by craig.topper on Oct 3 2022, 11:43 AM.

Details

Summary

The old code took two different paths based on whether there is
a scalable offset, but these two paths had some code in common.

The main difference between the two code paths was whether we needed
to create a GPR or not for the ADDI that gets created for RVVSpill.
If we had a scalable offset, the same GPR was used as the destination
for adding the scalable offset and the ADDI. To manage this, we now
cache the scratch register and reuse it if it has already been created.

This is a pre-patch for D135009.

Diff Detail

Event Timeline

craig.topper created this revision.Oct 3 2022, 11:43 AM
craig.topper requested review of this revision.Oct 3 2022, 11:43 AM
reames accepted this revision.Oct 3 2022, 5:50 PM
This revision is now accepted and ready to land.Oct 3 2022, 5:50 PM
This revision was landed with ongoing or failed builds.Oct 4 2022, 9:35 AM
This revision was automatically updated to reflect the committed changes.