21#ifndef GCC_ANALYZER_STORE_H
22#define GCC_ANALYZER_STORE_H
24#include "text-art/tree-widget.h"
242 std::unique_ptr<json::object>
to_json ()
const;
289 bit_range *out_overhanging_bit_range)
const;
318 std::unique_ptr<json::object>
to_json ()
const;
394 return hstate.
end ();
443 return key->concrete_p ();
449 static const bool empty_zero_p =
false;
499 static const bool empty_zero_p =
true;
510 typedef hash_map <const binding_key *, const svalue *>
map_t;
520 return !(*
this == other);
549 std::unique_ptr<json::object>
to_json ()
const;
552 const text_art::dump_widget_info &dwi)
const;
563 bool always_overlap);
594 typedef hash_map <const binding_key *, const svalue *>
map_t;
604 return !(*
this == other);
618 std::unique_ptr<json::object>
to_json ()
const;
620 std::unique_ptr<text_art::tree_widget>
631 const region *reg_to_bind,
632 const region *reg_for_overlap,
650 template <
typename T>
655 cb ((*iter).second, user_data);
689 template <
typename BindingVisitor>
695 const svalue *&sval = (*iter).second;
696 v.on_binding (key, sval);
749 return !(*
this == other);
761 std::unique_ptr<json::object>
to_json ()
const;
763 std::unique_ptr<text_art::tree_widget>
789 template <
typename T>
795 cb ((*iter).first, user_data);
817 const region *base_reg_b)
const;
819 template <
typename BindingVisitor>
824 (*iter).second->for_each_binding (v);
832 const store &summary);
834 const store &summary,
842 const region *base_reg_b)
const;
binding_map m_map
Definition store.h:714
void bind(store_manager *mgr, const region *, const svalue *)
void dump(bool simple) const
void get_representative_path_vars(const region_model *model, svalue_set *visited, const region *base_reg, const svalue *sval, logger *logger, auto_vec< path_var > *out_pvs) const
void fill_region(store_manager *mgr, const region *reg, const svalue *sval)
void on_asm(const gasm *stmt, store_manager *mgr, const conjured_purge &p)
const svalue * get_binding_recursive(store_manager *mgr, const region *reg) const
void for_each_value(void(*cb)(const svalue *sval, T user_data), T user_data) const
Definition store.h:651
void bind_compound_sval(store_manager *mgr, const region *reg, const compound_svalue *compound_sval)
std::unique_ptr< text_art::tree_widget > make_dump_widget(const text_art::dump_widget_info &dwi, store_manager *mgr) const
bool m_escaped
Definition store.h:722
void mark_region_as_unknown(store_manager *mgr, const region *reg_to_bind, const region *reg_for_overlap, uncertainty_t *uncertainty, svalue_set *maybe_live_values)
binding_cluster(const binding_cluster &other)
void purge_region(store_manager *mgr, const region *reg)
void clobber_region(store_manager *mgr, const region *reg)
void make_unknown_relative_to(const binding_cluster *other_cluster, store *out_store, store_manager *mgr)
void on_unknown_fncall(const gcall *call, store_manager *mgr, const conjured_purge &p)
bool operator==(const binding_cluster &other) const
hash_map< const binding_key *, const svalue * > map_t
Definition store.h:594
void bind_key(const binding_key *key, const svalue *sval)
bool empty_p() const
Definition store.h:678
const svalue * get_any_binding(store_manager *mgr, const region *reg) const
iterator_t end() const
Definition store.h:701
bool operator!=(const binding_cluster &other) const
Definition store.h:602
binding_cluster & operator=(const binding_cluster &other)
void purge_state_involving(const svalue *sval, region_model_manager *sval_mgr)
const svalue * get_any_value(const binding_key *key) const
void dump_to_pp(pretty_printer *pp, bool simple, bool multiline) const
map_t::iterator iterator_t
Definition store.h:595
const region * get_base_region() const
Definition store.h:611
const region * m_base_region
Definition store.h:712
const svalue * maybe_get_compound_binding(store_manager *mgr, const region *reg) const
bool touched_p() const
Definition store.h:675
const binding_map & get_map() const
Definition store.h:703
void for_each_binding(BindingVisitor &v) const
Definition store.h:690
iterator_t begin() const
Definition store.h:700
std::unique_ptr< json::object > to_json() const
void remove_overlapping_bindings(store_manager *mgr, const region *reg, uncertainty_t *uncertainty, svalue_set *maybe_live_values)
void zero_fill_region(store_manager *mgr, const region *reg)
const svalue * get_binding(store_manager *mgr, const region *reg) const
static bool can_merge_p(const binding_cluster *cluster_a, const binding_cluster *cluster_b, binding_cluster *out_cluster, store *out_store, store_manager *mgr, model_merger *merger)
bool m_touched
Definition store.h:728
const svalue * maybe_get_simple_value(store_manager *mgr) const
binding_cluster(const region *base_region)
void dump(bool simple) const
static const binding_key * make(store_manager *mgr, const region *r)
static int cmp_ptrs(const void *, const void *)
virtual const symbolic_binding * dyn_cast_symbolic_binding() const
Definition store.h:226
virtual bool concrete_p() const =0
virtual void dump_to_pp(pretty_printer *pp, bool simple) const =0
virtual ~binding_key()
Definition store.h:211
bool symbolic_p() const
Definition store.h:213
static int cmp(const binding_key *, const binding_key *)
label_text get_desc(bool simple=true) const
virtual const concrete_binding * dyn_cast_concrete_binding() const
Definition store.h:224
size_t elements() const
Definition store.h:544
binding_map & operator=(const binding_map &other)
map_t m_map
Definition store.h:576
static int cmp(const binding_map &map1, const binding_map &map2)
iterator_t begin() const
Definition store.h:542
void dump_to_pp(pretty_printer *pp, bool simple, bool multiline) const
void get_overlapping_bindings(const binding_key *key, auto_vec< const binding_key * > *out)
bool operator==(const binding_map &other) const
bool apply_ctor_pair_to_child_region(const region *parent_reg, region_model_manager *mgr, tree index, tree val)
void dump(bool simple) const
void empty()
Definition store.h:540
const svalue * get(const binding_key *key) const
Definition store.h:525
std::unique_ptr< json::object > to_json() const
bool apply_ctor_val_to_range(const region *parent_reg, region_model_manager *mgr, tree min_index, tree max_index, tree val)
bool apply_ctor_to_region(const region *parent_reg, tree ctor, region_model_manager *mgr)
void add_to_tree_widget(text_art::tree_widget &parent_widget, const text_art::dump_widget_info &dwi) const
map_t::iterator iterator_t
Definition store.h:511
hash_map< const binding_key *, const svalue * > map_t
Definition store.h:510
bool operator!=(const binding_map &other) const
Definition store.h:518
void remove_overlapping_bindings(store_manager *mgr, const binding_key *drop_key, uncertainty_t *uncertainty, svalue_set *maybe_live_values, bool always_overlap)
binding_map()
Definition store.h:513
void remove(const binding_key *k)
Definition store.h:539
bool put(const binding_key *k, const svalue *v)
Definition store.h:533
iterator_t end() const
Definition store.h:543
binding_map(const binding_map &other)
Definition call-summary.h:68
bit_size_t get_size_in_bits() const
Definition store.h:413
bool get_byte_range(byte_range *out) const
void mark_empty()
Definition store.h:428
concrete_binding(bit_offset_t start_bit_offset, bit_size_t size_in_bits)
Definition store.h:382
const bit_range & get_bit_range() const
Definition store.h:406
void dump_to_pp(pretty_printer *pp, bool simple) const final override
concrete_binding key_t
Definition store.h:380
bit_offset_t get_next_bit_offset() const
Definition store.h:418
bool operator==(const concrete_binding &other) const
Definition store.h:396
bool concrete_p() const final override
Definition store.h:387
bit_range m_bit_range
Definition store.h:433
bool is_empty() const
Definition store.h:430
bit_offset_t get_start_bit_offset() const
Definition store.h:409
bool is_deleted() const
Definition store.h:429
void mark_deleted()
Definition store.h:427
bool overlaps_p(const concrete_binding &other) const
hashval_t hash() const
Definition store.h:389
const concrete_binding * dyn_cast_concrete_binding() const final override
Definition store.h:403
static int cmp_ptr_ptr(const void *, const void *)
Definition analyzer-logging.h:34
Definition region-model-manager.h:32
Definition region-model.h:263
consolidation_map< symbolic_binding > m_symbolic_binding_key_mgr
Definition store.h:896
const concrete_binding * get_concrete_binding(const bit_range &bits)
Definition store.h:872
const concrete_binding * get_concrete_binding(bit_offset_t start_bit_offset, bit_offset_t size_in_bits)
const concrete_binding * get_concrete_binding(const byte_range &bytes)
Definition store.h:878
region_model_manager * m_mgr
Definition store.h:894
logger * get_logger() const
region_model_manager * get_svalue_manager() const
Definition store.h:886
store_manager(region_model_manager *mgr)
Definition store.h:863
consolidation_map< concrete_binding > m_concrete_binding_key_mgr
Definition store.h:895
void log_stats(logger *logger, bool show_objs) const
const symbolic_binding * get_symbolic_binding(const region *region)
std::unique_ptr< json::object > to_json() const
void purge_state_involving(const svalue *sval, region_model_manager *sval_mgr)
void dump(bool simple) const
bool escaped_p(const region *reg) const
hash_map< const region *, binding_cluster * > cluster_map_t
Definition store.h:738
store(const store &other)
void fill_region(store_manager *mgr, const region *reg, const svalue *sval)
void mark_as_escaped(const region *base_reg)
void purge_region(store_manager *mgr, const region *reg)
tristate eval_alias(const region *base_reg_a, const region *base_reg_b) const
void summarize_to_pp(pretty_printer *pp, bool simple) const
bool operator==(const store &other) const
store & operator=(const store &other)
void replay_call_summary_cluster(call_summary_replay &r, const store &summary, const region *base_reg)
void for_each_binding(BindingVisitor &v)
Definition store.h:820
cluster_map_t::iterator end() const
Definition store.h:814
std::unique_ptr< text_art::tree_widget > make_dump_widget(const text_art::dump_widget_info &dwi, store_manager *mgr) const
void get_representative_path_vars(const region_model *model, svalue_set *visited, const svalue *sval, logger *logger, auto_vec< path_var > *out_pvs) const
bool m_called_unknown_fn
Definition store.h:852
void loop_replay_fixup(const store *other_store, region_model_manager *mgr)
binding_cluster * get_or_create_cluster(const region *base_reg)
static bool can_merge_p(const store *store_a, const store *store_b, store *out_store, store_manager *mgr, model_merger *merger)
bool operator!=(const store &other) const
Definition store.h:747
bool called_unknown_fn_p() const
Definition store.h:769
void on_maybe_live_values(const svalue_set &maybe_live_values)
void set_value(store_manager *mgr, const region *lhs_reg, const svalue *rhs_sval, uncertainty_t *uncertainty)
cluster_map_t m_cluster_map
Definition store.h:844
const binding_cluster * get_cluster(const region *base_reg) const
void zero_fill_region(store_manager *mgr, const region *reg)
tristate eval_alias_1(const region *base_reg_a, const region *base_reg_b) const
void mark_region_as_unknown(store_manager *mgr, const region *reg, uncertainty_t *uncertainty, svalue_set *maybe_live_values)
void canonicalize(store_manager *mgr)
cluster_map_t::iterator begin() const
Definition store.h:813
const svalue * get_any_binding(store_manager *mgr, const region *reg) const
binding_cluster * get_cluster(const region *base_reg)
void replay_call_summary(call_summary_replay &r, const store &summary)
void dump_to_pp(pretty_printer *pp, bool summarize, bool multiline, store_manager *mgr) const
void on_unknown_fncall(const gcall *call, store_manager *mgr, const conjured_purge &p)
void purge_cluster(const region *base_reg)
void for_each_cluster(void(*cb)(const region *base_reg, T user_data), T user_data) const
Definition store.h:790
void remove_overlapping_bindings(store_manager *mgr, const region *reg, uncertainty_t *uncertainty)
void clobber_region(store_manager *mgr, const region *reg)
symbolic_binding key_t
Definition store.h:461
void dump_to_pp(pretty_printer *pp, bool simple) const final override
bool is_empty() const
Definition store.h:488
void mark_empty()
Definition store.h:485
bool operator==(const symbolic_binding &other) const
Definition store.h:470
bool concrete_p() const final override
Definition store.h:464
symbolic_binding(const region *region)
Definition store.h:463
const symbolic_binding * dyn_cast_symbolic_binding() const final override
Definition store.h:477
const region * get_region() const
Definition store.h:480
bool is_deleted() const
Definition store.h:486
hashval_t hash() const
Definition store.h:466
const region * m_region
Definition store.h:491
static int cmp_ptr_ptr(const void *, const void *)
void mark_deleted()
Definition store.h:484
bool unknown_sm_state_p(const svalue *sval)
Definition store.h:174
hash_set< constsvalue * >::iterator iterator
Definition store.h:163
void dump(bool simple) const
void dump_to_pp(pretty_printer *pp, bool simple) const
void on_mutable_sval_at_unknown_call(const svalue *sval)
Definition store.h:169
iterator end_maybe_bound_svals() const
Definition store.h:187
hash_set< const svalue * > m_mutable_at_unknown_call_svals
Definition store.h:198
void on_maybe_bound_sval(const svalue *sval)
Definition store.h:165
iterator begin_maybe_bound_svals() const
Definition store.h:183
hash_set< const svalue * > m_maybe_bound_svals
Definition store.h:195
Definition analyzer.h:529
iterator begin() const
Definition hash-map.h:302
void empty()
Definition hash-map.h:249
size_t elements() const
Definition hash-map.h:247
void remove(const Key &k)
Definition hash-map.h:218
iterator end() const
Definition hash-map.h:303
bool put(const Key &k, const Value &v)
Definition hash-map.h:168
Definition hash-set.h:110
iterator begin() const
Definition hash-set.h:140
iterator end() const
Definition hash-set.h:141
bool contains(const Key &k)
Definition hash-set.h:73
bool add(const Key &k)
Definition hash-set.h:56
hashval_t end() const
Definition inchash.h:49
void add_wide_int(const generic_wide_int< T > &x)
Definition inchash.h:84
Definition pretty-print.h:249
Definition lra-spills.cc:101
union tree_node * tree
Definition coretypes.h:97
void final(rtx_insn *first, FILE *file, int optimize_p)
Definition final.cc:2003
Definition access-diagram.h:30
offset_int byte_size_t
Definition analyzer.h:182
offset_int bit_offset_t
Definition analyzer.h:179
offset_int byte_offset_t
Definition analyzer.h:181
offset_int bit_size_t
Definition analyzer.h:180
poly_int< N, C > r
Definition poly-int.h:774
rtx offset
Definition postreload.cc:691
bit_range operator-(bit_offset_t offset) const
bool operator==(const bit_range &other) const
Definition store.h:271
std::unique_ptr< json::object > to_json() const
bool exceeds_p(const bit_range &other, bit_range *out_overhanging_bit_range) const
bool empty_p() const
Definition store.h:244
bool intersects_p(const bit_range &other) const
Definition store.h:277
static bool from_mask(unsigned HOST_WIDE_INT mask, bit_range *out)
bool falls_short_of_p(bit_offset_t offset, bit_range *out_fall_short_bits) const
bool intersects_p(const bit_range &other, bit_range *out_this, bit_range *out_other) const
bit_size_t m_size_in_bits
Definition store.h:303
bool contains_p(bit_offset_t offset) const
Definition store.h:263
bit_offset_t get_next_bit_offset() const
Definition store.h:253
bit_offset_t m_start_bit_offset
Definition store.h:302
bool intersects_p(const bit_range &other, bit_size_t *out_num_overlap_bits) const
void dump_to_pp(pretty_printer *pp) const
bit_range(bit_offset_t start_bit_offset, bit_size_t size_in_bits)
Definition store.h:234
bool as_byte_range(byte_range *out) const
static int cmp(const bit_range &br1, const bit_range &br2)
bool contains_p(const bit_range &other, bit_range *out) const
bit_offset_t get_start_bit_offset() const
Definition store.h:249
bit_offset_t get_last_bit_offset() const
Definition store.h:257
bool operator==(const byte_range &other) const
Definition store.h:332
byte_offset_t get_next_byte_offset() const
Definition store.h:342
byte_size_t m_size_in_bytes
Definition store.h:370
byte_offset_t get_last_byte_offset() const
Definition store.h:346
bool contains_p(byte_offset_t offset) const
Definition store.h:325
byte_offset_t get_start_byte_offset() const
Definition store.h:338
void dump_to_pp(pretty_printer *pp) const
byte_range(byte_offset_t start_byte_offset, byte_size_t size_in_bytes)
Definition store.h:310
static int cmp(const byte_range &br1, const byte_range &br2)
bit_offset_t get_start_bit_offset() const
Definition store.h:358
byte_offset_t m_start_byte_offset
Definition store.h:369
bool contains_p(const byte_range &other, byte_range *out) const
bool empty_p() const
Definition store.h:320
bit_offset_t get_next_bit_offset() const
Definition store.h:362
std::unique_ptr< json::object > to_json() const
bit_range as_bit_range() const
Definition store.h:352
Definition region-model.h:1132
Definition hash-traits.h:466
Definition analyzer.h:508
#define NULL
Definition system.h:50
#define gcc_assert(EXPR)
Definition system.h:821
static bitmap visited
Definition tree-ssa-dce.cc:537
tree size_in_bytes(const_tree t)
Definition tree.h:5108