[flang-commits] [flang] [flang][stack-arrays] Extend pass to work on declare ops and within o… (PR #98810)
Kareem Ergawy via flang-commits
flang-commits at lists.llvm.org
Sun Jul 14 05:08:10 PDT 2024
================
@@ -361,6 +361,13 @@ void AllocationAnalysis::visitOperation(mlir::Operation *op,
} else if (mlir::isa<fir::FreeMemOp>(op)) {
assert(op->getNumOperands() == 1 && "fir.freemem has one operand");
mlir::Value operand = op->getOperand(0);
+
+ // Note: StackArrays is scheduled in the pass pipeline after lowering hlfir
+ // to fir. Therefore, we only need to handle `fir::DeclareOp`s.
+ if (auto declareOp =
----------------
ergawy wrote:
I am not sure this a proper use of the DFA framework in this case or not. In particular, should I instead propagate the information through the `fir.declare` op instead of doing this indirect check of the operand?
https://github.com/llvm/llvm-project/pull/98810
More information about the flang-commits
mailing list