@@ -2329,6 +2329,10 @@ CONSTANT_TRANSLATION(ObjectInst, Assign)
23292329CONSTANT_TRANSLATION(StructInst, Assign)
23302330CONSTANT_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)
23612365CONSTANT_TRANSLATION(DestructureStructInst, LookThrough)
23622366CONSTANT_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)
23722380CONSTANT_TRANSLATION(StoreWeakInst, Store)
23732381CONSTANT_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)
23922404CONSTANT_TRANSLATION(EndApplyInst, Ignored)
23932405CONSTANT_TRANSLATION(AbortApplyInst, Ignored)
23942406
2407+ // ===---
2408+ // Require
2409+ //
2410+
23952411// Instructions that only require that the region of the value be live:
23962412CONSTANT_TRANSLATION(FixLifetimeInst, Require)
23972413
2414+ // ===---
2415+ // Terminators
2416+ //
2417+
23982418// Ignored terminators.
23992419CONSTANT_TRANSLATION(CondFailInst, Ignored)
24002420// Switch value inst is ignored since we only switch over integers and
@@ -2409,7 +2429,16 @@ CONSTANT_TRANSLATION(ThrowInst, Require)
24092429CONSTANT_TRANSLATION(SwitchEnumAddrInst, Require)
24102430CONSTANT_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+
24132442CONSTANT_TRANSLATION(AllocExistentialBoxInst, Unhandled)
24142443CONSTANT_TRANSLATION(IndexRawPointerInst, Unhandled)
24152444CONSTANT_TRANSLATION(UncheckedTrivialBitCastInst, Unhandled)
@@ -2488,16 +2517,18 @@ CONSTANT_TRANSLATION(PackElementSetInst, Unhandled)
24882517CONSTANT_TRANSLATION(IncrementProfilerCounterInst, Unhandled)
24892518CONSTANT_TRANSLATION(BeginCOWMutationInst, Unhandled)
24902519
2491- // Apply instructions
2520+ // ===---
2521+ // Apply
2522+ //
2523+
24922524CONSTANT_TRANSLATION(ApplyInst, Apply)
24932525CONSTANT_TRANSLATION(BeginApplyInst, Apply)
24942526CONSTANT_TRANSLATION(BuiltinInst, Apply)
24952527CONSTANT_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