diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index a9fb478..0a199e9 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -1395,6 +1395,9 @@ private: }; OpenMPCancelExitStack OMPCancelStack; + /// Calculate branch weights for the likelihood attribute + llvm::MDNode *createBranchWeights(Stmt::Likelihood LH) const; + CodeGenPGO PGO; /// Calculate branch weights appropriate for PGO data @@ -1439,6 +1442,9 @@ private: /// The branch weights of SwitchInsn when doing instrumentation based PGO. SmallVector<uint64_t, 16> *SwitchWeights = nullptr; + /// The likelihood attributes of the SwitchCase. + SmallVector<Stmt::Likelihood, 16> *SwitchLikelihood = nullptr; + /// CaseRangeBlock - This block holds if condition check for last case /// statement range in current switch instruction. llvm::BasicBlock *CaseRangeBlock = nullptr; @@ -3075,7 +3081,7 @@ public: /// statements. /// /// \return True if the statement was handled. - bool EmitSimpleStmt(const Stmt *S); + bool EmitSimpleStmt(const Stmt *S, ArrayRef<const Attr *> Attrs); Address EmitCompoundStmt(const CompoundStmt &S, bool GetLast = false, AggValueSlot AVS = AggValueSlot::ignored()); @@ -3104,9 +3110,9 @@ public: void EmitBreakStmt(const BreakStmt &S); void EmitContinueStmt(const ContinueStmt &S); void EmitSwitchStmt(const SwitchStmt &S); - void EmitDefaultStmt(const DefaultStmt &S); - void EmitCaseStmt(const CaseStmt &S); - void EmitCaseStmtRange(const CaseStmt &S); + void EmitDefaultStmt(const DefaultStmt &S, ArrayRef<const Attr *> Attrs); + void EmitCaseStmt(const CaseStmt &S, ArrayRef<const Attr *> Attrs); + void EmitCaseStmtRange(const CaseStmt &S, ArrayRef<const Attr *> Attrs); void EmitAsmStmt(const AsmStmt &S); void EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S); |