Skip to content
Commit 3d092e31 authored by Eric Schweitz's avatar Eric Schweitz
Browse files

Add a new memory allocation rewrite pass.

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.
  1. If a stack allocation is an array larger than some threshold value
     make it a heap allocation.
  2. If a stack allocation is an array with a runtime evaluated size make
     it a heap allocation.

Add a lit test for both suboptions.

Reviewed By: PeteSteinfeld, vdonaldson

Differential Revision: https://reviews.llvm.org/D115763
parent cf9e61a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment