#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);
if (! DECL_P (exprx) || ! DECL_P (expry))
return 0;
- /* If we refer to different gimple registers, or one gimple register
- and one non-gimple-register, we know they can't overlap. First,
- gimple registers don't have their addresses taken. Now, there
- could be more than one stack slot for (different versions of) the
- same gimple register, but we can presumably tell they don't
- overlap based on offsets from stack base addresses elsewhere.
- It's important that we don't proceed to DECL_RTL, because gimple
- registers may not pass DECL_RTL_SET_P, and make_decl_rtl won't be
- able to do anything about them since no SSA information will have
- remained to guide it. */
- if (is_gimple_reg (exprx) || is_gimple_reg (expry))
- return exprx != expry;
-
/* With invalid code we can end up storing into the constant pool.
Bail out to avoid ICEing when creating RTL for this.
See gfortran.dg/lto/20091028-2_0.f90. */