[all-commits] [llvm/llvm-project] 3d092e: Add a new memory allocation rewrite pass.
Eric Schweitz via All-commits
all-commits at lists.llvm.org
Wed Dec 15 15:45:31 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3d092e31c1f5fab9b427994970616bc5dde3b3be
https://github.com/llvm/llvm-project/commit/3d092e31c1f5fab9b427994970616bc5dde3b3be
Author: Eric Schweitz <eschweitz at nvidia.com>
Date: 2021-12-15 (Wed, 15 Dec 2021)
Changed paths:
M flang/include/flang/Optimizer/Transforms/Passes.h
M flang/include/flang/Optimizer/Transforms/Passes.td
M flang/lib/Optimizer/Transforms/CMakeLists.txt
A flang/lib/Optimizer/Transforms/MemoryAllocation.cpp
A flang/test/Fir/memory-allocation-opt.fir
Log Message:
-----------
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
More information about the All-commits
mailing list