[PATCH] D26594: IR: Change the gep_type_iterator API to avoid always exposing the "current" type.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 29 10:20:38 PST 2016


'isArray'/array bound returning true for vector types seems like it might
be a bit confusing for some users. Should it use the sequential
terminology? (would that suit/be correct)

It seems still really confusing overall (maybe I'm just not sufficiently
familiar with the context) to have various APIs returning the outer
(struct) type, some returning the inner (array member, etc) type, etc.

Feels like there should be a more consistent API for this abstraction -
even if it means a bit more work in some clients (or some (probably
non-member)? helper functions). Do you have a good understanding (you could
help impart to me) why this iterator simultaneously talks about the outer
and the indexed type at any point? I think that's what's complicating this.



On Sat, Nov 26, 2016 at 10:11 PM Peter Collingbourne via Phabricator <
reviews at reviews.llvm.org> wrote:

pcc updated this revision to Diff 79348.
pcc marked an inline comment as done.
pcc added a comment.
Herald added a subscriber: amehsan.

- Formatting, address review comments, fix bug I introduced in
NaryReassociate


https://reviews.llvm.org/D26594

Files:
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/include/llvm/IR/GetElementPtrTypeIterator.h
  llvm/include/llvm/Transforms/Utils/Local.h
  llvm/lib/Analysis/BasicAliasAnalysis.cpp
  llvm/lib/Analysis/InlineCost.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/Analysis/VectorUtils.cpp
  llvm/lib/CodeGen/CodeGenPrepare.cpp
  llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
  llvm/lib/IR/ConstantFold.cpp
  llvm/lib/IR/Constants.cpp
  llvm/lib/IR/DataLayout.cpp
  llvm/lib/IR/Operator.cpp
  llvm/lib/Target/AArch64/AArch64FastISel.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/ARM/ARMFastISel.cpp
  llvm/lib/Target/Mips/MipsFastISel.cpp
  llvm/lib/Target/PowerPC/PPCFastISel.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
  llvm/lib/Target/X86/X86FastISel.cpp
  llvm/lib/Transforms/IPO/GlobalOpt.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
  llvm/lib/Transforms/Scalar/NaryReassociate.cpp
  llvm/lib/Transforms/Scalar/SROA.cpp
  llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
  llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161129/bc960022/attachment.html>


More information about the llvm-commits mailing list