Skip to content

Commit 28c236e

Browse files
Apply review
1 parent cba9f8c commit 28c236e

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
@@ -2196,11 +2196,6 @@ void cir::AwaitOp::build(OpBuilder &builder, OperationState &result,
21962196
}
21972197
}
21982198

2199-
/// Given the region at `index`, or the parent operation if `index` is None,
2200-
/// return the successor regions. These are the regions that may be selected
2201-
/// during the flow of control. `operands` is a set of optional attributes
2202-
/// that correspond to a constant value for each operand, or null if that
2203-
/// operand is not a constant.
22042199
void cir::AwaitOp::getSuccessorRegions(
22052200
mlir::RegionBranchPoint point, SmallVectorImpl<RegionSuccessor> &regions) {
22062201
// If any index all the underlying regions branch back to the parent
@@ -2211,8 +2206,9 @@ void cir::AwaitOp::getSuccessorRegions(
22112206
return;
22122207
}
22132208

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

0 commit comments

Comments
 (0)