Skip to content

Commit 71a8c8e

Browse files
committed
[region-isolation] Some small comment cleanups/reordering of definitions. NFCI.
1 parent 998f067 commit 71a8c8e

File tree

1 file changed

+37
-6
lines changed

1 file changed

+37
-6
lines changed

lib/SILOptimizer/Mandatory/TransferNonSendable.cpp

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,6 +2329,10 @@ CONSTANT_TRANSLATION(ObjectInst, Assign)
23292329
CONSTANT_TRANSLATION(StructInst, Assign)
23302330
CONSTANT_TRANSLATION(TupleInst, Assign)
23312331

2332+
//===---
2333+
// Look Through
2334+
//
2335+
23322336
// Instructions that getUnderlyingTrackedValue is guaranteed to look through
23332337
// and whose operand and result are guaranteed to be mapped to the same
23342338
// underlying region.
@@ -2361,6 +2365,10 @@ CONSTANT_TRANSLATION(DestructureTupleInst, LookThrough)
23612365
CONSTANT_TRANSLATION(DestructureStructInst, LookThrough)
23622366
CONSTANT_TRANSLATION(ProjectBlockStorageInst, LookThrough)
23632367

2368+
//===---
2369+
// Store
2370+
//
2371+
23642372
// These are treated as stores - meaning that they could write values into
23652373
// memory. The beahvior of this depends on whether the tgt addr is aliased,
23662374
// but conservative behavior is to treat these as merges of the regions of
@@ -2372,6 +2380,10 @@ CONSTANT_TRANSLATION(StoreBorrowInst, Store)
23722380
CONSTANT_TRANSLATION(StoreWeakInst, Store)
23732381
CONSTANT_TRANSLATION(MarkUnresolvedMoveAddrInst, Store)
23742382

2383+
//===---
2384+
// Ignored
2385+
//
2386+
23752387
// These instructions are ignored because they cannot affect the region that a
23762388
// value is within or because even though they are technically a use we would
23772389
// rather emit an error on a better instruction.
@@ -2392,9 +2404,17 @@ CONSTANT_TRANSLATION(MetatypeInst, Ignored)
23922404
CONSTANT_TRANSLATION(EndApplyInst, Ignored)
23932405
CONSTANT_TRANSLATION(AbortApplyInst, Ignored)
23942406

2407+
//===---
2408+
// Require
2409+
//
2410+
23952411
// Instructions that only require that the region of the value be live:
23962412
CONSTANT_TRANSLATION(FixLifetimeInst, Require)
23972413

2414+
//===---
2415+
// Terminators
2416+
//
2417+
23982418
// Ignored terminators.
23992419
CONSTANT_TRANSLATION(CondFailInst, Ignored)
24002420
// Switch value inst is ignored since we only switch over integers and
@@ -2409,7 +2429,16 @@ CONSTANT_TRANSLATION(ThrowInst, Require)
24092429
CONSTANT_TRANSLATION(SwitchEnumAddrInst, Require)
24102430
CONSTANT_TRANSLATION(YieldInst, Require)
24112431

2412-
// Unhandled instructions
2432+
// Terminators that act as phis.
2433+
CONSTANT_TRANSLATION(BranchInst, TerminatorPhi)
2434+
CONSTANT_TRANSLATION(CondBranchInst, TerminatorPhi)
2435+
CONSTANT_TRANSLATION(CheckedCastBranchInst, TerminatorPhi)
2436+
CONSTANT_TRANSLATION(DynamicMethodBranchInst, TerminatorPhi)
2437+
2438+
//===---
2439+
// Unhandled Instructions
2440+
//
2441+
24132442
CONSTANT_TRANSLATION(AllocExistentialBoxInst, Unhandled)
24142443
CONSTANT_TRANSLATION(IndexRawPointerInst, Unhandled)
24152444
CONSTANT_TRANSLATION(UncheckedTrivialBitCastInst, Unhandled)
@@ -2488,16 +2517,18 @@ CONSTANT_TRANSLATION(PackElementSetInst, Unhandled)
24882517
CONSTANT_TRANSLATION(IncrementProfilerCounterInst, Unhandled)
24892518
CONSTANT_TRANSLATION(BeginCOWMutationInst, Unhandled)
24902519

2491-
// Apply instructions
2520+
//===---
2521+
// Apply
2522+
//
2523+
24922524
CONSTANT_TRANSLATION(ApplyInst, Apply)
24932525
CONSTANT_TRANSLATION(BeginApplyInst, Apply)
24942526
CONSTANT_TRANSLATION(BuiltinInst, Apply)
24952527
CONSTANT_TRANSLATION(TryApplyInst, Apply)
24962528

2497-
CONSTANT_TRANSLATION(BranchInst, TerminatorPhi)
2498-
CONSTANT_TRANSLATION(CondBranchInst, TerminatorPhi)
2499-
CONSTANT_TRANSLATION(CheckedCastBranchInst, TerminatorPhi)
2500-
CONSTANT_TRANSLATION(DynamicMethodBranchInst, TerminatorPhi)
2529+
//===---
2530+
// Asserting
2531+
//
25012532

25022533
// Non-OSSA instructions that we should never see since we bail on non-OSSA
25032534
// functions early.

0 commit comments

Comments
 (0)