[flang-commits] [PATCH] D121710: [flang] Relax fir.rebox verifier with characters
Jean Perier via Phabricator via flang-commits
flang-commits at lists.llvm.org
Tue Mar 15 08:53:58 PDT 2022
jeanPerier created this revision.
jeanPerier added reviewers: schweitz, clementval.
jeanPerier added a project: Flang.
Herald added subscribers: mehdi_amini, jdoerfert.
Herald added a project: All.
jeanPerier requested review of this revision.
Allow fir.rebox input and output element type to differ for characters
if:
- Any of the character type is dynamic. Fortran allows making pointer
assignments between deferred and constant lengths entities, making this
case useful (if the input length is dynamic and the output length constant,
it is a user requirement that the length matches at runtime. There is no
option to check this at runtime, but it could be added as an option to
fir.rebox codegen later if desired).
- Or, there is a slice in the fir.rebox (the fir.rebox can implement a
substring view, hence the constant output and input lengths).
This is only a verifier constraint change, the fir.rebox codegen is not
impacted and already support those cases.
Add related FIR parsing, error, and codegen tests.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D121710
Files:
flang/lib/Optimizer/Dialect/FIROps.cpp
flang/test/Fir/fir-ops.fir
flang/test/Fir/invalid.fir
flang/test/Fir/rebox-susbtring.fir
flang/test/Fir/rebox.fir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121710.415459.patch
Type: text/x-patch
Size: 18369 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220315/34554a71/attachment-0001.bin>
More information about the flang-commits
mailing list