[PATCH] D142021: AMDGPU/GlobalISel: Add stub custom regbankselect pass

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 19 01:36:34 PST 2023


rovka added a comment.

Why do we need a new pass? Could we achieve the same goals with a new RegBankSelect mode instead? (Sorry if this was discussed somewhere else and I missed it, in any case I think the commit message should either explain the rationale or point to wherever it's been discussed)



================
Comment at: llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp:72
 
-RegBankSelect::RegBankSelect(Mode RunningMode)
+RegBankSelect::RegBankSelect(char &PassID, Mode RunningMode)
     : MachineFunctionPass(ID), OptMode(RunningMode) {
----------------
Where is PassID used?


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURegBankSelect.cpp:14
+
+#define DEBUG_TYPE "regbankselect"
+
----------------
Nit: This diverges from AMDGPUInstructionSelector and Legalizer, which both define the DEBUG_TYPE as "amdgpu-blah" directly.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURegBankSelect.h:10
+/// This file declares the targeting of the InstructionSelector class for
+/// AMDGPU.
+//===----------------------------------------------------------------------===//
----------------
Update this comment for RegBankSelect instead of InstructionSelector (ditto for the header guard)


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

https://reviews.llvm.org/D142021



More information about the llvm-commits mailing list