[flang][hlfir] Add assignment mask operations
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. Differential Revision: https://reviews.llvm.org/D149754
Loading
Please sign in to comment