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

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 16:38:17 PST 2017


dberlin added a comment.

In https://reviews.llvm.org/D29092#685055, @MatzeB wrote:

> I am also no longer convinced the current fix is correct. Obviously memory SSA does not deal with all side effects necessary for the Div instruction or we wouldn't need this fix at all. I don't know whether that is by in the sense that memory SSA only deals with memory or if it should be considered a bug in memory SSA. In any case being conservative here in the face of bugs sounds like the right thing.
>
> Please mention http://llvm.org/PR31729 in the commit message.


MemorySSA deliberately deals with memory.
It does not care about other side-effects, nor should it.
Attempts to try to capture random side effects inside side-irs is ... often quite a mess.  This is because it is usually a complete guess at what the client is looking for.

It gives completely correct answer to what memory is used by what. That's all it does.

(That's also all memdep does).


https://reviews.llvm.org/D29092





More information about the llvm-commits mailing list