@@ -109,19 +109,19 @@ LivenessAnalysis::visitOperation(Operation *op, ArrayRef<Liveness *> operands,
109109 foundLiveResult = true ;
110110 }
111111 LDBG () << " [visitOperation] Adding dependency for result: " << r
112- << " after op: " << *op ;
112+ << " after op: " << OpWithFlags (op, OpPrintingFlags (). skipRegions ()) ;
113113 addDependency (const_cast <Liveness *>(r), getProgramPointAfter (op));
114114 }
115115 return success ();
116116}
117117
118118void LivenessAnalysis::visitBranchOperand (OpOperand &operand) {
119+ Operation *op = operand.getOwner ();
119120 LDBG () << " Visiting branch operand: " << operand.get ()
120- << " in op: " << *operand. getOwner ( );
121+ << " in op: " << OpWithFlags (op, OpPrintingFlags (). skipRegions () );
121122 // We know (at the moment) and assume (for the future) that `operand` is a
122123 // non-forwarded branch operand of a `RegionBranchOpInterface`,
123124 // `BranchOpInterface`, `RegionBranchTerminatorOpInterface` or return-like op.
124- Operation *op = operand.getOwner ();
125125 assert ((isa<RegionBranchOpInterface>(op) || isa<BranchOpInterface>(op) ||
126126 isa<RegionBranchTerminatorOpInterface>(op)) &&
127127 " expected the op to be `RegionBranchOpInterface`, "
@@ -151,7 +151,7 @@ void LivenessAnalysis::visitBranchOperand(OpOperand &operand) {
151151 mayLive = true ;
152152 LDBG () << " [visitBranchOperand] Non-forwarded branch "
153153 " operand may be live due to live result: "
154- << result ;
154+ << OpWithFlags (op, OpPrintingFlags (). skipRegions ()) ;
155155 break ;
156156 }
157157 }
@@ -233,7 +233,8 @@ void LivenessAnalysis::visitBranchOperand(OpOperand &operand) {
233233 SmallVector<const Liveness *, 4 > resultsLiveness;
234234 for (const Value result : op->getResults ())
235235 resultsLiveness.push_back (getLatticeElement (result));
236- LDBG () << " Visiting operation for non-forwarded branch operand: " << *op;
236+ LDBG () << " Visiting operation for non-forwarded branch operand: "
237+ << OpWithFlags (op, OpPrintingFlags ().skipRegions ());
237238 (void )visitOperation (op, operandLiveness, resultsLiveness);
238239
239240 // We also visit the parent op with the parent's results and this operand if
0 commit comments