This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Minor cleanup in alias.c


This is mostly changing comments.

Sat May 20 09:30:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* alias.c: Clarify some comments.
	(record_base_value): REGNO is unsigned.
	* rtl.h (record_base_value): Likewise.

*** alias.c	2000/05/20 13:28:13	1.80
--- alias.c	2000/05/20 15:55:31
*************** Boston, MA 02111-1307, USA.  */
*** 39,44 ****
  /* The alias sets assigned to MEMs assist the back-end in determining
     which MEMs can alias which other MEMs.  In general, two MEMs in
!    different alias sets to not alias each other.  There is one
!    exception, however.  Consider something like:
  
       struct S {int i; double d; };
--- 39,44 ----
  /* The alias sets assigned to MEMs assist the back-end in determining
     which MEMs can alias which other MEMs.  In general, two MEMs in
!    different alias sets cannot alias each other, with one important
!    exception.  Consider something like:
  
       struct S {int i; double d; };
*************** Boston, MA 02111-1307, USA.  */
*** 54,63 ****
           int    double
  
!    (The arrows are directed and point downwards.)  If, when comparing
!    two alias sets, we can hold one set fixed,  trace the other set
!    downwards, and at some point find the first set, the two MEMs can
!    alias one another.  In this situation we say the alias set for
!    `struct S' is the `superset' and that those for `int' and `double'
!    are `subsets'.  
  
     Alias set zero is implicitly a superset of all other alias sets.
--- 54,65 ----
           int    double
  
!    (The arrows are directed and point downwards.)
!     In this situation we say the alias set for `struct S' is the
!    `superset' and that those for `int' and `double' are `subsets'.
! 
!    To see whether two alias sets can point to the same memory, we must go
!    down the list of decendents of each and see if there is some alias set
!    in common.  We need not trace past immediate decendents, however, since
!    we propagate all grandchildren up one level.
  
     Alias set zero is implicitly a superset of all other alias sets.
*************** typedef struct alias_set_entry
*** 71,75 ****
  
    /* The children of the alias set.  These are not just the immediate
!      children, but, in fact, all children.  So, if we have:
  
         struct T { struct S s; float f; } 
--- 73,77 ----
  
    /* The children of the alias set.  These are not just the immediate
!      children, but, in fact, all decendents.  So, if we have:
  
         struct T { struct S s; float f; } 
*************** static int nonlocal_reference_p         
*** 112,118 ****
  
  /* Cap the number of passes we make over the insns propagating alias
!    information through set chains.
! 
!    10 is a completely arbitrary choice.  */
  #define MAX_ALIAS_LOOP_PASSES 10
     
--- 114,118 ----
  
  /* Cap the number of passes we make over the insns propagating alias
!    information through set chains.   10 is a completely arbitrary choice.  */
  #define MAX_ALIAS_LOOP_PASSES 10
     
*************** static unsigned int reg_known_value_size
*** 165,187 ****
     REG_EQUIV note.  Future passes (viz., reload) may replace the
     pseudo with the equivalent expression and so we account for the
!    dependences that would be introduced if that happens. */
! /* ??? This is a problem only on the Convex.  The REG_EQUIV notes created in
!    assign_parms mention the arg pointer, and there are explicit insns in the
!    RTL that modify the arg pointer.  Thus we must ensure that such insns don't
!    get scheduled across each other because that would invalidate the REG_EQUIV
!    notes.  One could argue that the REG_EQUIV notes are wrong, but solving
!    the problem in the scheduler will likely give better code, so we do it
!    here.  */
  char *reg_known_equiv_p;
  
  /* True when scanning insns from the start of the rtl to the
     NOTE_INSN_FUNCTION_BEG note.  */
- 
  static int copying_arguments;
  
  /* The splay-tree used to store the various alias set entries.  */
- 
  static splay_tree alias_sets;
