|
| 1 | +2024-09-21 Mikael Morin < [email protected]> |
| 2 | + |
| 3 | + PR fortran/90608 |
| 4 | + * invoke.texi(finline-intrinsics): Document new flag. |
| 5 | + * lang.opt (finline-intrinsics, finline-intrinsics=, |
| 6 | + fno-inline-intrinsics): New flags. |
| 7 | + * options.cc (gfc_post_options): If the option variable controlling |
| 8 | + the inlining of MAXLOC (respectively MINLOC) has not been set, set |
| 9 | + it or clear it depending on the optimization option variables. |
| 10 | + * trans-intrinsic.cc (gfc_inline_intrinsic_function_p): Return false |
| 11 | + if inlining for the intrinsic is disabled according to the option |
| 12 | + variable. |
| 13 | + |
| 14 | +2024-09-21 Mikael Morin < [email protected]> |
| 15 | + |
| 16 | + PR fortran/90608 |
| 17 | + * trans-intrinsic.cc (gfc_conv_intrinsic_minmaxloc): Generate a set |
| 18 | + of index variables. Set them using the loop indexes before leaving |
| 19 | + the first set of loops. Generate a new loop entry predicate. |
| 20 | + Initialize it. Set it before leaving the first set of loops. Clear |
| 21 | + it in the body of the second set of loops. For the second set of |
| 22 | + loops, update each loop lower bound to use the corresponding index |
| 23 | + variable if the predicate variable is set. |
| 24 | + |
| 25 | +2024-09-21 Mikael Morin < [email protected]> |
| 26 | + |
| 27 | + PR fortran/90608 |
| 28 | + * trans-intrinsic.cc (gfc_conv_intrinsic_minmaxloc): Initialize |
| 29 | + and update all the variables. Put the label and goto in the |
| 30 | + outermost scalarizer loop. Don't start the second loop where the |
| 31 | + first stopped. |
| 32 | + (gfc_inline_intrinsic_function_p): Also return TRUE for array MASK |
| 33 | + or for any REAL type. |
| 34 | + |
| 35 | +2024-09-21 Mikael Morin < [email protected]> |
| 36 | + |
| 37 | + PR fortran/90608 |
| 38 | + * trans-intrinsic.cc (gfc_conv_intrinsic_minmaxloc): Generate |
| 39 | + variable initialization for each dimension in the else branch of |
| 40 | + the toplevel condition. |
| 41 | + (gfc_inline_intrinsic_function_p): Return TRUE for scalar MASK. |
| 42 | + |
| 43 | +2024-09-21 Mikael Morin < [email protected]> |
| 44 | + |
| 45 | + PR fortran/90608 |
| 46 | + * trans-array.cc (gfc_conv_ss_startstride): Set the MINLOC/MAXLOC |
| 47 | + result upper bound using the rank of the ARRAY argument. Ajdust |
| 48 | + the error message for intrinsic result arrays. Only check array |
| 49 | + bounds for array references. Move bound check decision code... |
| 50 | + (bounds_check_needed): ... here as a new predicate. Allow bound |
| 51 | + check for MINLOC/MAXLOC intrinsic results. |
| 52 | + * trans-intrinsic.cc (gfc_conv_intrinsic_minmaxloc): Change the |
| 53 | + result array upper bound to the rank of ARRAY. Update the NONEMPTY |
| 54 | + variable to depend on the non-empty extent of every dimension. Use |
| 55 | + one variable per dimension instead of a single variable for the |
| 56 | + position and the offset. Update their declaration, initialization, |
| 57 | + and update to affect the variable of each dimension. Use the first |
| 58 | + variable only in areas only accessed with rank 1 ARRAY argument. |
| 59 | + Set every element of the result using its corresponding variable. |
| 60 | + (gfc_inline_intrinsic_function_p): Return true for integral ARRAY |
| 61 | + and absent DIM and MASK. |
| 62 | + |
| 63 | +2024-09-21 Mikael Morin < [email protected]> |
| 64 | + |
| 65 | + * trans-array.cc (gfc_conv_ss_startstride): Move array bound check |
| 66 | + generation code... |
| 67 | + (add_check_section_in_array_bounds): ... here as a new function. |
| 68 | + |
| 69 | +2024-09-21 Mikael Morin < [email protected]> |
| 70 | + |
| 71 | + * frontend-passes.cc (optimize_minmaxloc): Remove. |
| 72 | + (optimize_expr): Remove dispatch to optimize_minmaxloc. |
| 73 | + |
| 74 | +2024-09-21 Mikael Morin < [email protected]> |
| 75 | + |
| 76 | + PR fortran/90608 |
| 77 | + * trans-array.cc (gfc_conv_ss_startstride): Set the scalarization |
| 78 | + rank based on the MINLOC/MAXLOC rank if needed. Call the inline |
| 79 | + code generation and setup the scalarizer array descriptor info |
| 80 | + in the MINLOC and MAXLOC cases. |
| 81 | + * trans-intrinsic.cc (gfc_conv_intrinsic_minmaxloc): Return the |
| 82 | + result array element if the scalarizer is setup and we are inside |
| 83 | + the loops. Restrict library function call dispatch to the case |
| 84 | + where inline expansion is not supported. Declare an array result |
| 85 | + if the expression isn't scalar. Initialize the array result single |
| 86 | + element and return the result variable if the expression isn't |
| 87 | + scalar. |
| 88 | + (walk_inline_intrinsic_minmaxloc): New function. |
| 89 | + (walk_inline_intrinsic_function): Add MINLOC and MAXLOC cases, |
| 90 | + dispatching to walk_inline_intrinsic_minmaxloc. |
| 91 | + (gfc_add_intrinsic_ss_code): Add MINLOC and MAXLOC cases. |
| 92 | + (gfc_inline_intrinsic_function_p): Return true if ARRAY has rank 1, |
| 93 | + regardless of DIM. |
| 94 | + |
| 95 | +2024-09-21 Mikael Morin < [email protected]> |
| 96 | + |
| 97 | + PR fortran/90608 |
| 98 | + * frontend-passes.cc (optimize_minmaxloc): Skip if we can generate |
| 99 | + inline code for the unmodified expression. |
| 100 | + * trans-intrinsic.cc (gfc_inline_intrinsic_function_p): Add |
| 101 | + MINLOC and MAXLOC cases. |
| 102 | + |
1 | 103 | 2024-09-20 David Malcolm < [email protected]>
|
2 | 104 |
|
3 | 105 | PR other/116613
|
|
0 commit comments