[PATCH] D29092: PR31729: [GVNHoist] Don't hoist unsafe scalars at -Oz

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 16:38:00 PST 2017


MatzeB added a comment.

In https://reviews.llvm.org/D29092#685256, @hiraditya wrote:

> In https://reviews.llvm.org/D29092#685046, @mehdi_amini wrote:
>
> > I'd add also that `isSafeToSpeculativelyExecute` may be conservative right now, but it should improve with https://reviews.llvm.org/D20116
> >  So it is even unclear to me which cases GVN hoist would be able to catch that are not in the realm of  `isSafeToSpeculativelyExecute`.
>
>
> Currently `isSafeToSpeculativelyExecute` returns false for Calls, stores. GVN Hoist will hoist them if it is legal to do so.


The thing that is hard to crasp here: If gvn hoist catches all that, why do we need to add the check in the minsize case at all? Why would those mechanisms only fail for OptSize?


https://reviews.llvm.org/D29092





More information about the llvm-commits mailing list