[PATCH] D42123: Derive GEP index type from Data Layout
Elena Demikhovsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 25 02:59:40 PST 2018
delena added a comment.
I want to deprecate SCEVs for pointers if the index size is not equal to pointer size.
What do you think?
bool ScalarEvolution::isSCEVable(Type *Ty) const {
if (Ty->isIntegerTy())
return true;
if (Ty->isPointerTy()) {
// Pointer can't be scevable if index type and pointer type have different
// width.
const DataLayout& DL = getDataLayout();
if (DL.getIndexTypeSizeInBits(Ty) == DL.getPointerTypeSizeInBits(Ty))
return true;
}
return false;
}
Repository:
rL LLVM
https://reviews.llvm.org/D42123
More information about the llvm-commits
mailing list