This pass can reclassify memory allocations (fir.alloca, fir.allocmem) based on heuristics and settings. The intention is to allow better performance and workarounds for conditions such as environments with limited stack space.
Currently, implements two conversions from stack to heap allocation.
- If a stack allocation is an array larger than some threshold value make it a heap allocation.
- If a stack allocation is an array with a runtime evaluated size make it a heap allocation.
Add a lit test for both suboptions.