! 
  /* Returns a pointer to the alias set entry for ALIAS_SET, if there is
     such an entry, or NULL otherwise.  */
--- 165,186 ----
     REG_EQUIV note.  Future passes (viz., reload) may replace the
     pseudo with the equivalent expression and so we account for the
!    dependences that would be introduced if that happens.
! 
!    The REG_EQUIV notes created in assign_parms may mention the arg
!    pointer, and there are explicit insns in the RTL that modify the
!    arg pointer.  Thus we must ensure that such insns don't get
!    scheduled across each other because that would invalidate the
!    REG_EQUIV notes.  One could argue that the REG_EQUIV notes are
!    wrong, but solving the problem in the scheduler will likely give
!    better code, so we do it here.  */
  char *reg_known_equiv_p;
  
  /* True when scanning insns from the start of the rtl to the
     NOTE_INSN_FUNCTION_BEG note.  */
  static int copying_arguments;
  
  /* The splay-tree used to store the various alias set entries.  */
  static splay_tree alias_sets;
! 
  /* Returns a pointer to the alias set entry for ALIAS_SET, if there is
     such an entry, or NULL otherwise.  */
*************** get_alias_set_entry (alias_set)
*** 197,202 ****
  }
  
! /* Returns nonzero value if the alias sets for MEM1 and MEM2 are such
!    that the two MEMs cannot alias each other.  */
  
  static int 
--- 196,201 ----
  }
  
! /* Returns nonzero if the alias sets for MEM1 and MEM2 are such that
!    the two MEMs cannot alias each other.  */
  
  static int 
*************** record_set (dest, set, data)
*** 516,533 ****
  }
  
! /* Called from loop optimization when a new pseudo-register is created.  */
  
  void
  record_base_value (regno, val, invariant)
!      int regno;
       rtx val;
       int invariant;
  {
!   if ((unsigned) regno >= reg_base_value_size)
      return;
  
-   /* If INVARIANT is true then this value also describes an invariant
-      relationship which can be used to deduce that two registers with
-      unknown values are different.  */
    if (invariant && alias_invariant)
      alias_invariant[regno] = val;
--- 515,533 ----
  }
  
! /* Called from loop optimization when a new pseudo-register is
!    created.  It indicates that REGNO is being set to VAL.  f INVARIANT
!    is true then this value also describes an invariant relationship
!    which can be used to deduce that two registers with unknown values
!    are different.  */
  
  void
  record_base_value (regno, val, invariant)
!      unsigned int regno;
       rtx val;
       int invariant;
  {
!   if (regno >= reg_base_value_size)
      return;
  
    if (invariant && alias_invariant)
      alias_invariant[regno] = val;
*************** record_base_value (regno, val, invariant
*** 535,539 ****
    if (GET_CODE (val) == REG)
      {
!       if ((unsigned) REGNO (val) < reg_base_value_size)
  	reg_base_value[regno] = reg_base_value[REGNO (val)];
  
--- 535,539 ----
    if (GET_CODE (val) == REG)
      {
!       if (REGNO (val) < reg_base_value_size)
  	reg_base_value[regno] = reg_base_value[REGNO (val)];
  
*** rtl.h	2000/05/19 20:51:49	1.204
--- rtl.h	2000/05/20 15:55:42
*************** extern void init_alias_analysis		PARAMS 
*** 1824,1828 ****
  extern void end_alias_analysis		PARAMS ((void));
  
! extern void record_base_value		PARAMS ((int, rtx, int));
  extern void record_alias_subset         PARAMS ((int, int));
  extern rtx addr_side_effect_eval	PARAMS ((rtx, int, int));
--- 1824,1828 ----
  extern void end_alias_analysis		PARAMS ((void));
  
! extern void record_base_value		PARAMS ((unsigned int, rtx, int));
  extern void record_alias_subset         PARAMS ((int, int));
  extern rtx addr_side_effect_eval	PARAMS ((rtx, int, int));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]