OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [tree-ssa-alias.h] - Diff between revs 816 and 826

Only display areas with differences | Details | Blame | View Log

Rev 816 Rev 826
/* Tree based alias analysis and alias oracle.
/* Tree based alias analysis and alias oracle.
   Copyright (C) 2008 Free Software Foundation, Inc.
   Copyright (C) 2008 Free Software Foundation, Inc.
   Contributed by Richard Guenther  <rguenther@suse.de>
   Contributed by Richard Guenther  <rguenther@suse.de>
 
 
   This file is part of GCC.
   This file is part of GCC.
 
 
   GCC is free software; you can redistribute it and/or modify
   GCC is free software; you can redistribute it and/or modify
   under the terms of the GNU General Public License as published by
   under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.
   (at your option) any later version.
 
 
   GCC is distributed in the hope that it will be useful,
   GCC is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   GNU General Public License for more details.
 
 
   You should have received a copy of the GNU General Public License
   You should have received a copy of the GNU General Public License
   along with GCC; see the file COPYING3.  If not see
   along with GCC; see the file COPYING3.  If not see
   <http://www.gnu.org/licenses/>.  */
   <http://www.gnu.org/licenses/>.  */
 
 
#ifndef TREE_SSA_ALIAS_H
#ifndef TREE_SSA_ALIAS_H
#define TREE_SSA_ALIAS_H
#define TREE_SSA_ALIAS_H
 
 
#include "coretypes.h"
#include "coretypes.h"
 
 
 
 
/* The points-to solution.
/* The points-to solution.
 
 
   The points-to solution is a union of pt_vars and the abstract
   The points-to solution is a union of pt_vars and the abstract
   sets specified by the flags.  */
   sets specified by the flags.  */
struct GTY(()) pt_solution
struct GTY(()) pt_solution
{
{
  /* Nonzero if points-to analysis couldn't determine where this pointer
  /* Nonzero if points-to analysis couldn't determine where this pointer
     is pointing to.  */
     is pointing to.  */
  unsigned int anything : 1;
  unsigned int anything : 1;
 
 
  /* Nonzero if the points-to set includes any global memory.  Note that
  /* Nonzero if the points-to set includes any global memory.  Note that
     even if this is zero pt_vars can still include global variables.  */
     even if this is zero pt_vars can still include global variables.  */
  unsigned int nonlocal : 1;
  unsigned int nonlocal : 1;
 
 
  /* Nonzero if the points-to set includes any escaped local variable.  */
  /* Nonzero if the points-to set includes any escaped local variable.  */
  unsigned int escaped : 1;
  unsigned int escaped : 1;
 
 
  /* Nonzero if the points-to set includes 'nothing', the points-to set
  /* Nonzero if the points-to set includes 'nothing', the points-to set
     includes memory at address NULL.  */
     includes memory at address NULL.  */
  unsigned int null : 1;
  unsigned int null : 1;
 
 
 
 
  /* Nonzero if the pt_vars bitmap includes a global variable.  */
  /* Nonzero if the pt_vars bitmap includes a global variable.  */
  unsigned int vars_contains_global : 1;
  unsigned int vars_contains_global : 1;
 
 
  /* Nonzero if the pt_vars bitmap includes a restrict tag variable.  */
  /* Nonzero if the pt_vars bitmap includes a restrict tag variable.  */
  unsigned int vars_contains_restrict : 1;
  unsigned int vars_contains_restrict : 1;
 
 
  /* Set of variables that this pointer may point to.  */
  /* Set of variables that this pointer may point to.  */
  bitmap vars;
  bitmap vars;
};
};
 
 
 
 
/* Simplified and cached information about a memory reference tree.
/* Simplified and cached information about a memory reference tree.
   Used by the alias-oracle internally and externally in alternate
   Used by the alias-oracle internally and externally in alternate
   interfaces.  */
   interfaces.  */
