[flang-commits] [PATCH] D149754: [flang][hlfir] Add assignment mask operations
Jean Perier via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed May 3 08:43:38 PDT 2023
jeanPerier created this revision.
jeanPerier added reviewers: vzakhari, tblah, clementval.
Herald added subscribers: sunshaoce, mehdi_amini.
Herald added projects: Flang, All.
jeanPerier requested review of this revision.
Herald added a subscriber: jdoerfert.
Add hlfir.forall_mask, hlfir.where, and hlfir.elsewhere operations that
are operations that holds (optionally for hlfir.elsewhere) the
evaluation of a logical mask that controls the evaluation of nested
operations.
They allow representing Fortran forall control mask, as well as where
and eslewhere statements/constructs.
They use the OrderedAssignmentTreeOpInterface since they can all be used
inside Forall and their masks should be fully evaluated for all the
index-value set induced by parent Forall before any of the nested
operations in their body is evaluated.
I initially tried making them into a single operation with some attributes
to make a difference, but I felt this made the verifier/parser/printer and
usages messier/tricky compared to making three distinct operations that
represent the three Fortran feature in a vanilla way.
Depends on D149734 <https://reviews.llvm.org/D149734>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D149754
Files:
flang/include/flang/Optimizer/HLFIR/HLFIROps.td
flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
flang/test/HLFIR/elsewhere.fir
flang/test/HLFIR/forall_mask.fir
flang/test/HLFIR/invalid.fir
flang/test/HLFIR/where.fir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149754.519090.patch
Type: text/x-patch
Size: 19274 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230503/8ade31a3/attachment-0001.bin>
More information about the flang-commits
mailing list