This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Partial fix for PR 18048
Zdenek Dvorak <firstname.lastname@example.org> writes:
>> While this is a good conceptual change, this is not the appropriate
>> way to do it. You are creating trees just to get fold() to do
>> arithmetic for you, which wastes memory,
> no, I am not. 0 is a shared constant, so no allocation for
> build_int_cst_type (niter_type, 0)), and EXEC_UNARY is
> nondestructive_fold_unary_to_constant that also does not build any
> trees (except for the result, of course).
That's nice. You're still doing unnecessary work.
>> and you risk having overflow bits set on the constants, which will
>> also inhibit optimization.
> Evaluation of BIT_NOT_EXPR should not set any overflow bits (if it does,
> it should be fixed).
Wouldn't you rather not have to deal with the problem at all?