[PATCH] D61911: [GlobalOpt] Allow dead struct fields in SRA with non constant offset.
Christian Bruel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 03:34:19 PDT 2019
chrib added a comment.
Yes you are right, my idea was to avoid checking the non-cst index access for sub uses of the Value, in order to allow independent field GEP accesses to be candidate for SRA (for struct types(, but indeed just checking the first livel of ConstantExpr GEP might just be too complicated and I don't think that the inbound or inrange markers help here. (and multi-dimensional array GEP access would be inbound but wrong to SRA.
What I'm thinking now, maybe, is to discriminate a valid SRA candidate with a common zero internalizer check for all the fields. so even an out-of-bound array access would not break the possible uses.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61911/new/
https://reviews.llvm.org/D61911
More information about the llvm-commits
mailing list