OSDN Git Service

gcc/
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 3 Jun 2000 00:33:00 +0000 (00:33 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 3 Jun 2000 00:33:00 +0000 (00:33 +0000)
* alias.c (lang_get_alias_set): Remove.
(get_alias_set): Call it directly, not indirectly.
* c-common.c (lang_get_alias_set): Rename from c_get_alias_set.
* c-common.h (c_get_alias_set): Don't declare.
* c-decl.c (init_decl_processing): Don't set lang_get_alias_set.
* expr.h (lang_get_alias_set): Declare as function, not pointer.

gcc/ch/
* lang.c (lang_get_alias_set): New.

gcc/cp/
* decl.c (init_decl_processing): Don't set lang_get_alias_set.

gcc/f/
* com.c (lang_get_alias_set): New.

gcc/java/
* lang.c (lang_get_alias_set): New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34368 138bc75d-0d04-0410-961f-82ee72b054a4

14 files changed:
gcc/ChangeLog
gcc/alias.c
gcc/c-common.c
gcc/c-common.h
gcc/c-decl.c
gcc/ch/ChangeLog
gcc/ch/lang.c
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/expr.h
gcc/f/ChangeLog
gcc/f/com.c
gcc/java/ChangeLog
gcc/java/lang.c

index 8857e6c..3b27cea 100644 (file)
@@ -1,3 +1,12 @@
+2000-06-02  Richard Henderson  <rth@cygnus.com>
+
+       * alias.c (lang_get_alias_set): Remove.
+       (get_alias_set): Call it directly, not indirectly.
+       * c-common.c (lang_get_alias_set): Rename from c_get_alias_set.
+       * c-common.h (c_get_alias_set): Don't declare.
+       * c-decl.c (init_decl_processing): Don't set lang_get_alias_set.
+       * expr.h (lang_get_alias_set): Declare as function, not pointer.
+       
 2000-06-02  Bruce Korb  <bkorb@gnu.org>
 
        * fixinc/server.c(sig_handler):  resume closing server on SIGPIPE
index 4541d51..d180418 100644 (file)
@@ -81,10 +81,6 @@ typedef struct alias_set_entry
   splay_tree children;
 } *alias_set_entry;
 
-/* The language-specific function for alias analysis.  If NULL, the
-   language does not do any special alias analysis.  */
-HOST_WIDE_INT (*lang_get_alias_set) PARAMS ((tree));
-
 static int rtx_equal_for_memref_p      PARAMS ((rtx, rtx));
 static rtx find_symbolic_term          PARAMS ((rtx));
 static rtx get_addr                    PARAMS ((rtx));
@@ -369,8 +365,7 @@ get_alias_set (t)
       /* Now give the language a chance to do something but record what we
         gave it this time.  */
       orig_t = t;
-      if (lang_get_alias_set != 0
-         && (set = (*lang_get_alias_set) (t)) != -1)
+      if ((set = lang_get_alias_set (t)) != -1)
        return set;
 
       /* If this is a reference, go inside it and use the underlying
@@ -395,8 +390,8 @@ get_alias_set (t)
        }
 
       /* Give the language another chance to do something special.  */
-      if (orig_t != t && lang_get_alias_set != 0
-         && (set = (*lang_get_alias_set) (t)) != -1)
+      if (orig_t != t
+         && (set = lang_get_alias_set (t)) != -1)
        return set;
 
       /* Now all we care about is the type.  */
@@ -410,8 +405,7 @@ get_alias_set (t)
     return TYPE_ALIAS_SET (t);
 
   /* See if the language has special handling for this type.  */
-  if (lang_get_alias_set != 0
-      && (set = (*lang_get_alias_set) (t)) != -1)
+  if ((set = lang_get_alias_set (t)) != -1)
     ;
   /* There are no objects of FUNCTION_TYPE, so there's no point in
      using up an alias set for them.  (There are, of course, pointers
index 979c380..d9c50bd 100644 (file)
@@ -3265,7 +3265,7 @@ c_apply_type_quals_to_decl (type_quals, decl)
    or a type.  Return -1 if we don't do anything special.  */
 
 HOST_WIDE_INT
