[flang-commits] [flang] [flang][HLFIR] Relax verifiers of intrinsic operations (PR #80132)
via flang-commits
flang-commits at lists.llvm.org
Wed Jan 31 04:55:35 PST 2024
jeanPerier wrote:
Thanks a lot Tom for applying the comment. I would still keep parts of those checks because we need to enforce some invariants at least to generate codes that would not itself trigger other FIR / LLVM IR verifiers (my comment was maybe a bit too anti-verifiers, sorry for that).
The rank and "relaxed" element types matters to generate addressing and numerical operations that will not throw verifier errors. The length parameters and extents not so much (codegen just need to pick one variable to get the extents/length param and generate code with it).
Looking at these verifiers, I think we can try just relaxing the "resultExpr.getEleTy() != numTy" to ignore length parameters for the character case, and the extent check is only emitting a warning (this I am in favor or removing altogether or to make it debug only).
Maybe it will belong to type/length propagation to preserve/add some fir.convert when the propagated type would conflict with the original one (i.e. replacing a `?` by anything is OK, but replacing `n` by `m` in in fir.array<> or fir.character<> should not be done).
https://github.com/llvm/llvm-project/pull/80132
More information about the flang-commits
mailing list