[flang-commits] [PATCH] D136254: [flang] add fir.declare codegen support
Peixin Qiao via Phabricator via flang-commits
flang-commits at lists.llvm.org
Fri Oct 21 00:02:34 PDT 2022
peixin added a comment.
Will `fir.declare` be used for procedure pointer, too? I am looking at the procedure pointer. It seems the codegen has been supported (check the following example). Should the lowering support be delayed until HLFIR is ready? It seems that `fir.declare` only targets on Fortran variables as `HighLevelFIR.md` mentioned.
func.func private @foo(!fir.ref<(!fir.ref<i32>) -> f32>)
func.func @func() -> ((!fir.ref<i32>) -> f32) {
%0 = fir.alloca (!fir.ref<i32>) -> f32
%1 = fir.load %0 : !fir.ref<(!fir.ref<i32>) -> f32>
fir.call @foo(%0) : (!fir.ref<(!fir.ref<i32>) -> f32>) -> ()
return %1 : (!fir.ref<i32>) -> f32
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136254/new/
https://reviews.llvm.org/D136254
More information about the flang-commits
mailing list