[PATCH] D26169: [Reassociate] Skip reassociation for IV if its def instruction contains NSW/NUW flags to enable better IndVar and LSR

Wei Mi via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 9 10:32:41 PST 2016


On Wed, Nov 9, 2016 at 10:08 AM, Daniel Berlin <dberlin at dberlin.org> wrote:
> Slightly longer term question:
> We already kind of know the existing reassociation is a mess.
> I'm really curious who the current set of users is supposed to be ;)
> (IE at one point it was GVN, but the reassociation done in that pass is
> trivial to integrate directly into GVN in a way that doesn't have these bad
> effects for later passes, because we can do it virtually instead of by
> actually reorging IR)
>

I remembered earlycse had some capability to recognize exprs with
different computation order but the same value to be the same. I just
realized that it maybe the implicit reassociate capability you
described to be integrated into GVN.

I think LICM is another major user of reassociation result.

Thanks,
Wei.


More information about the llvm-commits mailing list