[PATCH] D140161: [SelectionDAG] Give all the target specific subclasses of SelectionDAGISel their own pass ID.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 13:02:00 PST 2022


craig.topper created this revision.
craig.topper added reviewers: efriedma, nickdesaulniers, arsenm.
Herald added subscribers: kosarev, mattd, gchakrabarti, pmatos, asb, asavonic, foad, StephenFan, frasercrmck, ecnelises, kerbowa, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, atanasyan, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, fedor.sergeev, kbarton, hiraditya, jgravelle-google, arichardson, sbc100, tpr, jvesely, nemanjai, sdardis, dylanmckay, jyknight, dschuff.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, MaskRay, aheejin, wdng, jholewinski.
Herald added a project: LLVM.

Previously we had a shared ID in SelectionDAGISel. AMDGPU has an
initializePass function for its subclass of SelectionDAGISel. No
other target does.

This causes all target specific SelectionDAGISel passes to be known
as "amdgpu-isel".

I'm not sure what would happen if another target tried to implement
an initializePass function too since the ID is already claimed.

This patch gives all targets their own ID and passes it down to
SelectionDAGISel constructor to MachineFunctionPass's constructor.

Unfortunately, I think this causes most targets to lose
print-before/after-all support for their SelectionDAGISel pass.
And they probably no longer support start/stop-before/after. We
can add initializePass functions to fix this as a follow up. NOTE:
This was probably also broken if the AMDGPU target isn't compiled in.

Step 1 to fixing PR59538.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140161

Files:
  llvm/include/llvm/CodeGen/SelectionDAGISel.h
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
  llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
  llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.h
  llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
  llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp
  llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
  llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
  llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h
  llvm/lib/Target/Lanai/LanaiISelDAGToDAG.cpp
  llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
  llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp
  llvm/lib/Target/Mips/MipsISelDAGToDAG.h
  llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
  llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h
  llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
  llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
  llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
  llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
  llvm/lib/Target/VE/VEISelDAGToDAG.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
  llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
  llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140161.483310.patch
Type: text/x-patch
Size: 17822 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221215/0fc0799c/attachment.bin>


More information about the llvm-commits mailing list