[llvm] [SelectionDAG] Wire up -gen-sdnode-info TableGen backend (PR #125358)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 18:33:39 PST 2025


================
@@ -0,0 +1,115 @@
+//==------------------------------------------------------------------------==//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_INCLUDE_LLVM_CODEGEN_SDNODEINFO_H
+#define LLVM_INCLUDE_LLVM_CODEGEN_SDNODEINFO_H
+
+#include "ISDOpcodes.h"
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/StringTable.h"
+#include "llvm/CodeGenTypes/MachineValueType.h"
+
+namespace llvm {
+
+class SDNode;
+class SelectionDAG;
+
+enum SDNP {
+  SDNPHasChain,
+  SDNPOutGlue,
+  SDNPInGlue,
+  SDNPOptInGlue,
+  SDNPMemOperand,
+  SDNPVariadic,
+};
+
+enum SDTC {
----------------
s-barannikov wrote:

Made it `uint8_t`. (The size of `SDTypeConstraint` reduced from 8 to 6 bytes.)


https://github.com/llvm/llvm-project/pull/125358


More information about the llvm-commits mailing list