[flang-commits] [PATCH] D134285: [flang][RFC] Adding higher level FIR ops to ease expression lowering
Jean Perier via Phabricator via flang-commits
flang-commits at lists.llvm.org
Thu Oct 6 06:28:17 PDT 2022
jeanPerier added inline comments.
================
Comment at: flang/docs/HighLevelFIR.md:576
+
+#### Introducing the fir.apply operation
+
----------------
rogfer01 wrote:
> I'm curious about the choice of the name, why not something closer to Fortran like `array_element`? `apply` seems overly generic to me, but maybe there is precedent elsewhere?
The rational of that name was to insist on the fact that this should not to be seen as a memory addressing operation at that level, but rather like an operation that, in certain circonstances (*), can see the fir.expr defining operation as a lambda and "apply" it given a set of indices (inlining the fir.elemental body at the fir.apply).
Affine has an operation named "affine.apply" that applies an affine map on a set of indices.
Now I am open to other names. Has anyone else opinions regarding `array_element` vs `apply` naming ?
(*) Basically that there should not be any operations between the fir.expr evaluation and use that may affect (or be affected by) the expression evaluation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134285/new/
https://reviews.llvm.org/D134285
More information about the flang-commits
mailing list