aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/common.py
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2023-06-21 18:59:01 +0200
committerSam McCall <sam.mccall@gmail.com>2023-07-05 13:54:32 +0200
commit5e4ad816bf100b0325ed45ab1cfea18deb3ab3d1 (patch)
tree69b777c545850d50a5c2e6a59c21ba1f98a52d0e /llvm/utils/UpdateTestChecks/common.py
parentc9d381e3a4edc06ed9a2e829685581e3779b0dde (diff)
downloadllvm-5e4ad816bf100b0325ed45ab1cfea18deb3ab3d1.zip
llvm-5e4ad816bf100b0325ed45ab1cfea18deb3ab3d1.tar.gz
llvm-5e4ad816bf100b0325ed45ab1cfea18deb3ab3d1.tar.bz2
[dataflow] Replace most BoolValue subclasses with references to Formula (and AtomicBoolValue => Atom and BoolValue => Formula where appropriate)
This properly frees the Value hierarchy from managing boolean formulas. We still distinguish AtomicBoolValue; this type is used in client code. However we expect to convert such uses to BoolValue (where the distinction is not needed) or Atom (where atomic identity is intended), and then fold AtomicBoolValue into FormulaBoolValue. We also distinguish TopBoolValue; this has distinct rules for widen/join/equivalence, and top-ness is not represented in Formula. It'd be nice to find a cleaner representation (e.g. the absence of a formula), but no immediate plans. For now, BoolValues with the same Formula are deduplicated. This doesn't seem desirable, as Values are mutable by their creators (properties). We can probably drop this for FormulaBoolValue immediately (not in this patch, to isolate changes). For AtomicBoolValue we first need to update clients to stop using value pointers for atom identity. The data structures around flow conditions are updated: - flow condition tokens are Atom, rather than AtomicBoolValue* - conditions are Formula, rather than BoolValue Most APIs were changed directly, some with many clients had a new version added and the existing one deprecated. The factories for BoolValues in Environment keep their existing signatures for now (e.g. makeOr(BoolValue, BoolValue) => BoolValue) and are not deprecated. These have very many clients and finding the most ergonomic API & migration path still needs some thought. Differential Revision: https://reviews.llvm.org/D153469
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
0 files changed, 0 insertions, 0 deletions