[PATCH] D44564: [BasicAA] Use PhiValuesAnalysis if available when handling phi alias

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 13 14:17:07 PDT 2018


hfinkel added a comment.

We have a check in aliasSameBasePointerGEPs to avoid PR32314 (which I'll glibly summarize as: we need to be careful about looking through PHIs so that we don't, without realizing it, end up comparing values from different loop iterations). The fact that this looks back through an unknown number of PHIs makes me concerned that we'll get into a similar situation.

I apologize for ignoring this review for so long, but I think that this is really important. Even with the PR32314 check currently there, I suspect that the fundamental algorithm for looking back through PHIs in BasicAA is still not sound, and we need to be careful going forward. As such, I'd like to see this patch updated with additional comments explaining:

1. Can we get back values from different loop iterations from PhiValues.
2. If so, is there special care that must be taken in handling them.
3. Are we currently doing what's necessary to handle them correctly.

Thanks!


https://reviews.llvm.org/D44564





More information about the llvm-commits mailing list