Commit Graph

6 Commits

Author SHA1 Message Date
Dario Rexin
de06df9fc6 [Test] Require arm64 in pack_stack_metadata_alloc_loop.sil
rdar://128431285
2024-05-23 16:41:20 -07:00
Arnold Schwaighofer
195fe84e18 [rebranch] Fix validation-test/IRGen/pack_stack_metadata_alloc_loop.sil 2024-05-03 13:06:35 -07:00
Arnold Schwaighofer
a56b148747 Fix validation-test/IRGen tests 2023-06-23 06:57:38 -07:00
Arnold Schwaighofer
90c7193651 More IRGen test to move over 2023-06-14 10:49:50 -07:00
Nate Chandler
d1ec1e6693 [IRGen] Dealloc metadata packs on dom frontier.
Deallocate dynamic allocas done for metadata/wtable packs.  These
stackrestore calls are inserted on the dominance frontier and then stack
nesting is fixed up.  That was achieved as follows:

Added a new IRGen pass PackMetadataMarkerInserter; it
- determines if there are any instructions which might allocate on-stack
  pack metadata
- if there aren't, no changes are made
- if there are, alloc_pack_metadata just before instructions that could
  allocate pack metadata on the stack and dealloc_pack_metadata on the
  dominance frontier of those instructions
- fixup stack nesting

During IRGen, the allocations done for metadata/wtable packs are
recorded and IRGenSILFunction associates them with the instruction that
lowered.  It must be the instruction after some alloc_pack_metadata
instruction.  Then, when visiting the dealloc_pack_metadata instructions
corresponding to that alloc_pack_metadata, deallocate those packs.
2023-06-05 08:11:28 -07:00
Nate Chandler
0b5a233d73 [GenPack] Always heapify metadata packs.
Until the optimization to leave packs on-stack is in place.  Even then,
we'll want to keep this as a fallback.

rdar://110123679
2023-06-03 07:30:09 -07:00