Skip to content

Commit 1f483c9

Browse files
committed
Fix liveness analysis
The problem is that the live in set is not necessarily already populated when we ask for the start op
1 parent 08a424a commit 1f483c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Analysis/Liveness.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ Operation *LivenessBlockInfo::getStartOperation(Value value) const {
369369
Operation *definingOp = value.getDefiningOp();
370370
// The given value is either live-in or is defined
371371
// in the scope of this block.
372-
if (isLiveIn(value) || !definingOp)
372+
if (!definingOp || definingOp->getBlock() != block)
373373
return &block->front();
374374
return definingOp;
375375
}

0 commit comments

Comments
 (0)