Skip to content

Commit ae9271d

Browse files
update
1 parent 8b62066 commit ae9271d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mlir/lib/Analysis/DataFlow/LivenessAnalysis.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,12 @@ void LivenessAnalysis::visitBranchOperand(OpOperand &operand) {
146146
// Therefore, if the result value is live, we conservatively consider the
147147
// non-forwarded operand of the region branch operation with result may
148148
// live and record all result.
149-
for (Value result : op->getResults()) {
149+
for (auto [resultIndex, result] : llvm::enumerate(op->getResults())) {
150150
if (getLatticeElement(result)->isLive) {
151151
mayLive = true;
152-
LDBG() << "[visitBranchOperand] Non-forwarded branch "
153-
"operand may be live due to live result: "
152+
LDBG() << "[visitBranchOperand] Non-forwarded branch operand may be "
153+
"live due to live result #"
154+
<< resultIndex << ": "
154155
<< OpWithFlags(op, OpPrintingFlags().skipRegions());
155156
break;
156157
}

0 commit comments

Comments
 (0)