[PATCH] D70401: [RISCV] Implement ilp32e ABI

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 10:31:59 PST 2019


luismarques added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1515
+                                               ? makeArrayRef(ArgGPRs_ILP32E)
+                                               : makeArrayRef(ArgGPRs);
+
----------------
Consider extracting this logic into its own function and calling that function in the various places in this patch where that logic is used.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1597
   else
-    Reg = State.AllocateReg(ArgGPRs);
+    Reg = State.AllocateReg(AllocatableArgGPRs);
   unsigned StackOffset = Reg ? 0 : State.AllocateStack(XLen / 8, XLen / 8);
----------------
There are many renames like these. Consider making `ArgGPRs` the `ArrayRef` (instead of `AllocatableArgGPRs`) and renaming the original array to something less generic (`ArgGPRs_Standard`? `_Full`? `_NonE`?)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70401





More information about the llvm-commits mailing list