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

Luqman Aden via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 10:47:09 PST 2017


luqmana added a comment.

In https://reviews.llvm.org/D27114#637102, @chandlerc wrote:

> Bunch of little comments below.
>
> I'd like to see two high level thinsg before this goes in though:
>
> 1. I want to make sure Eli is happy with this approach w.r.t. any semantic differences between !nonnull metadata and the assume. Haven't seen an update from him since the switch of formulation.
> 2. I'd like at least a test case and a FIXME around the case where SROA rewrites the load and store to be integer loads and stores. This will happen fairly often due to things like unions, memcpy and other "bag of bits" interpretations of memory operations. We should work to not destroy !nonnull in the process by translating it to an assume. I'm happy for this to be handled in a subsequent patch, but I'd like to at least document the issue for anyone who ends up working on it.


Updated the patch to address the little comments. As for the second point, I think that's better handled in a separate patch. If Eli is happy with the current approach I'd like to move forward with just this patch.


https://reviews.llvm.org/D27114





More information about the llvm-commits mailing list