Skip to content

Eliminate Unnecessary alloc_pack instructions#89260

Draft
aidan-hall wants to merge 7 commits into
swiftlang:mainfrom
aidan-hall:pack-opt-simplify-alloc-pack
Draft

Eliminate Unnecessary alloc_pack instructions#89260
aidan-hall wants to merge 7 commits into
swiftlang:mainfrom
aidan-hall:pack-opt-simplify-alloc-pack

Conversation

@aidan-hall
Copy link
Copy Markdown
Contributor

If an alloc_pack pack only contains concrete elements, and every access is at a known, scalar index, replace it with multiple alloc_stack instructions, one for each element. This unlocks further optimisations, in passes like SILMem2Reg and DeadObjectElimination.

Fixes:

  • rdar://175417934

@aidan-hall aidan-hall force-pushed the pack-opt-simplify-alloc-pack branch from f3973cd to 27c3bc6 Compare May 19, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant