aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2025-06-02 09:51:54 +0200
committerGitHub <noreply@github.com>2025-06-02 09:51:54 +0200
commite2b536431d85c49cdfad5106d116ced683a0667a (patch)
tree2bdba9709f113c45d9ff4d8f591a72013b81264e /clang/lib/CodeGen/CGCall.cpp
parent9801fdf669bf6e61e276732a95c2f885cb2a39d9 (diff)
downloadllvm-e2b536431d85c49cdfad5106d116ced683a0667a.zip
llvm-e2b536431d85c49cdfad5106d116ced683a0667a.tar.gz
llvm-e2b536431d85c49cdfad5106d116ced683a0667a.tar.bz2
[CodeGen] Move CodeGenPGO behind unique_ptr (NFC) (#142155)
The InstrProf headers are very expensive. Avoid including them in all of CodeGen/ by moving the CodeGenPGO member behind a unqiue_ptr. This reduces clang build time by 0.8%.
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index bd920a2..c58b8dc 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -21,6 +21,7 @@
#include "CGRecordLayout.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
+#include "CodeGenPGO.h"
#include "TargetInfo.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
@@ -5900,7 +5901,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
// For more details, see the comment before the definition of
// IPVK_IndirectCallTarget in InstrProfData.inc.
if (!CI->getCalledFunction())
- PGO.valueProfile(Builder, llvm::IPVK_IndirectCallTarget, CI, CalleePtr);
+ PGO->valueProfile(Builder, llvm::IPVK_IndirectCallTarget, CI, CalleePtr);
// In ObjC ARC mode with no ObjC ARC exception safety, tell the ARC
// optimizer it can aggressively ignore unwind edges.