[patch] Partial fix for PR 18048

Zack Weinberg zack@codesourcery.com
Mon Oct 25 23:01:00 GMT 2004


Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> 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?

zw



More information about the Gcc-patches mailing list