IR: Change the gep_type_iterator API to avoid always exposing the "current" type.
authorPeter Collingbourne <peter@pcc.me.uk>
Fri, 2 Dec 2016 02:24:42 +0000 (02:24 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Fri, 2 Dec 2016 02:24:42 +0000 (02:24 +0000)
commitab85225be49b2abf5112823d84525e91d469d6bd
tree409fc728e31d6bd0afc63bdb4ba06b7c96f6a816
parent6afcab35887245f36751790ba33debaf74b0d2ee
IR: Change the gep_type_iterator API to avoid always exposing the "current" type.

Instead, expose whether the current type is an array or a struct, if an array
what the upper bound is, and if a struct the struct type itself. This is
in preparation for a later change which will make PointerType derive from
Type rather than SequentialType.

Differential Revision: https://reviews.llvm.org/D26594

llvm-svn: 288458
31 files changed:
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