Lines Matching full:lowering
3 The approach of FIR and lowering design so far was to start with the minimal set
9 functional so far, the code lowering expressions and assignments from the
13 the representation level gap is big, and a lot is happening in lowering. It
20 operations in a new dialect HLFIR to allow a simpler lowering to a higher-level
28 The main principles of the new lowering design are:
29 - Make expression lowering context independent and rather naive
30 - Do not materialize temporaries while lowering to FIR
33 The core impact on lowering will be:
34 - Lowering expressions and assignments in the exact same way, regardless of
37 - Lowering transformational intrinsics in a verbatim way (no runtime calls and
39 - Lowering character expressions in a verbatim way (no memcpy/runtime calls
59 currently not represented in FIR. Instead, lowering keeps track of all this
60 information in the fir::ExtendedValue lowering data structure and uses it when
61 needed. If unused in lowering, some information about variables is lost (like
69 forces lowering to apply all decisions related to the information that is lost
93 lowering on operations using variables when that is relevant (for instance when
104 remove the fir.box usages when possible while lowering to FIR, to avoid
137 derived-type expressions and all array expressions are buffered in lowering:
138 their results are directly given a memory storage in lowering and are
145 forces lowering to combine elemental array expressions into single loop nests to
148 lowering makes lowering code harder to understand. It also makes the expression
149 lowering code context dependent (especially designators lowering). The lowering
150 code paths may be different when lowering a syntactically similar expression in
154 are currently not implemented in lowering because they are less trivial
155 optimizations, and do not really belong in lowering. However, deploying such
193 simplifying lowering while keeping the ability to combine elemental
205 lowering.
267 after the last use of the hlfir.expr. Note that, at least at first, lowering
286 will have the same type as %base, it is intended to be used when lowering HLFIR
340 operation can be replaced by %base when lowering to LLVM. Otherwise, the
421 allocated on the heap. If lowering created the storage passed to hlfir.declare
422 via a fir.allocmem, lowering should insert a fir.freemem after the
453 `substr`. Implicit substring bounds must be made explicit by lowering. It is
471 Instead, lowering will have to introduce loops to do element by element
475 reasonable to have lowering deal with this aspect. For instance, a vector
485 needed), and that lowering does not have to implement it all.
513 the related subroutine call. So a fir.call could directly be made in lowering if
518 (implementing this as a call in lowering would require lowering the whole
519 reallocation logic in lowering already, duplicating the fact that hlfir.assign
524 Motivation: represent pointer assignment without lowering the exact pointer
539 allowing later lowering to either inlined fir.allocmem or Fortran runtime
545 Otherwise, it is a naive lowering of the ALLOCATE statement.
554 Motivation: keep deallocation explicit in HLFIR, while allowing later lowering
652 hlfir.apply indices will be one based to make further lowering simpler.
663 materializing the result as a temporary in lowering.
678 that will be directly lowered in lowering.
691 they are the verbatim Fortran translations should allow to move the lowering
699 For the following transformational intrinsics, the current lowering to runtime
769 in lowering.
776 current lowering of array constructor is rather complex because it must deal
780 lowering of array constructor, and make array ctor a lot easier to manipulate.
863 lowered, lowering chose which operand shape gives the result shape information,
864 and it is later not retrievable that both n and m can be used. If lowering
873 Motivation: segregate the Forall lowering complexity in its own unit.
876 - Lowering it in an optimal way requires analyzing several assignments/mask
937 - Call interface argument association lowering (getting rid of hlfir.associate
939 - Lowering high level operations using variables into FIR operations
944 Note that these passes do not have to be the first one run after lowering. It is
949 After that, the current FIR pipeline could be used to continue lowering towards
966 refactoring of lowering. Codegen should not be impacted since the current FIR
969 A lot of the code in lowering generating Fortran features (like an intrinsic or
989 - 4. Introduce the fir.declare and hlfir.finalize usage in lowering (requires 1.
992 The following steps might have to be done in parallel of the current lowering,
993 to avoid disturbing the work on performance until the new lowering is complete
996 - 5. Introduce hlfir.designate and hlfir.associate usage in lowering.
997 - 6. Introduce lowering to hlfir.assign (with RHS that is not a hlfir.expr),
999 - 7. Introduce lowering to hlfir.expr and related operations.
1000 - 8. Introduce lowering to hlfir.forall.
1002 At that point, lowering using the high-level FIR should be in place, allowing
1007 The plan is to do these steps incrementally upstream, but for lowering this will
1008 most likely be safer to do have the new expression lowering implemented in
1009 parallel upstream, and to add an option to use the new lowering rather than to
1010 directly modify the current expression lowering and have it step by step
1024 Lowering output:
1035 HLFIR array assignment lowering pass:
1110 Lowering output:
1303 the array value copy pass, and the existing FIR flow is used (lowering
1316 Lowering of vector subscripted entities would happen as follow:
1320 be an assignment LHS, or in input IO), lowering could transform the
1438 lowering target would not cover all Fortran needs (especially for the non
1481 hlfir.designate. Lowering will deal with the assignment and input IO special