aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2025-02-02 22:00:48 +0900
committerNAKAMURA Takumi <geek4civic@gmail.com>2025-02-02 22:00:48 +0900
commit8eff226c98bdcfcd1366120699a42e0c4c73375c (patch)
tree97da77aef099412a0c173ad46716651503c40a40 /clang/lib/CodeGen/CodeGenFunction.h
parentd414f29ed8732c77fdcd05cc3b066e9ee0d9de07 (diff)
downloadllvm-users/chapuni/mcdc/nest/logopstack.zip
llvm-users/chapuni/mcdc/nest/logopstack.tar.gz
llvm-users/chapuni/mcdc/nest/logopstack.tar.bz2
[MC/DC] Prune MCDCLogOpStack and use CGF.isMCDCDecisionExprusers/chapuni/mcdc/nest/logopstack
`MCDCLogOpStack` is used only for detection of the Decision root. It can be detected with `MCDC::State::DecisionByStmt`.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index e978cad..cac2c65 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -312,9 +312,6 @@ public:
/// nest would extend.
SmallVector<llvm::CanonicalLoopInfo *, 4> OMPLoopNestStack;
- /// Stack to track the Logical Operator recursion nest for MC/DC.
- SmallVector<const BinaryOperator *, 16> MCDCLogOpStack;
-
/// Stack to track the controlled convergence tokens.
SmallVector<llvm::ConvergenceControlInst *, 4> ConvergenceTokenStack;
@@ -1679,6 +1676,11 @@ public:
return (BOp && BOp->isLogicalOp());
}
+ bool isMCDCDecisionExpr(const Expr *E) const {
+ return PGO.isMCDCDecisionExpr(E);
+ }
+ bool isMCDCBranchExpr(const Expr *E) const { return PGO.isMCDCBranchExpr(E); }
+
/// Zero-init the MCDC temp value.
void maybeResetMCDCCondBitmap(const Expr *E) {
if (isMCDCCoverageEnabled() && isBinaryLogicalOp(E)) {