Skip to content

Commit e2c5cbc

Browse files
committed
[SystemZ] Pass the DAG pointer from SystemZAddressingMode::dump().
In order to print the IR slot number for the memory operand, the DAG pointer must be passed to SDNode::dump(). The isel-debug.ll test updated to also check for the IR Value reference being printed correctly. Review: Ulrich Weigand https://reviews.llvm.org/D53333 llvm-svn: 345347
1 parent b76e25a commit e2c5cbc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,19 @@ struct SystemZAddressingMode {
7171
// True if the address can (and must) include ADJDYNALLOC.
7272
bool isDynAlloc() { return Form == FormBDXDynAlloc; }
7373

74-
void dump() {
74+
void dump(const llvm::SelectionDAG *DAG) {
7575
errs() << "SystemZAddressingMode " << this << '\n';
7676

7777
errs() << " Base ";
7878
if (Base.getNode())
79-
Base.getNode()->dump();
79+
Base.getNode()->dump(DAG);
8080
else
8181
errs() << "null\n";
8282

8383
if (hasIndexField()) {
8484
errs() << " Index ";
8585
if (Index.getNode())
86-
Index.getNode()->dump();
86+
Index.getNode()->dump(DAG);
8787
else
8888
errs() << "null\n";
8989
}
@@ -589,7 +589,7 @@ bool SystemZDAGToDAGISel::selectAddress(SDValue Addr,
589589
if (AM.isDynAlloc() && !AM.IncludesDynAlloc)
590590
return false;
591591

592-
LLVM_DEBUG(AM.dump());
592+
LLVM_DEBUG(AM.dump(CurDAG));
593593
return true;
594594
}
595595

llvm/test/CodeGen/SystemZ/isel-debug.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
;
66
; Check that some debug output is printed without problems.
77
; CHECK: SystemZAddressingMode
8-
; CHECK: Base
8+
; CHECK: Base t5: i64,ch = load<(load 8 from %ir.0)>
99
; CHECK: Index
1010
; CHECK: Disp
1111

0 commit comments

Comments
 (0)