[PATCH] D150997: [llvm] Split out DenseMapInfo<variant> specialization
Elliot Goodrich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 19 13:39:53 PDT 2023
IncludeGuardian created this revision.
IncludeGuardian added reviewers: lattner, nikic.
Herald added a subscriber: StephenFan.
Herald added a project: All.
IncludeGuardian requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Remove the `DenseMapInfo<std::variant<Ts...>>` variant out from
`llvm/ADT/DenseMapInfo.h` into a separate header
`llvm/ADT/DenseMapInfoVariant.h`
This allows us to remove the `<variant>` include, which is being
transitively and unncessary included in all translation units that
include `llvm/ADT/DenseMap.h`.
There have been similar changes to move out specializations for
- `APInt.h` fd7e309e02fd226b0390888388ed732608e52c73 <https://reviews.llvm.org/rGfd7e309e02fd226b0390888388ed732608e52c73> and
- `StringRef.h`/`ArrayRef.h` 983565a6fe4a9f40c7caf82b65c650c20dbcc104 <https://reviews.llvm.org/rG983565a6fe4a9f40c7caf82b65c650c20dbcc104>
to reduce the compilation time. As we are unable to move the
specialization into `<variant>`, we create a separate
`DenseMapInfoVariant.h` header that can be used by anyone who needs this
specialization.
This reduces the total number of preprocessing tokens across the LLVM
source files in lib from (roughly) 1,964,876,961 to 1,936,551,496 - a
reduction of ~1.44%. This should result in a small improvement in
compilation time.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D150997
Files:
llvm/include/llvm/ADT/DenseMapInfo.h
llvm/include/llvm/CodeGen/CallingConvLower.h
llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
llvm/include/llvm/Object/DXContainer.h
llvm/include/llvm/Transforms/Scalar/SROA.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150997.523920.patch
Type: text/x-patch
Size: 3838 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230519/c60fd888/attachment.bin>
More information about the llvm-commits
mailing list