[all-commits] [llvm/llvm-project] 8b82ae: [GlobalISel][RISCV][TableGen] Teach GlobalISelEmit...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed Aug 23 21:16:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8b82ae0b8d523f2de3a1dabad9d006b57917af71
      https://github.com/llvm/llvm-project/commit/8b82ae0b8d523f2de3a1dabad9d006b57917af71
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-08-23 (Wed, 23 Aug 2023)

  Changed paths:
    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
    M llvm/utils/TableGen/SubtargetFeatureInfo.cpp
    M llvm/utils/TableGen/SubtargetFeatureInfo.h

  Log Message:
  -----------
  [GlobalISel][RISCV][TableGen] Teach GlobalISelEmitter about HwMode.

Similar to SelectionDAG, this patch treats HwMode as an additional
predicate that needs to be satisfied for GIM_CheckFeatures.

The existing predicate passes around Record * that point to predicate
records. While HwMode expansion creates a string that needs to be
checked.

Each HwMode predicate string is uniqued by a new map that assigns
it an index. Each Rule stores the index, or -1 if HwMode doesn't
apply.

The HwMode indices each create a new Predicate feature bit and the
check string from the HwMode is used to set the feature bit.
GIM_CheckFeatures is emitted when the rule has Predicates or the HwModeIdx
is not -1.

Reviewed By: arsenm

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




More information about the All-commits mailing list