aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/store.h
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2020-08-21 18:55:11 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2020-08-22 11:05:02 -0400
commitc199723d7ed0032db095abc75b82a9710eaa5e56 (patch)
tree7585151b0b18e450f2797adb7e124d6709f64a24 /gcc/analyzer/store.h
parent294b6da21bbd8297fe6aee497ac6c8e561637e70 (diff)
downloadgcc-c199723d7ed0032db095abc75b82a9710eaa5e56.zip
gcc-c199723d7ed0032db095abc75b82a9710eaa5e56.tar.gz
gcc-c199723d7ed0032db095abc75b82a9710eaa5e56.tar.bz2
analyzer: simplify store::eval_alias
I have followup patches that add new conditions to store::eval_alias. Rather than duplicate all conditions for symmetry, split it up and call it on both (A, B) and (B, A). gcc/analyzer/ChangeLog: * store.cc (store::eval_alias): Make const. Split out 2nd half into store::eval_alias_1 and call it twice for symmetry, avoiding test duplication. (store::eval_alias_1): New function, split out from the above. * store.h (store::eval_alias): Make const. (store::eval_alias_1): New decl.
Diffstat (limited to 'gcc/analyzer/store.h')
-rw-r--r--gcc/analyzer/store.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/analyzer/store.h b/gcc/analyzer/store.h
index bc9dc2e..636a9547 100644
--- a/gcc/analyzer/store.h
+++ b/gcc/analyzer/store.h
@@ -553,7 +553,7 @@ public:
cluster_map_t::iterator end () const { return m_cluster_map.end (); }
tristate eval_alias (const region *base_reg_a,
- const region *base_reg_b);
+ const region *base_reg_b) const;
template <typename BindingVisitor>
void for_each_binding (BindingVisitor &v)
@@ -569,6 +569,8 @@ public:
private:
void remove_overlapping_bindings (store_manager *mgr, const region *reg);
+ tristate eval_alias_1 (const region *base_reg_a,
+ const region *base_reg_b) const;
cluster_map_t m_cluster_map;