[PATCH] D150522: [LoongArch] Support CodeModel::Large codegen

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 00:46:12 PDT 2023


benshi001 added inline comments.


================
Comment at: llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp:211
+
+  unsigned Flags0, Flags1, Flags2, Flags3;
+  switch (IdentifyingMO) {
----------------
I think the suffix `s` is unnecessary for variables. :)


================
Comment at: llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp:252
+          : DestReg;
+  Register TmpPart023 =
+      DestReg.isVirtual()
----------------
Why name it to `TmpPart023` rather than `TmpPart3` ? 


================
Comment at: llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp:309
+    MachineBasicBlock::iterator &NextMBBI, bool Large) {
+  if (Large)
+    return expandLargeAddressLoad(MBB, MBBI, NextMBBI, LoongArch::ADD_D,
----------------
Do we also need to add comment about instruction sequence as the following lines ?


================
Comment at: llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp:374
+    MachineBasicBlock::iterator &NextMBBI, bool Large) {
+  if (Large)
+    return expandLargeAddressLoad(MBB, MBBI, NextMBBI, LoongArch::ADD_D,
----------------
Do we have to check if it is LA64? Should there be an error if it is LA32+Large ? 



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150522



More information about the llvm-commits mailing list