[llvm] r345347 - [SystemZ] Pass the DAG pointer from SystemZAddressingMode::dump().

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 25 17:02:34 PDT 2018


Author: jonpa
Date: Thu Oct 25 17:02:33 2018
New Revision: 345347

URL: http://llvm.org/viewvc/llvm-project?rev=345347&view=rev
Log:
[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

Modified:
    llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
    llvm/trunk/test/CodeGen/SystemZ/isel-debug.ll

Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp?rev=345347&r1=345346&r2=345347&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp Thu Oct 25 17:02:33 2018
@@ -71,19 +71,19 @@ struct SystemZAddressingMode {
   // True if the address can (and must) include ADJDYNALLOC.
   bool isDynAlloc() { return Form == FormBDXDynAlloc; }
 
-  void dump() {
+  void dump(const llvm::SelectionDAG *DAG) {
     errs() << "SystemZAddressingMode " << this << '\n';
 
     errs() << " Base ";
     if (Base.getNode())
-      Base.getNode()->dump();
+      Base.getNode()->dump(DAG);
     else
       errs() << "null\n";
 
     if (hasIndexField()) {
       errs() << " Index ";
       if (Index.getNode())
-        Index.getNode()->dump();
+        Index.getNode()->dump(DAG);
       else
         errs() << "null\n";
     }
@@ -589,7 +589,7 @@ bool SystemZDAGToDAGISel::selectAddress(
   if (AM.isDynAlloc() && !AM.IncludesDynAlloc)
     return false;
 
-  LLVM_DEBUG(AM.dump());
+  LLVM_DEBUG(AM.dump(CurDAG));
   return true;
 }
 

Modified: llvm/trunk/test/CodeGen/SystemZ/isel-debug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SystemZ/isel-debug.ll?rev=345347&r1=345346&r2=345347&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/SystemZ/isel-debug.ll (original)
+++ llvm/trunk/test/CodeGen/SystemZ/isel-debug.ll Thu Oct 25 17:02:33 2018
@@ -5,7 +5,7 @@
 ;
 ; Check that some debug output is printed without problems.
 ; CHECK: SystemZAddressingMode
-; CHECK: Base
+; CHECK: Base t5: i64,ch = load<(load 8 from %ir.0)>
 ; CHECK: Index
 ; CHECK: Disp
 




More information about the llvm-commits mailing list