[PATCH] D12567: SelectionDAGDumper: Print simple operands inline.
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 11:28:57 PDT 2015
MatzeB updated this revision to Diff 35283.
MatzeB added a comment.
New version which does not depend on http://reviews.llvm.org/D12565 anymore.
For inlined operations this will still print the type behind the operation ("Constant:i32<42>") for toplevel operations the type is still printed on the lhs as before ("tXX: type = operation").
Note that this commit now moves the node details behind the node (like dumpr() already did). The previous behaviour of printing the details behind the operands would be confusing in combination with inlined operations (confusing example: "load t0, t2, undef:i64<LD1[%tmp81]>" as the <LD1...> is part of the load not the undef). We now print: "load<LD1[%tmp81]> t0, t2, undef:i64".
Longer example, before:
t0: ch = EntryToken
t1: i64 = Register %vreg0
t2: i64,ch = CopyFromReg t0, t1
t3: i64 = Constant<1>
t4: i64 = add t2, t3
t5: i64 = Constant<2>
t6: i64 = add t2, t5
t10: i64 = undef
t11: i8,ch = load t0, t2, t10<LD1[%tmp81]>
t12: i8,ch = load t0, t4, t10<LD1[%tmp10]>
t13: i8,ch = load t0, t6, t10<LD1[%tmp12]>
Now:
t0: ch = EntryToken
t2: i64,ch = CopyFromReg t0, Register:i64 %vreg0
t4: i64 = add t2, Constant:i64<1>
t6: i64 = add t2, Constant:i64<2>
t11: i8,ch = load<LD1[%tmp81]> t0, t2, undef:i64
t12: i8,ch = load<LD1[%tmp10]> t0, t4, undef:i64
t13: i8,ch = load<LD1[%tmp12]> t0, t6, undef:i64
Repository:
rL LLVM
http://reviews.llvm.org/D12567
Files:
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Index: lib/CodeGen/SelectionDAG/SelectionDAG.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -927,7 +927,7 @@
EntryNode(ISD::EntryToken, 0, DebugLoc(), getVTList(MVT::Other)),
Root(getEntryNode()), NewNodesMustHaveLegalTypes(false),
UpdateListeners(nullptr) {
- AllNodes.push_back(&EntryNode);
+ InsertNode(&EntryNode);
DbgInfo = new SDDbgInfo();
}
@@ -1024,7 +1024,7 @@
static_cast<SDNode*>(nullptr));
EntryNode.UseList = nullptr;
- AllNodes.push_back(&EntryNode);
+ InsertNode(&EntryNode);
Root = getEntryNode();
DbgInfo->clear();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12567.35283.patch
Type: text/x-patch
Size: 710 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150921/60ff32cc/attachment.bin>
More information about the llvm-commits
mailing list