This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: New no-undefined-overflow branch
- From: Jay Foad <jay dot foad at gmail dot com>
- To: rguenther at suse dot de
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 27 Feb 2009 19:57:57 +0000
- Subject: Re: New no-undefined-overflow branch
> To support languages that have undefined semantics on overflowing
> operations the middle-end gets new unary and binary operators
> that implicitly encode value-range information about their operands
> noting that the operation does not overflow. These does-not-overflow
> operators transform the undefined behavior into a valid assumption
> and thus make the GIMPLE IL fully defined.
>From an optimisation pass's point of view, what's the difference between:
1. a PLUS expression that gives an undefined result on overflow, and
2. a PLUS expression with a guarantee that the result won't overflow.
I can't see how they will be handled any differently in practice.
Thanks,
Jay.