//===-- SimplifyConstraints.cpp ---------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "clang/Analysis/FlowSensitive/SimplifyConstraints.h" #include "llvm/ADT/EquivalenceClasses.h" namespace clang { namespace dataflow { // Substitutes all occurrences of a given atom in `F` by a given formula and // returns the resulting formula. static const Formula & substitute(const Formula &F, const llvm::DenseMap<Atom, const Formula *> &Substitutions, Arena &arena) { … } // Returns the result of replacing atoms in `Atoms` with the leader of their // equivalence class in `EquivalentAtoms`. // Atoms that don't have an equivalence class in `EquivalentAtoms` are inserted // into it as single-member equivalence classes. static llvm::DenseSet<Atom> projectToLeaders(const llvm::DenseSet<Atom> &Atoms, llvm::EquivalenceClasses<Atom> &EquivalentAtoms) { … } // Returns the atoms in the equivalence class for the leader identified by // `LeaderIt`. static llvm::SmallVector<Atom> atomsInEquivalenceClass(const llvm::EquivalenceClasses<Atom> &EquivalentAtoms, llvm::EquivalenceClasses<Atom>::iterator LeaderIt) { … } void simplifyConstraints(llvm::SetVector<const Formula *> &Constraints, Arena &arena, SimplifyConstraintsInfo *Info) { … } } // namespace dataflow } // namespace clang