[PATCH] D149775: [AMDGPU] Reserve SGPR pair when long branches are present

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 10:13:12 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/GCNPreRALongBranchReg.cpp:86
+    for (const MachineInstr &MI : MBB) {
+      if (MI.isDebugInstr() || MI.isMetaInstruction())
+        continue;
----------------
Just isMetaInstruction is fine, it's a superset of isDebugIstr


================
Comment at: llvm/lib/Target/AMDGPU/GCNPreRALongBranchReg.cpp:102
+}
+uint64_t GCNPreRALongBranchReg::getInstrOffset(const MachineInstr &MI) const {
+  const MachineBasicBlock *MBB = MI.getParent();
----------------
Don't need a specific instruction offset, just the block distances are good enough


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149775



More information about the llvm-commits mailing list