Skip to content

Commit

Permalink
Revert "[clang][dataflow] Add an early-out to `flowConditionImplies()…
Browse files Browse the repository at this point in the history
…` / `flowConditionAllows()`." (#77570)

Reverts #77453
  • Loading branch information
martinboehme committed Jan 10, 2024
1 parent 7c71a09 commit 7ce010f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
4 changes: 0 additions & 4 deletions clang/include/clang/Analysis/FlowSensitive/Formula.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ class alignas(const Formula *) Formula {
return static_cast<bool>(Value);
}

bool isLiteral(bool b) const {
return kind() == Literal && static_cast<bool>(Value) == b;
}

ArrayRef<const Formula *> operands() const {
return ArrayRef(reinterpret_cast<Formula *const *>(this + 1),
numOperands(kind()));
Expand Down
6 changes: 0 additions & 6 deletions clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,6 @@ Solver::Result DataflowAnalysisContext::querySolver(

bool DataflowAnalysisContext::flowConditionImplies(Atom Token,
const Formula &F) {
if (F.isLiteral(true))
return true;

// Returns true if and only if truth assignment of the flow condition implies
// that `F` is also true. We prove whether or not this property holds by
// reducing the problem to satisfiability checking. In other words, we attempt
Expand All @@ -191,9 +188,6 @@ bool DataflowAnalysisContext::flowConditionImplies(Atom Token,

bool DataflowAnalysisContext::flowConditionAllows(Atom Token,
const Formula &F) {
if (F.isLiteral(true))
return true;

llvm::SetVector<const Formula *> Constraints;
Constraints.insert(&arena().makeAtomRef(Token));
Constraints.insert(&F);
Expand Down

0 comments on commit 7ce010f

Please sign in to comment.