[flang-commits] [flang] [flang] Add stack reclaim pass to reclaim allocas in loop (PR #95309)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Wed Jun 12 14:16:06 PDT 2024


vzakhari wrote:

> > LGTM. We should improve this for only constant-sized allocas case in future.
> 
> Yeah I started by only doing it for alloca with dynamic size but in the example mentioned in the description we are generating alloca of descriptor not really dynamic allocas.
> 
> So maybe we should check for dynamic size or descriptor?

Yes, we should probably have a utility `mayBeDynamicAlloca` that will check for the shape/len operands.

https://github.com/llvm/llvm-project/pull/95309


More information about the flang-commits mailing list