[PATCH] D147697: [IR] Add TargetExtTypeClass
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 6 03:40:27 PDT 2023
nhaehnle created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
nhaehnle requested review of this revision.
Herald added a project: LLVM.
This allows for extensibility in how the target type info is obtained,
serving two purposes:
1. Small step towards "Dialects in LLVM", in providing extensibility for users of LLVM. Users of LLVM can now define their own "target" extension types (now a somewhat misleading name) with custom layout and properties, to represent high-level concepts that are lowered away before code reaches the actual backend.
2. By storing a pointer to the type class in the type itself, we can avoid string comparisons when looking up type info.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D147697
Files:
llvm/include/llvm/IR/DerivedTypes.h
llvm/include/llvm/IR/LLVMContext.h
llvm/lib/IR/LLVMContext.cpp
llvm/lib/IR/LLVMContextImpl.h
llvm/lib/IR/Type.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147697.511358.patch
Type: text/x-patch
Size: 8791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230406/81e7976d/attachment.bin>
More information about the llvm-commits
mailing list