@@ -90,7 +90,7 @@ struct DenseMapInfo<swift::PartitionPrimitives::Region> {
9090
9191namespace swift {
9292
93- class IsolationRegionInfo {
93+ class SILIsolationInfo {
9494public:
9595 // / The lattice is:
9696 // /
@@ -117,15 +117,14 @@ class IsolationRegionInfo {
117117 > data;
118118 // clang-format on
119119
120- IsolationRegionInfo (Kind kind, std::optional<ActorIsolation> actorIsolation)
120+ SILIsolationInfo (Kind kind, std::optional<ActorIsolation> actorIsolation)
121121 : kind(kind), data(actorIsolation) {}
122- IsolationRegionInfo (Kind kind, NominalTypeDecl *decl)
123- : kind(kind), data(decl) {}
122+ SILIsolationInfo (Kind kind, NominalTypeDecl *decl) : kind(kind), data(decl) {}
124123
125- IsolationRegionInfo (Kind kind, SILValue value) : kind(kind), data(value) {}
124+ SILIsolationInfo (Kind kind, SILValue value) : kind(kind), data(value) {}
126125
127126public:
128- IsolationRegionInfo () : kind(Kind::Unknown), data() {}
127+ SILIsolationInfo () : kind(Kind::Unknown), data() {}
129128
130129 operator bool () const { return kind != Kind::Unknown; }
131130
@@ -215,7 +214,7 @@ class IsolationRegionInfo {
215214 return nullptr ;
216215 }
217216
218- [[nodiscard]] IsolationRegionInfo merge (IsolationRegionInfo other) const {
217+ [[nodiscard]] SILIsolationInfo merge (SILIsolationInfo other) const {
219218 // If we are greater than the other kind, then we are further along the
220219 // lattice. We ignore the change.
221220 if (unsigned (other.kind ) < unsigned (kind))
@@ -230,21 +229,19 @@ class IsolationRegionInfo {
230229 return other;
231230 }
232231
233- IsolationRegionInfo withActorIsolated (ActorIsolation isolation) {
234- return IsolationRegionInfo ::getActorIsolated (isolation);
232+ SILIsolationInfo withActorIsolated (ActorIsolation isolation) {
233+ return SILIsolationInfo ::getActorIsolated (isolation);
235234 }
236235
237- static IsolationRegionInfo getDisconnected () {
238- return {Kind::Disconnected, {}};
239- }
236+ static SILIsolationInfo getDisconnected () { return {Kind::Disconnected, {}}; }
240237
241- static IsolationRegionInfo getActorIsolated (ActorIsolation actorIsolation) {
238+ static SILIsolationInfo getActorIsolated (ActorIsolation actorIsolation) {
242239 return {Kind::Actor, actorIsolation};
243240 }
244241
245242 // / Sometimes we may have something that is actor isolated or that comes from
246243 // / a type. First try getActorIsolation and otherwise, just use the type.
247- static IsolationRegionInfo getActorIsolated (NominalTypeDecl *nomDecl) {
244+ static SILIsolationInfo getActorIsolated (NominalTypeDecl *nomDecl) {
248245 auto actorIsolation = swift::getActorIsolation (nomDecl);
249246 if (actorIsolation.isActorIsolated ())
250247 return getActorIsolated (actorIsolation);
@@ -253,14 +250,14 @@ class IsolationRegionInfo {
253250 return {};
254251 }
255252
256- static IsolationRegionInfo getTaskIsolated (SILValue value) {
253+ static SILIsolationInfo getTaskIsolated (SILValue value) {
257254 return {Kind::Task, value};
258255 }
259256
260257 // / Attempt to infer the isolation region info for \p inst.
261- static IsolationRegionInfo get (SILInstruction *inst);
258+ static SILIsolationInfo get (SILInstruction *inst);
262259
263- bool operator ==(const IsolationRegionInfo &other) const {
260+ bool operator ==(const SILIsolationInfo &other) const {
264261 if (getKind () != other.getKind ())
265262 return false ;
266263
@@ -1239,16 +1236,17 @@ struct PartitionOpEvaluator {
12391236 }
12401237
12411238 // / Call handleTransferNonTransferrable on our CRTP subclass.
1242- void handleTransferNonTransferrable (
1243- const PartitionOp &op, Element elt,
1244- IsolationRegionInfo isolationRegionInfo) const {
1239+ void
1240+ handleTransferNonTransferrable ( const PartitionOp &op, Element elt,
1241+ SILIsolationInfo isolationRegionInfo) const {
12451242 return asImpl ().handleTransferNonTransferrable (op, elt,
12461243 isolationRegionInfo);
12471244 }
12481245 // / Just call our CRTP subclass.
1249- void handleTransferNonTransferrable (
1250- const PartitionOp &op, Element elt, Element otherElement,
1251- IsolationRegionInfo isolationRegionInfo) const {
1246+ void
1247+ handleTransferNonTransferrable (const PartitionOp &op, Element elt,
1248+ Element otherElement,
1249+ SILIsolationInfo isolationRegionInfo) const {
12521250 return asImpl ().handleTransferNonTransferrable (op, elt, otherElement,
12531251 isolationRegionInfo);
12541252 }
@@ -1258,18 +1256,18 @@ struct PartitionOpEvaluator {
12581256 return asImpl ().isActorDerived (elt);
12591257 }
12601258
1261- IsolationRegionInfo getIsolationRegionInfo (Element elt) const {
1259+ SILIsolationInfo getIsolationRegionInfo (Element elt) const {
12621260 return asImpl ().getIsolationRegionInfo (elt);
12631261 }
12641262
12651263 // / Compute the isolation region info for all elements in \p region.
12661264 // /
12671265 // / The bool result is if it is captured by a closure element. That only is
12681266 // / computed if \p sourceOp is non-null.
1269- std::pair<IsolationRegionInfo , bool >
1267+ std::pair<SILIsolationInfo , bool >
12701268 getIsolationRegionInfo (Region region, Operand *sourceOp) const {
12711269 bool isClosureCapturedElt = false ;
1272- IsolationRegionInfo isolationRegionInfo;
1270+ SILIsolationInfo isolationRegionInfo;
12731271
12741272 for (const auto &pair : p.range ()) {
12751273 if (pair.second == region) {
@@ -1284,7 +1282,7 @@ struct PartitionOpEvaluator {
12841282 }
12851283
12861284 // / Overload of \p getIsolationRegionInfo without an Operand.
1287- IsolationRegionInfo getIsolationRegionInfo (Region region) const {
1285+ SILIsolationInfo getIsolationRegionInfo (Region region) const {
12881286 return getIsolationRegionInfo (region, nullptr ).first ;
12891287 }
12901288
@@ -1352,7 +1350,7 @@ struct PartitionOpEvaluator {
13521350 Element transferredElement = op.getOpArgs ()[0 ];
13531351 Region transferredRegion = p.getRegion (transferredElement);
13541352 bool isClosureCapturedElt = false ;
1355- IsolationRegionInfo transferredRegionIsolation;
1353+ SILIsolationInfo transferredRegionIsolation;
13561354 std::tie (transferredRegionIsolation, isClosureCapturedElt) =
13571355 getIsolationRegionInfo (transferredRegion, op.getSourceOp ());
13581356
@@ -1464,11 +1462,12 @@ struct PartitionOpEvaluatorBaseImpl : PartitionOpEvaluator<Subclass> {
14641462 // / This is called if we detect a never transferred element that was passed to
14651463 // / a transfer instruction.
14661464 void handleTransferNonTransferrable (const PartitionOp &op, Element elt,
1467- IsolationRegionInfo regionInfo) const {}
1465+ SILIsolationInfo regionInfo) const {}
14681466
1469- void handleTransferNonTransferrable (
1470- const PartitionOp &op, Element elt, Element otherElement,
1471- IsolationRegionInfo isolationRegionInfo) const {}
1467+ void
1468+ handleTransferNonTransferrable (const PartitionOp &op, Element elt,
1469+ Element otherElement,
1470+ SILIsolationInfo isolationRegionInfo) const {}
14721471
14731472 // / This is used to determine if an element is actor derived. If we determine
14741473 // / that a region containing such an element is transferred, we emit an error
@@ -1481,8 +1480,8 @@ struct PartitionOpEvaluatorBaseImpl : PartitionOpEvaluator<Subclass> {
14811480
14821481 // / Returns the information about \p elt's isolation that we ascertained from
14831482 // / SIL and the AST.
1484- IsolationRegionInfo getIsolationRegionInfo (Element elt) const {
1485- return IsolationRegionInfo ();
1483+ SILIsolationInfo getIsolationRegionInfo (Element elt) const {
1484+ return SILIsolationInfo ();
14861485 }
14871486
14881487 // / Check if the representative value of \p elt is closure captured at \p
0 commit comments