IR: Move NumElements field from {Array,Vector}Type to SequentialType.
authorPeter Collingbourne <peter@pcc.me.uk>
Fri, 2 Dec 2016 03:20:58 +0000 (03:20 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Fri, 2 Dec 2016 03:20:58 +0000 (03:20 +0000)
commitbc0705240e0f57f16919382b3b75263df9a9f2a5
tree1ff0e7415c4d6295cb4baa6ea63b4b38469ff123
parentc3be225895ec2373753b2a23f5aced6bad872d81
IR: Move NumElements field from {Array,Vector}Type to SequentialType.

Now that PointerType is no longer a SequentialType, all SequentialTypes
have an associated number of elements, so we can move that information to
the base class, allowing for a number of simplifications.

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

llvm-svn: 288464
llvm/docs/ProgrammersManual.rst
llvm/include/llvm/IR/DerivedTypes.h
llvm/include/llvm/IR/GetElementPtrTypeIterator.h
llvm/lib/IR/ConstantFold.cpp
llvm/lib/IR/Constants.cpp
llvm/lib/IR/Type.cpp
llvm/lib/Linker/IRMover.cpp
llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/lib/Transforms/Utils/FunctionComparator.cpp