Skip to content

Commit 2a6bce9

Browse files
Apply review
1 parent baaec5c commit 2a6bce9

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

clang/lib/CIR/Dialect/IR/CIRDialect.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,11 +2163,6 @@ void cir::AwaitOp::build(OpBuilder &builder, OperationState &result,
21632163
}
21642164
}
21652165

2166-
/// Given the region at `index`, or the parent operation if `index` is None,
2167-
/// return the successor regions. These are the regions that may be selected
2168-
/// during the flow of control. `operands` is a set of optional attributes
2169-
/// that correspond to a constant value for each operand, or null if that
2170-
/// operand is not a constant.
21712166
void cir::AwaitOp::getSuccessorRegions(
21722167
mlir::RegionBranchPoint point, SmallVectorImpl<RegionSuccessor> &regions) {
21732168
// If any index all the underlying regions branch back to the parent
@@ -2178,8 +2173,9 @@ void cir::AwaitOp::getSuccessorRegions(
21782173
return;
21792174
}
21802175

2181-
// FIXME: we want to look at cond region for getting more accurate results
2182-
// if the other regions will get a chance to execute.
2176+
// TODO: retrieve information from the promise and only push the
2177+
// necessary ones. Example: `std::suspend_never` on initial or final
2178+
// await's might allow suspend region to be skipped.
21832179
regions.push_back(RegionSuccessor(&this->getReady()));
21842180
regions.push_back(RegionSuccessor(&this->getSuspend()));
21852181
regions.push_back(RegionSuccessor(&this->getResume()));

0 commit comments

Comments
 (0)