-c_get_alias_set (t)
+lang_get_alias_set (t)
      tree t;
 {
   tree u;
index 30f58f8..d042724 100644 (file)
@@ -97,7 +97,6 @@ extern void decl_attributes                   PARAMS ((tree, tree, tree));
 extern void init_function_format_info          PARAMS ((void));
 extern void check_function_format              PARAMS ((tree, tree, tree));
 extern void c_apply_type_quals_to_decl         PARAMS ((int, tree));
-extern HOST_WIDE_INT c_get_alias_set           PARAMS ((tree));
 /* Print an error message for invalid operands to arith operation CODE.
    NOP_EXPR is used as a special case (see truthvalue_conversion).  */
 extern void binary_op_error                    PARAMS ((enum tree_code));
index 08bc979..31494e6 100644 (file)
@@ -2896,8 +2896,6 @@ init_decl_processing ()
   tree array_domain_type;
   tree t;
 
-  lang_get_alias_set = c_get_alias_set;
-
   current_function_decl = NULL;
   named_labels = NULL;
   current_binding_level = NULL_BINDING_LEVEL;
index 30c39a2..3b346e1 100644 (file)
@@ -1,3 +1,7 @@
+2000-06-02  Richard Henderson  <rth@cygnus.com>
+
+       * lang.c (lang_get_alias_set): New.
+
 Sat May 27 11:24:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * lang.c (deep_const_expr): Use first_rtl_op.
index 985eea7..7b62c16 100644 (file)
@@ -283,6 +283,19 @@ incomplete_type_error (value, type)
   error ("internal error - use of undefined type");
 }
 
+/* Return the typed-based alias set for T, which may be an expression
+   or a type.  Return -1 if we don't do anything special.  */
+
+HOST_WIDE_INT
+lang_get_alias_set (t)
+     tree t;
+{
+  /* ??? Need to figure out what the rules are.  Certainly we'd need
+     to handle union-like things, and probably variant records. 
+     Until then, turn off type-based aliasing completely.  */
+  return 0;
+}
+
 void
 lang_init ()
 {
index ebc064d..9a5c6c7 100644 (file)
@@ -1,3 +1,7 @@
+2000-06-02  Richard Henderson  <rth@cygnus.com>
+
+       * decl.c (init_decl_processing): Don't set lang_get_alias_set.
+
 2000-06-02  Jason Merrill  <jason@casey.soma.redhat.com>
 
        * decl.c (store_return_init): Call put_var_into_stack.
index 1cd6f43..d5097f2 100644 (file)
@@ -6252,8 +6252,6 @@ init_decl_processing ()
   int wchar_type_size;
   tree array_domain_type;
 
-  lang_get_alias_set = c_get_alias_set;
-
   /* Check to see that the user did not specify an invalid combination
      of command-line options.  */
   if (flag_new_abi && !flag_vtable_thunks)
index ca82ab1..852b6c0 100644 (file)
@@ -922,7 +922,7 @@ extern void record_alias_subset         PARAMS ((HOST_WIDE_INT,
                                                 HOST_WIDE_INT));
 #ifdef TREE_CODE
 extern HOST_WIDE_INT get_alias_set             PARAMS ((tree));
-extern HOST_WIDE_INT (*lang_get_alias_set)     PARAMS ((tree));
+extern HOST_WIDE_INT lang_get_alias_set                PARAMS ((tree));
 #endif
 extern HOST_WIDE_INT new_alias_set             PARAMS ((void));
 \f
index fb83e73..a37deec 100644 (file)
@@ -1,3 +1,7 @@
+2000-06-02  Richard Henderson  <rth@cygnus.com>
+
+       * com.c (lang_get_alias_set): New.
+
 2000-05-28  Toon Moene  <toon@moene.indiv.nluug.nl>
 
        * bugs.texi: Note that debugging information for
index c533330..5f08ef0 100644 (file)
@@ -14870,6 +14870,21 @@ lang_identify ()
   return "f77";
 }
 
+/* Return the typed-based alias set for T, which may be an expression
+   or a type.  Return -1 if we don't do anything special.  */
+
+HOST_WIDE_INT
+lang_get_alias_set (t)
+     tree t;
+{
+  /* We do not wish to use alias-set based aliasing at all.  Used in the
+     extreme (every object with its own set, with equivalences recorded)
+     it might be helpful, but there are problems when it comes to inlining.
+     We get on ok with flag_argument_noalias, and alias-set aliasing does
+     currently limit how stack slots can be reused, which is a lose.  */
+  return 0;
+}
+
 void
 lang_init_options ()
 {
index de192e2..aefe16d 100644 (file)
@@ -1,3 +1,7 @@
+2000-06-02  Richard Henderson  <rth@cygnus.com>
+
+       * lang.c (lang_get_alias_set): New.
+
 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
 
        * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
index 2a1d142..765a3be 100644 (file)
@@ -646,3 +646,13 @@ lang_print_xnode (file, node, indent)
      int indent __attribute ((__unused__));
 {
 }
+
+/* Return the typed-based alias set for T, which may be an expression
+   or a type.  Return -1 if we don't do anything special.  */
+
+HOST_WIDE_INT
+lang_get_alias_set (t)
+     tree t;
+{
+  return -1;
+}