[flang-commits] [PATCH] D134285: [flang][RFC] Adding higher level FIR ops to ease expression lowering

Roger Ferrer Ibanez via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Oct 10 07:42:47 PDT 2022


rogfer01 added inline comments.


================
Comment at: flang/docs/HighLevelFIR.md:576
+
+#### Introducing the fir.apply operation
+
----------------
klausler wrote:
> jeanPerier wrote:
> > 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.
> I find the name to be entirely appropriate in the function composition view of array programming.
Hi @jeanPerier, thanks for the context.

No objections on the name.


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