[PATCH] D48323: Derive GEP index type from Data Layout (cont)
Elena Demikhovsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 24 11:06:52 PDT 2018
delena added a comment.
In https://reviews.llvm.org/D48323#1137389, @bjope wrote:
> AFAIK BasicAA assumes that all GEP indices have a common type. So "normalization" is for example needed before passes like GVN that uses MemoryDependenceResults, that is using BasicAA. Or maybe that is a bug in BasicAA?
>
> Passes like InstCombine might skip doing rewrites in some basic blocks (e.g. if they are unreachable from entry). So I do not think that we can't rely on InstCombine doing a normalization for all GEP:s in the function.
> So are we moving towards always using the "normalized" type from scratch (in all passes) when creating a GEP, or what is the plan here?
I don't think that we are going towards the always-normalized GEP, not within these changes, at least. We say that when normalized, the type of index should not be always a pointer type. Each target may specify index type in the Data Layout.
This is about my patches.
I don't know how is the canonization of the GEP form important for the alias analysis. It's more for loop transformations, SCEVs, GEP combining/simplifications, I think
Repository:
rL LLVM
https://reviews.llvm.org/D48323
More information about the llvm-commits
mailing list