This patch is a work in progress
Make CompositeType not inherit from Type. Instead, Vecotr, Array, and
Struct Types directly inherit from Type. This is in preparation for the
introduction of distinct Fixed and Scalable Vector Types
Paths
| Differential D75486
[SVE] Make CompositeType not inherit from Type AbandonedPublic Authored by ctetreau on Mar 2 2020, 3:16 PM.
Details
Summary This patch is a work in progress Make CompositeType not inherit from Type. Instead, Vecotr, Array, and
Diff Detail
Event TimelineComment Actions It's possible to mess with the way "cast<>" actually casts values by specializing the function template in question. That, plus an appropriate classof implementations, should allow you to avoid the whole CompositeType::get thing. See, for example, https://github.com/llvm/llvm-project/blob/8cf76e913b867a98a9843aa1b3d782632ed5d930/clang/include/clang/AST/DeclBase.h#L2490 . That said, both CompositeType and SequentialType are pretty useless. CompositeType especially: really, code dealing with it wants to answer one of two question: "is it legal to GEP index into this type", or "is it legal to extractvalue index into this type". I tried to quickly throw together a patch to get rid of CompositeType, and it was roughly 100 lines changed. I'll post something soon.
Revision Contents
Diff 248050 clang/lib/CodeGen/CGDecl.cpp
clang/lib/CodeGen/CGExprConstant.cpp
clang/unittests/CodeGen/CodeGenExternalTest.cpp
llvm/include/llvm/IR/Constants.h
llvm/include/llvm/IR/DerivedTypes.h
llvm/include/llvm/IR/GetElementPtrTypeIterator.h
llvm/lib/Analysis/BasicAliasAnalysis.cpp
llvm/lib/Analysis/ConstantFolding.cpp
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/CodeGen/Analysis.cpp
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/FuzzMutate/Operations.cpp
llvm/lib/IR/ConstantFold.cpp
llvm/lib/IR/Constants.cpp
llvm/lib/IR/Core.cpp
llvm/lib/IR/Instructions.cpp
llvm/lib/IR/Type.cpp
llvm/lib/Linker/IRMover.cpp
llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/lib/Transforms/IPO/StripSymbols.cpp
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/lib/Transforms/Utils/FunctionComparator.cpp
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
|