@@ -515,9 +515,6 @@ BUILTIN_SIL_OPERATION(WithUnsafeThrowingContinuation, "withUnsafeThrowingContinu
515
515
// / Force the current task to be rescheduled on the specified actor.
516
516
BUILTIN_SIL_OPERATION(HopToActor, " hopToActor" , None)
517
517
518
- // / Generate a move_value instruction to convert a T to a @_moveOnly T.
519
- BUILTIN_SIL_OPERATION(Move, " move" , Special)
520
-
521
518
#undef BUILTIN_SIL_OPERATION
522
519
523
520
// BUILTIN_RUNTIME_CALL - A call into a runtime function.
@@ -603,6 +600,29 @@ BUILTIN_MISC_OPERATION(AllocRaw, "allocRaw", "", Special)
603
600
// / was allocated.
604
601
BUILTIN_MISC_OPERATION(DeallocRaw, " deallocRaw" , " " , Special)
605
602
603
+ // / StackAlloc has type (Int, Int, Int) -> Builtin.RawPointer
604
+ // /
605
+ // / Parameters: capacity, stride, alignment
606
+ // /
607
+ // / The resulting pointer comes from the stack (as in the non-standard C
608
+ // / extension `alloca()`.) It is at least as aligned as specified and is valid
609
+ // / until the end of the calling scope.
610
+ // /
611
+ // / The count and stride are multiplied together to get the byte count to use
612
+ // / for the allocation.
613
+ // /
614
+ // / The passed alignment must be a positive power of two. If the alignment value
615
+ // / is not known at compile time, MaximumAlignment is assumed.
616
+ BUILTIN_MISC_OPERATION(StackAlloc, " stackAlloc" , " " , Special)
617
+
618
+ // / StackDealloc has type (Builtin.RawPointer) -> ()
619
+ // /
620
+ // / Parameters: address.
621
+ // /
622
+ // / The range starting at `address`, previously allocated with
623
+ // / Builtin.stackAlloc(), is deallocated from the stack.
624
+ BUILTIN_MISC_OPERATION(StackDealloc, " stackDealloc" , " " , Special)
625
+
606
626
// / Fence has type () -> ().
607
627
BUILTIN_MISC_OPERATION(Fence, " fence" , " " , None)
608
628
@@ -757,6 +777,19 @@ BUILTIN_MISC_OPERATION(CreateTaskGroup,
757
777
BUILTIN_MISC_OPERATION(DestroyTaskGroup,
758
778
" destroyTaskGroup" , " " , Special)
759
779
780
+
781
+ // / A builtin that can only be called from a transparent generic function. Takes
782
+ // / two operands, the first operand the result address, the second operand the
783
+ // / input address. Transforms into load [take] + move_value + store [init] when
784
+ // / transparently inlined into a caller that has the generic of the callee
785
+ // / specialized into a loadable type. If the transparent inlining does not
786
+ // / specialize the type (due to being inlined into a non-generic context, the
787
+ // / SILVerifier will abort).
788
+ // /
789
+ // / Illegal to call except for in Swift._move in the stdlib. This is enforced by
790
+ // / the SILVerifier.
791
+ BUILTIN_MISC_OPERATION(Move, " move" , " " , Special)
792
+
760
793
// BUILTIN_MISC_OPERATION_WITH_SILGEN - Miscellaneous operations that are
761
794
// specially emitted during SIL generation.
762
795
//
0 commit comments