[SUA][IRGen] Change IRGen to emit calls to swift_coroFrameAlloc (#79384)

When TMO is enabled, change IRGen to pass the newly introduced runtime function `swift_coroFrameAlloc` (and pass an additional argument — the hash value) instead of `malloc` when it inserts calls to `coro_id_retcon_once`.
The hashValue is computed based on the  current function name (computed in `getDiscriminatorForString`)

rdar://141235957
This commit is contained in:
Rashmi Mudduluru
2025-02-21 14:45:23 -08:00
committed by GitHub
parent 8337815a10
commit 0b8efc9f26
13 changed files with 225 additions and 30 deletions

View File

@@ -3630,6 +3630,10 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
Args.hasFlag(OPT_enable_async_frame_push_pop_metadata,
OPT_disable_async_frame_push_pop_metadata,
Opts.EmitAsyncFramePushPopMetadata);
Opts.EmitTypeMallocForCoroFrame =
Args.hasFlag(OPT_enable_emit_type_malloc_for_coro_frame,
OPT_disable_emit_type_malloc_for_coro_frame,
Opts.EmitTypeMallocForCoroFrame);
Opts.AsyncFramePointerAll = Args.hasFlag(OPT_enable_async_frame_pointer_all,
OPT_disable_async_frame_pointer_all,
Opts.AsyncFramePointerAll);