[LegalizeDAG] Pass DAG to two calls to SDNode::dump in debug prints so that they...
authorCraig Topper <craig.topper@intel.com>
Tue, 3 Sep 2019 02:51:14 +0000 (02:51 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 3 Sep 2019 02:51:14 +0000 (02:51 +0000)
The dump methods can only print target node names correctly if
they can get access to the TLI object.

llvm-svn: 370694

llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index 285f3fd..1236b74 100644 (file)
@@ -2050,12 +2050,12 @@ SDValue SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, SDNode *Node,
   std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
 
   if (!CallInfo.second.getNode()) {
-    LLVM_DEBUG(dbgs() << "Created tailcall: "; DAG.getRoot().dump());
+    LLVM_DEBUG(dbgs() << "Created tailcall: "; DAG.getRoot().dump(&DAG));
     // It's a tailcall, return the chain (which is the DAG root).
     return DAG.getRoot();
   }
 
-  LLVM_DEBUG(dbgs() << "Created libcall: "; CallInfo.first.dump());
+  LLVM_DEBUG(dbgs() << "Created libcall: "; CallInfo.first.dump(&DAG));
   return CallInfo.first;
 }