[SelectionDAG] Port ARC/M68k/LoongArch after D140161
authorFangrui Song <i@maskray.me>
Fri, 16 Dec 2022 07:34:42 +0000 (07:34 +0000)
committerFangrui Song <i@maskray.me>
Fri, 16 Dec 2022 07:34:42 +0000 (07:34 +0000)
llvm/lib/Target/ARC/ARCISelDAGToDAG.cpp
llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp
llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.h
llvm/lib/Target/M68k/M68kISelDAGToDAG.cpp

index 40d9ae4..a0bf17d 100644 (file)
@@ -38,8 +38,10 @@ namespace {
 
 class ARCDAGToDAGISel : public SelectionDAGISel {
 public:
+  static char ID;
+
   ARCDAGToDAGISel(ARCTargetMachine &TM, CodeGenOpt::Level OptLevel)
-      : SelectionDAGISel(TM, OptLevel) {}
+      : SelectionDAGISel(ID, TM, OptLevel) {}
 
   void Select(SDNode *N) override;
 
@@ -57,6 +59,8 @@ public:
 #include "ARCGenDAGISel.inc"
 };
 
+char ARCDAGToDAGISel::ID;
+
 } // end anonymous namespace
 
 /// This pass converts a legalized DAG into a ARC-specific DAG, ready for
index 49684b9..8dfaf6f 100644 (file)
@@ -20,6 +20,8 @@ using namespace llvm;
 
 #define DEBUG_TYPE "loongarch-isel"
 
+char LoongArchDAGToDAGISel::ID;
+
 void LoongArchDAGToDAGISel::Select(SDNode *Node) {
   // If we have a custom node, we have already selected.
   if (Node->isMachineOpcode()) {
index 49843ac..3474813 100644 (file)
@@ -24,8 +24,10 @@ class LoongArchDAGToDAGISel : public SelectionDAGISel {
   const LoongArchSubtarget *Subtarget = nullptr;
 
 public:
+  static char ID;
+
   explicit LoongArchDAGToDAGISel(LoongArchTargetMachine &TM)
-      : SelectionDAGISel(TM) {}
+      : SelectionDAGISel(ID, TM) {}
 
   StringRef getPassName() const override {
     return "LoongArch DAG->DAG Pattern Instruction Selection";
index f9459e2..dd3a1a0 100644 (file)
@@ -173,8 +173,10 @@ namespace {
 
 class M68kDAGToDAGISel : public SelectionDAGISel {
 public:
+  static char ID;
+
   explicit M68kDAGToDAGISel(M68kTargetMachine &TM)
-      : SelectionDAGISel(TM), Subtarget(nullptr) {}
+      : SelectionDAGISel(ID, TM), Subtarget(nullptr) {}
 
   StringRef getPassName() const override {
     return "M68k DAG->DAG Pattern Instruction Selection";
@@ -310,6 +312,8 @@ private:
   /// if necessary.
   SDNode *getGlobalBaseReg();
 };
+
+char M68kDAGToDAGISel::ID;
 } // namespace
 
 bool M68kDAGToDAGISel::IsProfitableToFold(SDValue N, SDNode *U,