aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 2616226..4cf857a 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -1407,6 +1407,13 @@ private:
llvm::MDNode *createProfileWeightsForLoop(const Stmt *Cond,
uint64_t LoopCount) const;
+ /// Calculate the branch weight for PGO data or the likelihood attribute.
+ /// The function tries to get the weight of \ref createProfileWeightsForLoop.
+ /// If that fails it gets the weight of \ref createBranchWeights.
+ llvm::MDNode *createProfileOrBranchWeightsForLoop(const Stmt *Cond,
+ uint64_t LoopCount,
+ const Stmt *Body) const;
+
public:
/// Increment the profiler's counter for the given statement by \p StepV.
/// If \p StepV is null, the default increment is 1.