[flang-commits] [PATCH] D114241: [fir] Add !fir.len_param_index conversion

Andrzej Warzynski via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Nov 22 04:29:53 PST 2021


awarzynski added a comment.

Thanks, LGTM! Could you wait for @schweitz or @jeanPerier to have a look before landing this?



================
Comment at: flang/test/Fir/convert-to-llvm-target.fir:162
+  %5 = fir.len_param_index l2, !fir.type<twolens>
+  %6 = fir.len_param_index l, !fir.type<twolens>
+
----------------
rovka wrote:
> awarzynski wrote:
> > schweitz wrote:
> > > jeanPerier wrote:
> > > > rovka wrote:
> > > > > Why does it work to use the names of fields? I would expect it to blow up if we pass something that isn't a len param.
> > > > I agree the verifier should complain, it makes no sense to not use a len parameter name.
> > > It should _not_ accept field names.
> > So the example in FIROps.td is incorrect, right? https://github.com/llvm/llvm-project/blob/d92aabc33666e83612c93e7c9c5c454510ba9b07/flang/include/flang/Optimizer/Dialect/FIROps.td#L2002-L2004
> Actually I think the example is correct, that looks like an empty struct with just a LEN param. LEN params are in parentheses, fields are between braces.
Oh, that's a very fine difference, thanks for pointing this out :) 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114241/new/

https://reviews.llvm.org/D114241



More information about the flang-commits mailing list