[llvm] r314271 - [SelectionDAG] Make NewSDValueDbgMsg print target specific nodes correctly by passing in the SelectionDAG.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 26 22:17:14 PDT 2017
Author: ctopper
Date: Tue Sep 26 22:17:14 2017
New Revision: 314271
URL: http://llvm.org/viewvc/llvm-project?rev=314271&view=rev
Log:
[SelectionDAG] Make NewSDValueDbgMsg print target specific nodes correctly by passing in the SelectionDAG.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=314271&r1=314270&r2=314271&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Sep 26 22:17:14 2017
@@ -89,10 +89,10 @@ void SelectionDAG::DAGUpdateListener::No
#define DEBUG_TYPE "selectiondag"
-static void NewSDValueDbgMsg(SDValue V, StringRef Msg) {
+static void NewSDValueDbgMsg(SDValue V, StringRef Msg, SelectionDAG *G) {
DEBUG(
dbgs() << Msg;
- V.dump();
+ V.getNode()->dump(G);
);
}
@@ -1167,7 +1167,7 @@ SDValue SelectionDAG::getConstant(const
Ops.insert(Ops.end(), EltParts.begin(), EltParts.end());
SDValue V = getNode(ISD::BITCAST, DL, VT, getBuildVector(ViaVecVT, DL, Ops));
- NewSDValueDbgMsg(V, "Creating constant: ");
+ NewSDValueDbgMsg(V, "Creating constant: ", this);
return V;
}
@@ -1194,7 +1194,7 @@ SDValue SelectionDAG::getConstant(const
if (VT.isVector())
Result = getSplatBuildVector(VT, DL, Result);
- NewSDValueDbgMsg(Result, "Creating constant: ");
+ NewSDValueDbgMsg(Result, "Creating constant: ", this);
return Result;
}
@@ -1236,7 +1236,7 @@ SDValue SelectionDAG::getConstantFP(cons
SDValue Result(N, 0);
if (VT.isVector())
Result = getSplatBuildVector(VT, DL, Result);
- NewSDValueDbgMsg(Result, "Creating fp constant: ");
+ NewSDValueDbgMsg(Result, "Creating fp constant: ", this);
return Result;
}
@@ -3499,7 +3499,7 @@ static SDValue FoldCONCAT_VECTORS(const
: DAG.getSExtOrTrunc(Op, DL, SVT);
SDValue V = DAG.getBuildVector(VT, DL, Elts);
- NewSDValueDbgMsg(V, "New node fold concat vectors: ");
+ NewSDValueDbgMsg(V, "New node fold concat vectors: ", &DAG);
return V;
}
@@ -3517,7 +3517,7 @@ SDValue SelectionDAG::getNode(unsigned O
InsertNode(N);
SDValue V = SDValue(N, 0);
- NewSDValueDbgMsg(V, "Creating new node: ");
+ NewSDValueDbgMsg(V, "Creating new node: ", this);
return V;
}
@@ -3880,7 +3880,7 @@ SDValue SelectionDAG::getNode(unsigned O
InsertNode(N);
SDValue V = SDValue(N, 0);
- NewSDValueDbgMsg(V, "Creating new node: ");
+ NewSDValueDbgMsg(V, "Creating new node: ", this);
return V;
}
@@ -4155,7 +4155,7 @@ SDValue SelectionDAG::FoldConstantVector
}
SDValue V = getBuildVector(VT, DL, ScalarResults);
- NewSDValueDbgMsg(V, "New node fold constant vector: ");
+ NewSDValueDbgMsg(V, "New node fold constant vector: ", this);
return V;
}
@@ -4657,7 +4657,7 @@ SDValue SelectionDAG::getNode(unsigned O
InsertNode(N);
SDValue V = SDValue(N, 0);
- NewSDValueDbgMsg(V, "Creating new node: ");
+ NewSDValueDbgMsg(V, "Creating new node: ", this);
return V;
}
@@ -4694,7 +4694,7 @@ SDValue SelectionDAG::getNode(unsigned O
// Vector constant folding.
SDValue Ops[] = {N1, N2, N3};
if (SDValue V = FoldConstantVectorArithmetic(Opcode, DL, VT, Ops)) {
- NewSDValueDbgMsg(V, "New node vector constant folding: ");
+ NewSDValueDbgMsg(V, "New node vector constant folding: ", this);
return V;
}
break;
@@ -4769,7 +4769,7 @@ SDValue SelectionDAG::getNode(unsigned O
InsertNode(N);
SDValue V = SDValue(N, 0);
- NewSDValueDbgMsg(V, "Creating new node: ");
+ NewSDValueDbgMsg(V, "Creating new node: ", this);
return V;
}
More information about the llvm-commits
mailing list