#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
-#include "input.h"
#include "alias.h"
#include "symtab.h"
#include "tree.h"
#include "tree-ssa-alias.h"
#include "internal-fn.h"
#include "gimple-expr.h"
-#include "is-a.h"
#include "gimple.h"
#include "gimple-ssa.h"
#include "rtl-iter.h"
However, this is no actual entry for alias set zero. It is an
error to attempt to explicitly construct a subset of zero. */
-struct alias_set_traits : default_hashmap_traits
-{
- template<typename T>
- static bool
- is_empty (T &e)
- {
- return e.m_key == INT_MIN;
- }
-
- template<typename T>
- static bool
- is_deleted (T &e)
- {
- return e.m_key == (INT_MIN + 1);
- }
-
- template<typename T> static void mark_empty (T &e) { e.m_key = INT_MIN; }
-
- template<typename T>
- static void
- mark_deleted (T &e)
- {
- e.m_key = INT_MIN + 1;
- }
-};
+struct alias_set_hash : int_hash <int, INT_MIN, INT_MIN + 1> {};
struct GTY(()) alias_set_entry_d {
/* The alias set number, as stored in MEM_ALIAS_SET. */
continuing our example above, the children here will be all of
`int', `double', `float', and `struct S'. */
- hash_map<int, int, alias_set_traits> *children;
+ hash_map<alias_set_hash, int> *children;
/* Nonzero if would have a child of zero: this effectively makes this
alias set the same as alias set zero. */
subset_entry = get_alias_set_entry (subset);
if (!superset_entry->children)
superset_entry->children
- = hash_map<int, int, alias_set_traits>::create_ggc (64);
+ = hash_map<alias_set_hash, int>::create_ggc (64);
/* If there is an entry for the subset, enter all of its children
(if they are not already present) as children of the SUPERSET. */
if (subset_entry)
if (subset_entry->children)
{
- hash_map<int, int, alias_set_traits>::iterator iter
+ hash_map<alias_set_hash, int>::iterator iter
= subset_entry->children->begin ();
for (; iter != subset_entry->children->end (); ++iter)
superset_entry->children->put ((*iter).first, (*iter).second);