IR: Change PointerType to derive from Type rather than SequentialType.
authorPeter Collingbourne <peter@pcc.me.uk>
Fri, 2 Dec 2016 03:05:41 +0000 (03:05 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Fri, 2 Dec 2016 03:05:41 +0000 (03:05 +0000)
commit4568158c4d304da17bc3c05409609d0f18efa573
tree47afecf586ac9a7fa10891980557f223ebbe444d
parent858c092daad5b707382194b698d5880c1c9b91ce
IR: Change PointerType to derive from Type rather than SequentialType.

As proposed on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/106640.html

This is for a couple of reasons:

- Values of type PointerType are unlike the other SequentialTypes (arrays
  and vectors) in that they do not hold values of the element type. By moving
  PointerType we can unify certain aspects of how the other SequentialTypes
  are handled.
- PointerType will have no place in the SequentialType hierarchy once
  pointee types are removed, so this is a necessary step towards removing
  pointee types.

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

llvm-svn: 288462
llvm/docs/ProgrammersManual.rst
llvm/include/llvm/IR/DerivedTypes.h
llvm/include/llvm/IR/Instructions.h
llvm/include/llvm/IR/Type.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/IR/ConstantFold.cpp
llvm/lib/IR/Core.cpp
llvm/lib/IR/Type.cpp
llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/lib/Transforms/Scalar/SROA.cpp