Skip to content

Commit 55a2473

Browse files
committed
[CtxProf] Replace include with forward declaration (NFC)
This header is fairly expensive. Forward declare PGOContextualProfile instead.
1 parent 8d4235d commit 55a2473

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/include/llvm/Transforms/Utils/Cloning.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "llvm/ADT/SmallVector.h"
2121
#include "llvm/ADT/Twine.h"
2222
#include "llvm/Analysis/AssumptionCache.h"
23-
#include "llvm/Analysis/CtxProfAnalysis.h"
2423
#include "llvm/Analysis/InlineCost.h"
2524
#include "llvm/IR/BasicBlock.h"
2625
#include "llvm/IR/ValueHandle.h"
@@ -42,6 +41,7 @@ class Instruction;
4241
class Loop;
4342
class LoopInfo;
4443
class Module;
44+
class PGOContextualProfile;
4545
class ProfileSummaryInfo;
4646
class ReturnInst;
4747
class DomTreeUpdater;
@@ -276,7 +276,7 @@ InlineResult InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
276276
/// to the behavior of the non-contextual profile updating variant above. This
277277
/// makes it easy to drop-in replace uses of the non-contextual overload.
278278
InlineResult InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
279-
CtxProfAnalysis::Result &CtxProf,
279+
PGOContextualProfile &CtxProf,
280280
bool MergeAttributes = false,
281281
AAResults *CalleeAAR = nullptr,
282282
bool InsertLifetime = true,

llvm/lib/Transforms/Utils/InlineFunction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ inlineRetainOrClaimRVCalls(CallBase &CB, objcarc::ARCInstKind RVCallKind,
21422142
// it's not worth updating those.
21432143
static const std::pair<std::vector<int64_t>, std::vector<int64_t>>
21442144
remapIndices(Function &Caller, BasicBlock *StartBB,
2145-
CtxProfAnalysis::Result &CtxProf, uint32_t CalleeCounters,
2145+
PGOContextualProfile &CtxProf, uint32_t CalleeCounters,
21462146
uint32_t CalleeCallsites) {
21472147
// We'll allocate a new ID to imported callsite counters and callsites. We're
21482148
// using -1 to indicate a counter we delete. Most likely the entry ID, for
@@ -2258,7 +2258,7 @@ remapIndices(Function &Caller, BasicBlock *StartBB,
22582258
// copying over the data of the callee, **intentionally without any value
22592259
// scaling**, and copying over the callees of the inlined callee.
22602260
llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
2261-
CtxProfAnalysis::Result &CtxProf,
2261+
PGOContextualProfile &CtxProf,
22622262
bool MergeAttributes,
22632263
AAResults *CalleeAAR,
22642264
bool InsertLifetime,

0 commit comments

Comments
 (0)