[PATCH] D114241: [fir] Add !fir.len_param_index conversion

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 22 04:09:09 PST 2021


rovka added inline comments.


================
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>
+
----------------
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.


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

https://reviews.llvm.org/D114241



More information about the llvm-commits mailing list