This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Serious performance regression -- some tree optimizer questions
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Paul Schlie <schlie at comcast dot net>
- Cc: gcc at gcc dot gnu dot org, Ulrich dot Weigand at de dot ibm dot com, dvorakz at suse dot de,matz at suse dot de
- Date: Tue, 21 Dec 2004 21:56:15 +0100
- Subject: Re: Serious performance regression -- some tree optimizer questions
- References: <BDEDC3C5.854F%schlie@comcast.net>
Hello,
> I apologize if this comment is misplaced, but it seems that one of the
> things that tree optimization seems not to be doing (which seems important,
> and would seem to simplify the determination of expressions sensitivity to
> overflow, etc.) is to identify the maximum precision actually required of
> any operation/operand evaluation based on it's assigned destination's actual
> precision requirement (as although expressions may overflow it's use may be
> insensitive to it).
>
> As it seems for example, given:
>
> (size-x)X = (size-y)Y (size-binop)BINOP (size-z)Z;
>
> - (size-binop) need never be wider than the smaller of either: it's
> destination (size-x) requirement, or maximum result size of the binop
> with (size-y) and (size-z) operands.
>
> - and corespondingly (size-y)X and (size-z)Y need never be literally
> promoted unless the target-machine's (size-binop) operation requires it,
> but may be logically demoted if exceeding the precision requirements of
> the operation as determined by it's destination precision requirements
>
> In other words, determine precision / overflow sensitivities from the top
> (the last assigned use) of the expression tree down, not the bottom up
> without knowledge of the expressions true need? (where the same basic rules
> may be applied during the initial construction of the tree as well).
can you please provide a concrete testcase? I probably do not understand
correctly what you describe.
Zdenek