diff options
author | Reid Kleckner <rnk@google.com> | 2025-04-15 07:23:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-14 22:23:18 -0700 |
commit | 2538c607e903a1fe0cfcacd5732235cc8ff3adf7 (patch) | |
tree | fc18f75f898e9350e539443d077b0e0c367b6273 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | 01c1c78103d026d0d0007ae7b7d54b36edef1324 (diff) | |
download | llvm-2538c607e903a1fe0cfcacd5732235cc8ff3adf7.zip llvm-2538c607e903a1fe0cfcacd5732235cc8ff3adf7.tar.gz llvm-2538c607e903a1fe0cfcacd5732235cc8ff3adf7.tar.bz2 |
[CodeGen] Prune headers and move code out of line for build efficiency, NFC (#135622)
I noticed these destructors taking time with -ftime-trace and moved some
of them for minor build efficiency improvements.
The main impact of moving destructors out of line is that it avoids
requiring container fields containing other types from being complete,
i.e. one can have uptr<T> or vector<T> as a field with an incomplete
type T, and that means we can reduce transitive includes, as with
LegalizerInfo.h.
Move expensive getDebugOperandsForReg template out-of-line. The
std::function instantiation shows up in time trace even if you don't use
the function.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 91ae904..483e52d 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -668,6 +668,10 @@ TargetLoweringBase::TargetLoweringBase(const TargetMachine &tm) RTLIB::initCmpLibcallCCs(CmpLibcallCCs); } +// Define the virtual destructor out-of-line to act as a key method to anchor +// debug info (see coding standards). +TargetLoweringBase::~TargetLoweringBase() = default; + void TargetLoweringBase::initActions() { // All operations default to being supported. memset(OpActions, 0, sizeof(OpActions)); |