typedef struct ao_ref_s
typedef struct ao_ref_s
{
{
  /* The original full memory reference tree or NULL_TREE if that is
  /* The original full memory reference tree or NULL_TREE if that is
     not available.  */
     not available.  */
  tree ref;
  tree ref;
 
 
  /* The following fields are the decomposed reference as returned
  /* The following fields are the decomposed reference as returned
     by get_ref_base_and_extent.  */
     by get_ref_base_and_extent.  */
  /* The base object of the memory reference or NULL_TREE if all of
  /* The base object of the memory reference or NULL_TREE if all of
     the following fields are not yet computed.  */
     the following fields are not yet computed.  */
  tree base;
  tree base;
  /* The offset relative to the base.  */
  /* The offset relative to the base.  */
  HOST_WIDE_INT offset;
  HOST_WIDE_INT offset;
  /* The size of the access.  */
  /* The size of the access.  */
  HOST_WIDE_INT size;
  HOST_WIDE_INT size;
  /* The maximum possible extent of the access or -1 if unconstrained.  */
  /* The maximum possible extent of the access or -1 if unconstrained.  */
  HOST_WIDE_INT max_size;
  HOST_WIDE_INT max_size;
 
 
  /* The alias set of the access or -1 if not yet computed.  */
  /* The alias set of the access or -1 if not yet computed.  */
  alias_set_type ref_alias_set;
  alias_set_type ref_alias_set;
 
 
  /* The alias set of the base object or -1 if not yet computed.  */
  /* The alias set of the base object or -1 if not yet computed.  */
  alias_set_type base_alias_set;
  alias_set_type base_alias_set;
} ao_ref;
} ao_ref;
 
 
 
 
/* In tree-ssa-alias.c  */
/* In tree-ssa-alias.c  */
extern void ao_ref_init (ao_ref *, tree);
extern void ao_ref_init (ao_ref *, tree);
extern void ao_ref_init_from_ptr_and_size (ao_ref *, tree, tree);
extern void ao_ref_init_from_ptr_and_size (ao_ref *, tree, tree);
extern tree ao_ref_base (ao_ref *);
extern tree ao_ref_base (ao_ref *);
extern alias_set_type ao_ref_alias_set (ao_ref *);
extern alias_set_type ao_ref_alias_set (ao_ref *);
extern bool ptr_deref_may_alias_global_p (tree);
extern bool ptr_deref_may_alias_global_p (tree);
extern bool refs_may_alias_p (tree, tree);
extern bool refs_may_alias_p (tree, tree);
extern bool refs_may_alias_p_1 (ao_ref *, ao_ref *, bool);
extern bool refs_may_alias_p_1 (ao_ref *, ao_ref *, bool);
extern bool refs_anti_dependent_p (tree, tree);
extern bool refs_anti_dependent_p (tree, tree);
extern bool refs_output_dependent_p (tree, tree);
extern bool refs_output_dependent_p (tree, tree);
extern bool ref_maybe_used_by_stmt_p (gimple, tree);
extern bool ref_maybe_used_by_stmt_p (gimple, tree);
extern bool stmt_may_clobber_ref_p (gimple, tree);
extern bool stmt_may_clobber_ref_p (gimple, tree);
extern bool stmt_may_clobber_ref_p_1 (gimple, ao_ref *);
extern bool stmt_may_clobber_ref_p_1 (gimple, ao_ref *);
extern tree get_continuation_for_phi (gimple, ao_ref *, bitmap *);
extern tree get_continuation_for_phi (gimple, ao_ref *, bitmap *);
extern void *walk_non_aliased_vuses (ao_ref *, tree,
extern void *walk_non_aliased_vuses (ao_ref *, tree,
                                     void *(*)(ao_ref *, tree, void *),
                                     void *(*)(ao_ref *, tree, void *),
                                     void *(*)(ao_ref *, tree, void *), void *);
                                     void *(*)(ao_ref *, tree, void *), void *);
extern unsigned int walk_aliased_vdefs (ao_ref *, tree,
extern unsigned int walk_aliased_vdefs (ao_ref *, tree,
                                        bool (*)(ao_ref *, tree, void *),
                                        bool (*)(ao_ref *, tree, void *),
                                        void *, bitmap *);
                                        void *, bitmap *);
extern struct ptr_info_def *get_ptr_info (tree);
extern struct ptr_info_def *get_ptr_info (tree);
extern void dump_alias_info (FILE *);
extern void dump_alias_info (FILE *);
extern void debug_alias_info (void);
extern void debug_alias_info (void);
extern void dump_points_to_solution (FILE *, struct pt_solution *);
extern void dump_points_to_solution (FILE *, struct pt_solution *);
extern void dump_points_to_info_for (FILE *, tree);
extern void dump_points_to_info_for (FILE *, tree);
extern void debug_points_to_info_for (tree);
extern void debug_points_to_info_for (tree);
extern void dump_alias_stats (FILE *);
extern void dump_alias_stats (FILE *);
 
 
 
 
/* In tree-ssa-structalias.c  */
/* In tree-ssa-structalias.c  */
extern unsigned int compute_may_aliases (void);
extern unsigned int compute_may_aliases (void);
extern void delete_alias_heapvars (void);
extern void delete_alias_heapvars (void);
extern bool pt_solution_includes_global (struct pt_solution *);
extern bool pt_solution_includes_global (struct pt_solution *);
extern bool pt_solution_includes (struct pt_solution *, const_tree);
extern bool pt_solution_includes (struct pt_solution *, const_tree);
extern bool pt_solutions_intersect (struct pt_solution *, struct pt_solution *);
extern bool pt_solutions_intersect (struct pt_solution *, struct pt_solution *);
extern bool pt_solutions_same_restrict_base (struct pt_solution *,
extern bool pt_solutions_same_restrict_base (struct pt_solution *,
                                             struct pt_solution *);
                                             struct pt_solution *);
extern void pt_solution_reset (struct pt_solution *);
extern void pt_solution_reset (struct pt_solution *);
extern void pt_solution_set (struct pt_solution *, bitmap);
extern void pt_solution_set (struct pt_solution *, bitmap);
extern void dump_pta_stats (FILE *);
extern void dump_pta_stats (FILE *);
 
 
 
 
#endif /* TREE_SSA_ALIAS_H  */
#endif /* TREE_SSA_ALIAS_H  */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.