[all-commits] [llvm/llvm-project] 1fe7d9: [GlobalISel] Generalize `InstructionSelector` Matc...

Pierre van Houtryve via All-commits all-commits at lists.llvm.org
Tue Jul 11 00:42:55 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1fe7d9c79967d1e1456778e5008b8f68bc16d41f
      https://github.com/llvm/llvm-project/commit/1fe7d9c79967d1e1456778e5008b8f68bc16d41f
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

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

  Log Message:
  -----------
  [GlobalISel] Generalize `InstructionSelector` Match Tables

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.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D153755


  Commit: 908d0d54b82deef971754bbf3e67fb6bf72f6193
      https://github.com/llvm/llvm-project/commit/908d0d54b82deef971754bbf3e67fb6bf72f6193
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M llvm/test/TableGen/GlobalISelEmitter.td
    M llvm/test/TableGen/GlobalISelEmitterCustomPredicate.td
    M llvm/utils/TableGen/CMakeLists.txt
    M llvm/utils/TableGen/GlobalISelEmitter.cpp
    A llvm/utils/TableGen/GlobalISelMatchTableExecutorEmitter.cpp
    A llvm/utils/TableGen/GlobalISelMatchTableExecutorEmitter.h
    M llvm/utils/TableGen/SubtargetFeatureInfo.cpp
    M llvm/utils/TableGen/SubtargetFeatureInfo.h

  Log Message:
  -----------
  [TableGen][GlobalISel] Add Generic MatchTableExecutor Emitter

Move all of the reusable logic out of `GlobalISelEmitter.cpp` into a `GlobalISelMatchTableExecutorEmitter` class so the future combiner backend can use it as well.

Depends on D153755

Reviewed By: aemerson

Differential Revision: https://reviews.llvm.org/D153756


  Commit: c0719f3bacd566b26f947a7cc06e8d9e47828459
      https://github.com/llvm/llvm-project/commit/c0719f3bacd566b26f947a7cc06e8d9e47828459
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h
    M llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
    A llvm/test/TableGen/GlobalISelCombinerMatchTableEmitter/match-table.td
    A llvm/test/TableGen/GlobalISelCombinerMatchTableEmitter/pattern-parsing-errors.td
    A llvm/test/TableGen/GlobalISelCombinerMatchTableEmitter/pattern-parsing.td
    M llvm/test/TableGen/GlobalISelEmitter.td
    M llvm/test/TableGen/GlobalISelEmitterCustomPredicate.td
    M llvm/utils/TableGen/CMakeLists.txt
    M llvm/utils/TableGen/GICombinerEmitter.cpp
    A llvm/utils/TableGen/GlobalISel/CombinerUtils.h
    A llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp
    M llvm/utils/TableGen/GlobalISelEmitter.cpp
    M llvm/utils/TableGen/GlobalISelMatchTable.cpp
    M llvm/utils/TableGen/GlobalISelMatchTable.h
    M llvm/utils/TableGen/GlobalISelMatchTableExecutorEmitter.cpp
    M llvm/utils/TableGen/GlobalISelMatchTableExecutorEmitter.h

  Log Message:
  -----------
  [RFC][TableGen][GlobalISel] Add Combiner Match Table Backend

Adds a new backend to power the GISel Combiners using the InstructionSelector's match tables.
This does not depend on any of the data structures created for the current combiner and is intended to replace it entirely.

See the RFC for more details: https://discourse.llvm.org/t/rfc-matchtable-based-globalisel-combiners/71457/6
Note: this would replace D141135.

Reviewed By: aemerson, arsenm

Differential Revision: https://reviews.llvm.org/D153757


Compare: https://github.com/llvm/llvm-project/compare/dae9d1b52469...c0719f3bacd5


More information about the All-commits mailing list