[PATCH] D84199: GlobalISel: Add utilty for getting function argument live ins

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 21 14:13:42 PDT 2020


paquette added a subscriber: aprantl.
paquette added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:501
+                                        const TargetRegisterClass &RC,
+                                        LLT Ty) {
+  DebugLoc DL; // FIXME: Is no location the right choice?
----------------
Should this be RegTy to match Utils.h?

(Or should it be Ty in Utils.h?)


================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:502
+                                        LLT Ty) {
+  DebugLoc DL; // FIXME: Is no location the right choice?
+  MachineBasicBlock &EntryMBB = MF.front();
----------------
@aprantl, what do you think about this?


================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:524
+
+  BuildMI(EntryMBB, EntryMBB.begin(), DL, TII.get(TargetOpcode::COPY), LiveIn)
+    .addReg(PhysReg);
----------------
Why not `MachineIRBuilder`?


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

https://reviews.llvm.org/D84199





More information about the llvm-commits mailing list