RVV doesn't have an immediate field for memory addressing. Currently,
we build MachineInstructions in PEI to computing stack offset for
RVV load store instructions. These instructions were added too late to
can be optimized by CSE, LICM... passes.
This patch makes FrameIndex SDNodes can't be matched in RVV Load Store
instruction selection patterns. So that the FrameIndex SDNodes would be
selected as ADDI GPR, targetframeindex, 0.
There are 2 advantages to such change:
- Stack objects address computing can be optimized by machine function passes.
- Since the ADDI instruction's destination register can be used as a temp register, we can save an emergency spill slot.
I did some refactoring in SelectAddrRegImm to remove the dependency on SelectBaseAddr. You can remove it in this patch.