[PATCH] D82061: [IR] Prefer scalar type for struct indexes in GEP constant expressions.
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 18 10:54:13 PDT 2020
ctetreau added inline comments.
================
Comment at: llvm/lib/IR/Constants.cpp:2178
ArgVec.push_back(C);
- for (unsigned i = 0, e = Idxs.size(); i != e; ++i) {
+ generic_gep_type_iterator<Value* const*>
+ GTI = gep_type_begin(Ty, Idxs),
----------------
efriedma wrote:
> ctetreau wrote:
> > ctetreau wrote:
> > > can this use `auto`?
> > what is the change to iterators from indices buying us?
> I think this can use auto, yes.
>
> The point of using the iterators is that they provide the isStruct() and isSequential() methods.
Could these not be replaced by isa checks? isSequential seems especially useless since it checks that the thing is a `Type *`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82061/new/
https://reviews.llvm.org/D82061
More information about the llvm-commits
mailing list