[PATCH] D135453: [SelectionDAG] Use consistent type sizes for opcode

Mirko Brkusanin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 08:59:09 PDT 2022


mbrkusanin created this revision.
mbrkusanin added reviewers: foad, arsenm, bogner, RKSimon, tstellar.
mbrkusanin added a project: LLVM.
Herald added subscribers: ecnelises, hiraditya.
Herald added a project: All.
mbrkusanin requested review of this revision.
Herald added a subscriber: wdng.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135453

Files:
  llvm/include/llvm/CodeGen/SelectionDAGNodes.h
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -660,7 +660,7 @@
   }
 }
 
-static void AddNodeIDNode(FoldingSetNodeID &ID, unsigned short OpC,
+static void AddNodeIDNode(FoldingSetNodeID &ID, unsigned OpC,
                           SDVTList VTList, ArrayRef<SDValue> OpList) {
   AddNodeIDOpcode(ID, OpC);
   AddNodeIDValueTypes(ID, VTList);
Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
===================================================================
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -462,7 +462,7 @@
 class SDNode : public FoldingSetNode, public ilist_node<SDNode> {
 private:
   /// The operation that this node performs.
-  int16_t NodeType;
+  int32_t NodeType;
 
 protected:
   // We define a set of mini-helper classes to help us interpret the bits in our
@@ -639,7 +639,7 @@
   /// pre-isel nodes (those for which isMachineOpcode returns false), these
   /// are the opcode values in the ISD and <target>ISD namespaces. For
   /// post-isel opcodes, see getMachineOpcode.
-  unsigned getOpcode()  const { return (unsigned short)NodeType; }
+  unsigned getOpcode()  const { return (unsigned)NodeType; }
 
   /// Test if this node has a target-specific opcode (in the
   /// \<target\>ISD namespace).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135453.466089.patch
Type: text/x-patch
Size: 1469 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221007/22adedde/attachment.bin>


More information about the llvm-commits mailing list