[PATCH] Teach IndVarSimplify to add nuw and nsw to operations that provably don't overflow.

Chandler Carruth chandlerc at google.com
Tue Dec 23 16:55:33 PST 2014


On Tue, Dec 23, 2014 at 4:51 PM, Sanjoy Das <sanjoy at playingwithpointers.com>
wrote:

> > Perhaps it would help to explain it slightly differently: There are
> > optimizations which we can only perform by *removing* any no-wrap flags.
> But
> > we don't know whether that optimization or the no-wrap flags is more
> > important, and so we have to make a choice, and the choice is to preserve
> > the flags at the expense of the transformation. Thus, adding flags can
>
> Is this choice always in favor of retaining the flags?  Or is it a
> per-transform decision?


per-transform, but at least recently I've been seeing a trend towards
preserving flags.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141223/c5110a6a/attachment.html>


More information about the llvm-commits mailing list