@@ -286,14 +286,14 @@ void cir::ConditionOp::getSuccessorRegions(
286286  //  Parent is a loop: condition may branch to the body or to the parent op.
287287  if  (auto  loopOp = dyn_cast<LoopOpInterface>(getOperation ()->getParentOp ())) {
288288    regions.emplace_back (&loopOp.getBody (), loopOp.getBody ().getArguments ());
289-     regions.emplace_back (loopOp->getResults ());
289+     regions.emplace_back (getOperation (),  loopOp->getResults ());
290290  }
291291
292292  assert (!cir::MissingFeatures::awaitOp ());
293293}
294294
295295MutableOperandRange
296- cir::ConditionOp::getMutableSuccessorOperands (RegionBranchPoint  point) {
296+ cir::ConditionOp::getMutableSuccessorOperands (RegionSuccessor  point) {
297297  //  No values are yielded to the successor region.
298298  return  MutableOperandRange (getOperation (), 0 , 0 );
299299}
@@ -989,7 +989,8 @@ void cir::IfOp::getSuccessorRegions(mlir::RegionBranchPoint point,
989989                                    SmallVectorImpl<RegionSuccessor> ®ions) {
990990  //  The `then` and the `else` region branch back to the parent operation.
991991  if  (!point.isParent ()) {
992-     regions.push_back (RegionSuccessor ());
992+     regions.push_back (
993+         RegionSuccessor (getOperation (), getOperation ()->getResults ()));
993994    return ;
994995  }
995996
@@ -1039,7 +1040,7 @@ void cir::ScopeOp::getSuccessorRegions(
10391040    mlir::RegionBranchPoint point, SmallVectorImpl<RegionSuccessor> ®ions) {
10401041  //  The only region always branch back to the parent operation.
10411042  if  (!point.isParent ()) {
1042-     regions.push_back (RegionSuccessor (getODSResults (0 )));
1043+     regions.push_back (RegionSuccessor (getOperation (),  getODSResults (0 )));
10431044    return ;
10441045  }
10451046
@@ -1124,7 +1125,8 @@ Block *cir::BrCondOp::getSuccessorForOperands(ArrayRef<Attribute> operands) {
11241125void  cir::CaseOp::getSuccessorRegions (
11251126    mlir::RegionBranchPoint point, SmallVectorImpl<RegionSuccessor> ®ions) {
11261127  if  (!point.isParent ()) {
1127-     regions.push_back (RegionSuccessor ());
1128+     regions.push_back (
1129+         RegionSuccessor (getOperation (), getOperation ()->getResults ()));
11281130    return ;
11291131  }
11301132  regions.push_back (RegionSuccessor (&getCaseRegion ()));
@@ -1188,7 +1190,8 @@ static void printSwitchOp(OpAsmPrinter &p, cir::SwitchOp op,
11881190void  cir::SwitchOp::getSuccessorRegions (
11891191    mlir::RegionBranchPoint point, SmallVectorImpl<RegionSuccessor> ®ion) {
11901192  if  (!point.isParent ()) {
1191-     region.push_back (RegionSuccessor ());
1193+     region.push_back (
1194+         RegionSuccessor (getOperation (), getOperation ()->getResults ()));
11921195    return ;
11931196  }
11941197
@@ -1402,7 +1405,8 @@ void cir::GlobalOp::getSuccessorRegions(
14021405    mlir::RegionBranchPoint point, SmallVectorImpl<RegionSuccessor> ®ions) {
14031406  //  The `ctor` and `dtor` regions always branch back to the parent operation.
14041407  if  (!point.isParent ()) {
1405-     regions.push_back (RegionSuccessor ());
1408+     regions.push_back (
1409+         RegionSuccessor (getOperation (), getOperation ()->getResults ()));
14061410    return ;
14071411  }
14081412
@@ -1961,7 +1965,7 @@ void cir::TernaryOp::getSuccessorRegions(
19611965    mlir::RegionBranchPoint point, SmallVectorImpl<RegionSuccessor> ®ions) {
19621966  //  The `true` and the `false` region branch back to the parent operation.
19631967  if  (!point.isParent ()) {
1964-     regions.push_back (RegionSuccessor (this ->getODSResults (0 )));
1968+     regions.push_back (RegionSuccessor (getOperation (),  this ->getODSResults (0 )));
19651969    return ;
19661970  }
19671971
@@ -2978,7 +2982,8 @@ void cir::TryOp::getSuccessorRegions(
29782982    llvm::SmallVectorImpl<mlir::RegionSuccessor> ®ions) {
29792983  //  The `try` and the `catchers` region branch back to the parent operation.
29802984  if  (!point.isParent ()) {
2981-     regions.push_back (mlir::RegionSuccessor ());
2985+     regions.push_back (
2986+         RegionSuccessor (getOperation (), getOperation ()->getResults ()));
29822987    return ;
29832988  }
29842989
0 commit comments