diff options
author | Nikita Popov <npopov@redhat.com> | 2025-06-02 09:51:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-02 09:51:54 +0200 |
commit | e2b536431d85c49cdfad5106d116ced683a0667a (patch) | |
tree | 2bdba9709f113c45d9ff4d8f591a72013b81264e /clang/lib/CodeGen/CGBlocks.cpp | |
parent | 9801fdf669bf6e61e276732a95c2f885cb2a39d9 (diff) | |
download | llvm-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/CGBlocks.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index adb353d..729758d 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -17,6 +17,7 @@ #include "CGOpenCLRuntime.h" #include "CodeGenFunction.h" #include "CodeGenModule.h" +#include "CodeGenPGO.h" #include "ConstantEmitter.h" #include "TargetInfo.h" #include "clang/AST/Attr.h" @@ -1522,7 +1523,7 @@ llvm::Function *CodeGenFunction::GenerateBlockFunction( if (IsLambdaConversionToBlock) EmitLambdaBlockInvokeBody(); else { - PGO.assignRegionCounters(GlobalDecl(blockDecl), fn); + PGO->assignRegionCounters(GlobalDecl(blockDecl), fn); incrementProfileCounter(blockDecl->getBody()); EmitStmt(blockDecl->getBody()); } |