Skip to content

Commit

Permalink
fixup! [FIRRTL] Make IMDCE work for ops w/ regions/blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
seldridge committed Nov 26, 2024
1 parent 08c3c8a commit c4d490a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/Dialect/FIRRTL/Transforms/IMDeadCodeElim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ void IMDeadCodeElimPass::markBlockExecutable(Block *block) {
else if (isa<FConnectLike>(op))
// Skip connect op.
continue;
else if (hasUnknownSideEffect(&op))
else if (hasUnknownSideEffect(&op)) {
markUnknownSideEffectOp(&op);

// Recursively mark any blocks contained within these operations as
// executable.
for (auto &region : op.getRegions())
for (auto &block : region.getBlocks())
markBlockExecutable(&block);
// Recursively mark any blocks contained within these operations as
// executable.
for (auto &region : op.getRegions())
for (auto &block : region.getBlocks())
markBlockExecutable(&block);
}

// TODO: Handle attach etc.
}
Expand Down

0 comments on commit c4d490a

Please sign in to comment.