[PATCH] D27114: Preserve nonnull metadata on Loads through SROA & mem2reg.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 12:30:07 PST 2017


spatel added a comment.

In https://reviews.llvm.org/D27114#637151, @efriedma wrote:

> Semantically, this seems consistent with existing code dealing with !nonnull.  That said, creating calls to `@llvm.assume` has the potential to cause performance regressions; there are a bunch of places in the optimizer which don't handle them well, so it's probably worth checking that this change doesn't create more problems than it solves.


Apologies if this isn't directly related to this patch, but one thing I noticed and mentioned in https://reviews.llvm.org/D28337: InstCombine is not calling into InstSimplify (and hence value tracking) with a context instruction in many cases. And so computeKnownBitsFromAssume() is not triggered in those cases. If we fix that (assuming that the lack of context instruction optional parameter is an oversight), we should make better use of the assumption machinery.


https://reviews.llvm.org/D27114





More information about the llvm-commits mailing list