[PATCH] D94465: [RISCV] Frame handling for RISC-V V extension. (2nd. version)

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 22 16:51:12 PST 2021


HsiangKai added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp:154
 
+Register RISCVRegisterInfo::getVLENFactoredAmount(
+    MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator II,
----------------
frasercrmck wrote:
> This parameter named `Amount` implies the function can be used generically, but the variables and assertions within specifically imply the amount is taken to be "the number of registers". If this function is truly generic I think things like `NumOfVReg` should be renamed, but if the function makes assumptions about what `Amount` is then that should be clarified.
> 
> Also, if the function is generic maybe it should live in `RISCVInstrInfo`
`Amount` could be the stack size occupied by vector objects or the offset of the vector objects. I think `NumOfVReg` is appropriate because the stack size or offset are equivalent to the number of vector times vector size(`VLENB`).

I will move this function to `RISCVInstrInfo`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94465/new/

https://reviews.llvm.org/D94465



More information about the llvm-commits mailing list