@@ -2329,6 +2329,10 @@ CONSTANT_TRANSLATION(ObjectInst, Assign)
2329
2329
CONSTANT_TRANSLATION(StructInst, Assign)
2330
2330
CONSTANT_TRANSLATION(TupleInst, Assign)
2331
2331
2332
+ // ===---
2333
+ // Look Through
2334
+ //
2335
+
2332
2336
// Instructions that getUnderlyingTrackedValue is guaranteed to look through
2333
2337
// and whose operand and result are guaranteed to be mapped to the same
2334
2338
// underlying region.
@@ -2361,6 +2365,10 @@ CONSTANT_TRANSLATION(DestructureTupleInst, LookThrough)
2361
2365
CONSTANT_TRANSLATION(DestructureStructInst, LookThrough)
2362
2366
CONSTANT_TRANSLATION(ProjectBlockStorageInst, LookThrough)
2363
2367
2368
+ // ===---
2369
+ // Store
2370
+ //
2371
+
2364
2372
// These are treated as stores - meaning that they could write values into
2365
2373
// memory. The beahvior of this depends on whether the tgt addr is aliased,
2366
2374
// but conservative behavior is to treat these as merges of the regions of
@@ -2372,6 +2380,10 @@ CONSTANT_TRANSLATION(StoreBorrowInst, Store)
2372
2380
CONSTANT_TRANSLATION(StoreWeakInst, Store)
2373
2381
CONSTANT_TRANSLATION(MarkUnresolvedMoveAddrInst, Store)
2374
2382
2383
+ // ===---
2384
+ // Ignored
2385
+ //
2386
+
2375
2387
// These instructions are ignored because they cannot affect the region that a
2376
2388
// value is within or because even though they are technically a use we would
2377
2389
// rather emit an error on a better instruction.
@@ -2392,9 +2404,17 @@ CONSTANT_TRANSLATION(MetatypeInst, Ignored)
2392
2404
CONSTANT_TRANSLATION(EndApplyInst, Ignored)
2393
2405
CONSTANT_TRANSLATION(AbortApplyInst, Ignored)
2394
2406
2407
+ // ===---
2408
+ // Require
2409
+ //
2410
+
2395
2411
// Instructions that only require that the region of the value be live:
2396
2412
CONSTANT_TRANSLATION(FixLifetimeInst, Require)
2397
2413
2414
+ // ===---
2415
+ // Terminators
2416
+ //
2417
+
2398
2418
// Ignored terminators.
2399
2419
CONSTANT_TRANSLATION(CondFailInst, Ignored)
2400
2420
// Switch value inst is ignored since we only switch over integers and
@@ -2409,7 +2429,16 @@ CONSTANT_TRANSLATION(ThrowInst, Require)
2409
2429
CONSTANT_TRANSLATION(SwitchEnumAddrInst, Require)
2410
2430
CONSTANT_TRANSLATION(YieldInst, Require)
2411
2431
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
+
2413
2442
CONSTANT_TRANSLATION(AllocExistentialBoxInst, Unhandled)
2414
2443
CONSTANT_TRANSLATION(IndexRawPointerInst, Unhandled)
2415
2444
CONSTANT_TRANSLATION(UncheckedTrivialBitCastInst, Unhandled)
@@ -2488,16 +2517,18 @@ CONSTANT_TRANSLATION(PackElementSetInst, Unhandled)
2488
2517
CONSTANT_TRANSLATION(IncrementProfilerCounterInst, Unhandled)
2489
2518
CONSTANT_TRANSLATION(BeginCOWMutationInst, Unhandled)
2490
2519
2491
- // Apply instructions
2520
+ // ===---
2521
+ // Apply
2522
+ //
2523
+
2492
2524
CONSTANT_TRANSLATION(ApplyInst, Apply)
2493
2525
CONSTANT_TRANSLATION(BeginApplyInst, Apply)
2494
2526
CONSTANT_TRANSLATION(BuiltinInst, Apply)
2495
2527
CONSTANT_TRANSLATION(TryApplyInst, Apply)
2496
2528
2497
- CONSTANT_TRANSLATION(BranchInst, TerminatorPhi)
2498
- CONSTANT_TRANSLATION(CondBranchInst, TerminatorPhi)
2499
- CONSTANT_TRANSLATION(CheckedCastBranchInst, TerminatorPhi)
2500
- CONSTANT_TRANSLATION(DynamicMethodBranchInst, TerminatorPhi)
2529
+ // ===---
2530
+ // Asserting
2531
+ //
2501
2532
2502
2533
// Non-OSSA instructions that we should never see since we bail on non-OSSA
2503
2534
// functions early.
0 commit comments