[patch, fortran] Handling of .and. and .or. expressions
Janus Weil
janus@gcc.gnu.org
Wed Jun 27 07:52:00 GMT 2018
2018-06-27 9:42 GMT+02:00 Jakub Jelinek <jakub@redhat.com>:
> On Wed, Jun 27, 2018 at 09:35:59AM +0200, Janus Weil wrote:
>> > and have some non-default aggressive
>> > optimization option that would optimize away in the FE impure function calls
>>
>> IMHO an optimization to remove functions calls is unproblematic only
>> for pure functions, but as long as it is guarded by a non-default
>
> For pure functions, which are hopefully marked as ECF_PURE for the
> middle-end
Not sure if that's the case. Grepping for ECF_PURE in
trunk/gcc/fortran only yields a single occurrence:
f95-lang.c:#define ATTR_PURE_NOTHROW_LEAF_LIST (ECF_NOTHROW |
ECF_LEAF | ECF_PURE)
Seems like that is only used for built-ins?
> the middle-end can already optimize away those calls where the
> result isn't needed.
Ah, great. Even with TRUTH_AND_EXPR, you mean?
Cheers,
Janus
More information about the Gcc-patches
mailing list