21#ifndef GCC_ORDERED_HASH_MAP_H
22#define GCC_ORDERED_HASH_MAP_H
32template<
typename KeyId,
typename Value,
36 typedef typename Traits::key_type
Key;
56 bool put (
const Key &k,
const Value &v)
58 bool existed =
m_map.put (k, v);
86 Value &ret =
m_map.get_or_insert (k, &_existed);
144 template <
typename K,
typename V>
145 operator std::pair<K, V> ()
const {
return std::pair<K, V> (
first,
second); }
186 while (!
i.valid_index_p () &&
i !=
end ())
209template<
typename Key,
typename Value,
Value & get_or_insert(const Key &k, bool *existed=NULL)
Definition hash-map.h:199
Definition ordered-hash-map.h:116
unsigned m_idx
Definition ordered-hash-map.h:178
bool valid_index_p() const
Definition ordered-hash-map.h:165
bool operator!=(const iterator &other) const
Definition ordered-hash-map.h:158
iterator & operator++()
Definition ordered-hash-map.h:121
iterator(const ordered_hash_map &map, unsigned idx)
Definition ordered-hash-map.h:118
reference_pair operator*()
Definition ordered-hash-map.h:148
const ordered_hash_map & m_ordered_hash_map
Definition ordered-hash-map.h:177
Definition ordered-hash-map.h:35
bool put(const Key &k, const Value &v)
Definition ordered-hash-map.h:56
hash_map< KeyId, int > m_key_index
Definition ordered-hash-map.h:204
Value & get_or_insert(const Key &k, bool *existed=NULL)
Definition ordered-hash-map.h:83
ordered_hash_map(const ordered_hash_map &other)
Definition ordered-hash-map.h:41
Value * get(const Key &k)
Definition ordered-hash-map.h:74
void operator=(const ordered_hash_map &)
hash_map< KeyId, Value, Traits > m_map
Definition ordered-hash-map.h:198
ordered_hash_map()
Definition ordered-hash-map.h:39
auto_vec< Key > m_keys
Definition ordered-hash-map.h:201
iterator begin() const
Definition ordered-hash-map.h:183
iterator end() const
Definition ordered-hash-map.h:190
size_t elements() const
Definition ordered-hash-map.h:113
void remove(const Key &k)
Definition ordered-hash-map.h:108
Traits::key_type Key
Definition ordered-hash-map.h:36
Definition lra-spills.cc:101
static struct string2counter_map map[debug_counter_number_of_counters]
Definition dbgcnt.cc:39
i
Definition poly-int.h:776
Definition ordered-hash-map.h:137
Value & second
Definition ordered-hash-map.h:139
const Key & first
Definition ordered-hash-map.h:138
reference_pair(const Key &key, Value &value)
Definition ordered-hash-map.h:141
Definition hash-map-traits.h:33
#define NULL
Definition system.h:50
#define gcc_assert(EXPR)
Definition system.h:821
#define FOR_EACH_VEC_ELT(V, I, P)
Definition vec.h:1884