Skip to content

Commit 7ce010f

Browse files
authored
Revert "[clang][dataflow] Add an early-out to flowConditionImplies() / flowConditionAllows()." (#77570)
Reverts #77453
1 parent 7c71a09 commit 7ce010f

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

clang/include/clang/Analysis/FlowSensitive/Formula.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ class alignas(const Formula *) Formula {
7575
return static_cast<bool>(Value);
7676
}
7777

78-
bool isLiteral(bool b) const {
79-
return kind() == Literal && static_cast<bool>(Value) == b;
80-
}
81-
8278
ArrayRef<const Formula *> operands() const {
8379
return ArrayRef(reinterpret_cast<Formula *const *>(this + 1),
8480
numOperands(kind()));

clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ Solver::Result DataflowAnalysisContext::querySolver(
174174

175175
bool DataflowAnalysisContext::flowConditionImplies(Atom Token,
176176
const Formula &F) {
177-
if (F.isLiteral(true))
178-
return true;
179-
180177
// Returns true if and only if truth assignment of the flow condition implies
181178
// that `F` is also true. We prove whether or not this property holds by
182179
// reducing the problem to satisfiability checking. In other words, we attempt
@@ -191,9 +188,6 @@ bool DataflowAnalysisContext::flowConditionImplies(Atom Token,
191188

192189
bool DataflowAnalysisContext::flowConditionAllows(Atom Token,
193190
const Formula &F) {
194-
if (F.isLiteral(true))
195-
return true;
196-
197191
llvm::SetVector<const Formula *> Constraints;
198192
Constraints.insert(&arena().makeAtomRef(Token));
199193
Constraints.insert(&F);

0 commit comments

Comments
 (0)