[RISCV] Restructure eliminateFrameIndex to share more code. NFC
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. Reviewed By: reames, frasercrmck Differential Revision: https://reviews.llvm.org/D135092
Loading
Please sign in to comment