diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenPGO.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenPGO.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.h b/clang/lib/CodeGen/CodeGenPGO.h index 1944b64..0cbea64 100644 --- a/clang/lib/CodeGen/CodeGenPGO.h +++ b/clang/lib/CodeGen/CodeGenPGO.h @@ -111,6 +111,20 @@ private: public: std::pair<bool, bool> getIsCounterPair(const Stmt *S) const; + + bool isMCDCDecisionExpr(const Expr *E) const { + if (!RegionMCDCState) + return false; + auto I = RegionMCDCState->DecisionByStmt.find(E); + if (I == RegionMCDCState->DecisionByStmt.end()) + return false; + return I->second.isValid(); + } + + bool isMCDCBranchExpr(const Expr *E) const { + return (RegionMCDCState && RegionMCDCState->BranchByStmt.contains(E)); + } + void emitCounterSetOrIncrement(CGBuilderTy &Builder, const Stmt *S, llvm::Value *StepV); void emitMCDCTestVectorBitmapUpdate(CGBuilderTy &Builder, const Expr *S, |