[llvm] r253524 - Initialize PersistentId for HandleSDNode, as these will never be inserted into the DAG

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 16:05:10 PST 2015


Author: rnk
Date: Wed Nov 18 18:05:09 2015
New Revision: 253524

URL: http://llvm.org/viewvc/llvm-project?rev=253524&view=rev
Log:
Initialize PersistentId for HandleSDNode, as these will never be inserted into the DAG

Modified:
    llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h

Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=253524&r1=253523&r2=253524&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Wed Nov 18 18:05:09 2015
@@ -1074,6 +1074,9 @@ class HandleSDNode : public SDNode {
 public:
   explicit HandleSDNode(SDValue X)
     : SDNode(ISD::HANDLENODE, 0, DebugLoc(), getSDVTList(MVT::Other)) {
+    // HandleSDNodes are never inserted into the DAG, so they won't be
+    // auto-numbered. Use ID 65535 as a sentinel.
+    PersistentId = 0xffff;
     InitOperands(&Op, X);
   }
   ~HandleSDNode();




More information about the llvm-commits mailing list