OSDN Git Service

[SystemZ] Pass the DAG pointer from SystemZAddressingMode::dump().
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Fri, 26 Oct 2018 00:02:33 +0000 (00:02 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Fri, 26 Oct 2018 00:02:33 +0000 (00:02 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345347 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
test/CodeGen/SystemZ/isel-debug.ll

index 5edfdf6..c8474b1 100644 (file)
@@ -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(SDValue Addr,
   if (AM.isDynAlloc() && !AM.IncludesDynAlloc)
     return false;
 
-  LLVM_DEBUG(AM.dump());
+  LLVM_DEBUG(AM.dump(CurDAG));
   return true;
 }
 
index cf5370c..0e48210 100644 (file)
@@ -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