[PATCH] D153755: [GlobalISel] Generalize `InstructionSelector` Match Tables

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 04:53:01 PDT 2023


Pierre-vh created this revision.
Herald added subscribers: luke, foad, frasercrmck, ThomasRaoux, 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, asb, kbarton, hiraditya, arichardson, jvesely, nemanjai, sdardis, arsenm.
Herald added a project: All.
Pierre-vh requested review of this revision.
Herald added subscribers: llvm-commits, wangpc, MaskRay.
Herald added a reviewer: zuban32.
Herald added a reviewer: mpaszkowski.
Herald added a project: LLVM.

Makes `InstructionSelector.h`/`InstructionSelectorImpl.h` generic so the match tables can also be used for the combiner.

Some notes:

- Coverage was made an optional parameter of `executeMatchTable`, combines won't use it for now.
- `GIPFP_` -> `GICXXPred_` so it's more generic. Those are just C++ predicates and aren't PatFrag-specific.
- Pass the MatcherState directly to testMIPredicate_MI, the combiner will need it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153755

Files:
  llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h
  llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
  llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h
  llvm/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
  llvm/lib/CodeGen/GlobalISel/CMakeLists.txt
  llvm/lib/CodeGen/GlobalISel/GIMatchTableExecutor.cpp
  llvm/lib/CodeGen/GlobalISel/InstructionSelector.cpp
  llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
  llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
  llvm/lib/Target/ARM/ARMInstructionSelector.cpp
  llvm/lib/Target/M68k/GISel/M68kInstructionSelector.cpp
  llvm/lib/Target/Mips/MipsInstructionSelector.cpp
  llvm/lib/Target/PowerPC/GISel/PPCInstructionSelector.cpp
  llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp
  llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
  llvm/lib/Target/X86/X86InstructionSelector.cpp
  llvm/test/TableGen/ContextlessPredicates.td
  llvm/test/TableGen/GlobalISelEmitter-PR39045.td
  llvm/test/TableGen/GlobalISelEmitter.td
  llvm/test/TableGen/GlobalISelEmitterCustomPredicate.td
  llvm/test/TableGen/GlobalISelEmitterOverloadedPtr.td
  llvm/test/TableGen/immarg-predicated.td
  llvm/test/TableGen/predicate-patfags.td
  llvm/utils/TableGen/GlobalISelEmitter.cpp
  llvm/utils/TableGen/GlobalISelMatchTable.cpp
  llvm/utils/TableGen/GlobalISelMatchTable.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153755.534503.patch
Type: text/x-patch
Size: 107914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230626/13f566de/attachment-0001.bin>


More information about the llvm-commits mailing list