Bring over changes from latest gcc-2.8 pre-release.
authorJeff Law <law@gcc.gnu.org>
Mon, 15 Dec 1997 07:05:04 +0000 (00:05 -0700)
committerJeff Law <law@gcc.gnu.org>
Mon, 15 Dec 1997 07:05:04 +0000 (00:05 -0700)
Mirror sched.c change into haifa-sched.c

From-SVN: r17097

18 files changed:
gcc/ChangeLog
gcc/ChangeLog.11
gcc/INSTALL
gcc/SERVICE
gcc/acconfig.h
gcc/collect2.c
gcc/config.in
gcc/config/i386/i386.h
gcc/crtstuff.c
gcc/except.c
gcc/expr.c
gcc/frame.c
gcc/frame.h
gcc/function.c
gcc/haifa-sched.c
gcc/install.texi
gcc/pexecute.c
gcc/sched.c

index f5ef4cc331bc3ec67cfa8af4fc20e573e8d3175a..76a30f9a014a36d6d72a440e59f213beaaa48814 100644 (file)
@@ -1,3 +1,10 @@
+Mon Dec 15 00:04:48 1997  Jeffrey A Law  (law@cygnus.com)
+
+        * haifa-sched.c (remove_dependencies): Set RTX_INTEGRATED_P on
+       dependency we delete.  Properly update prev for multiple consecutive
+       deletions.
+        (priority): Skip deleted dependence.
+
 Fri Dec 12 18:54:23 1997  Per Bothner  <bothner@cygnus.com>
 
        * expr.c (expand_builtin):  Support BUILT_IN_FMOD - just call fmod.
index 8620152be4d3264b054e930606373c18d5d9ff3e..748764fa33a254f50169354cf7d7b18027924b34 100644 (file)
@@ -1,8 +1,52 @@
-Fri Dec 12 08:01:44 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+Sun Dec 14 06:49:05 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * Version 2.8.0 released.
+
+       * expr.c (expand_expr, case PLACEHOLDER_EXPR): Use placeholder_list 
+       expression in preference to any other if correct type.
+
+       * i386.h (INITIAL_ELIMINATION_OFFSET): Correctly test for PIC
+       register used.
+
+Sat Dec 13 06:11:32 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * frame.h (__register_frame_info_table): Fix typo in declaration.
+
+Fri Dec 12 07:55:18 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * function.c (purge_addressof_1): For (mem (address (mem ...)),
+       when collapsing, preserve mode of outer MEM.
+
+       * frame.c (__register_frame_info): Renamed from __register_frame.
+       (__register_frame_info_table, __deregister_frame_info): Similarly.
+       * frame.h (__{,de}register_frame_info): Likewise.
+       (__register_frame_info_table): New declaration.
+       * crtstuff.c (__do_global_dtors{,_aux}): Rename __deregister_frame.
+       (frame_dummy, __do_global_ctors): Likewise for __register_frame.
+       * collect2.c (write_c_file_{stat,glob}): Rename __register_frame
+       to __register_frame_info and similarly for __deregister_frame and
+       __register_frame_table.
+
+       * sched.c (remove_dependencies): Set RTX_INTEGRATED_P on dependency
+       we delete.  Properly update prev for multiple consecutive deletions.
+       (priority): Skip deleted dependence.
 
        * integrate.c (initialize_for_inline): In DECL_RTL of a PARM_DECL,
        look inside a (mem (addressof (mem ...))).
 
+Fri Dec 12 05:49:58 1997  Paul Eggert  <eggert@twinsun.com>
+
+       * collect2.c (write_c_file_glob):
+       Allocate initial frame object in static storage and pass its address.
+
+Thu Dec 11 18:01:31 1997  Philippe De Muyter  <phdm@macqel.be>
+
+       * acconfig.h (NEED_DECLARATION_GETENV): Define slot added.
+
+Thu Dec 11 17:54:23 1997  Paul Eggert  <eggert@twinsun.com>
+
+       * crtstuff.c (__do_global_ctors): Fix typo in last change.
+
 Wed Dec 10 18:38:28 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
  
         * libgcc2.c (__bb_exit_func): Fix test of return value of fopen.
index 595bc1df33b39364c3ed6d26aca3bfc2298905eb..60fabf131b791bd5f1163024dcf789c82562e0a9 100644 (file)
@@ -164,7 +164,7 @@ and includes all the necessary compilation tools and libraries.
           `--nfp' currently has no effect, though perhaps there are
           other systems where it could usefully make a difference.
 
-    `--enable-objcthreads=TYPE'
+    `--enable-threads=TYPE'
           Certain systems, notably Linux-based GNU systems, can't be
           relied on to supply a threads facility for the Objective C
           runtime and so will default to single-threaded runtime.  They
index c146eb2226a93b273efee0f050e42e2e21b296ae..46441675fd07283f7388e74bbc347cd7847281d6 100644 (file)
@@ -693,8 +693,7 @@ My rate varies greatly between $25-$40/hour, depending on the circumstances.
 Rates for non-profit organizations are substantially lower, and possibly free.
 
 Please note that I have no interest in working with any Micro$oft related
-products.  I will accept work that involves other non-free, non-Micro$oft
-software, but I would want the primary focus of the work to be contributing
+products!  I want the primary focus of my work to be contributing
 to the free software community.
 
 Updated: 1997-12-04
index 2b6c1442c971c408620a1a246d19759e503ca287..41c0cf8b1d61bc6a2f50ad5c07b1adcd849b74a2 100644 (file)
@@ -18,4 +18,7 @@
 
 /* Whether rindex must be declared even if <stdlib.h> is included.  */
 #undef NEED_DECLARATION_RINDEX
+
+/* Whether getenv must be declared even if <stdlib.h> is included.  */
+#undef NEED_DECLARATION_GETENV
 @TOP@
index a79f7a849f9ad95efab848f49a0d62fab55c2c1b..88547cb4f61bf4902d2ae26ef17c534f90aaed16 100644 (file)
@@ -1790,16 +1790,16 @@ write_c_file_stat (stream, name)
       fprintf (stream, "  struct object *next;\n");
       fprintf (stream, "};\n");
 
-      fprintf (stream, "extern void __register_frame_table (void *, struct object *);\n");
-      fprintf (stream, "extern void __deregister_frame (void *);\n");
+      fprintf (stream, "extern void __register_frame_info_table (void *, struct object *);\n");
+      fprintf (stream, "extern void __deregister_frame_info (void *);\n");
 
       fprintf (stream, "static void reg_frame () {\n");
       fprintf (stream, "\tstatic struct object ob;\n");
-      fprintf (stream, "\t__register_frame_table (frame_table, &ob);\n");
+      fprintf (stream, "\t__register_frame_info_table (frame_table, &ob);\n");
       fprintf (stream, "\t}\n");
 
       fprintf (stream, "static void dereg_frame () {\n");
-      fprintf (stream, "\t__deregister_frame (frame_table);\n");
+      fprintf (stream, "\t__deregister_frame_info (frame_table);\n");
       fprintf (stream, "\t}\n");
     }
 
@@ -1876,16 +1876,16 @@ write_c_file_glob (stream, name)
       fprintf (stream, "  struct object *next;\n");
       fprintf (stream, "};\n");
 
-      fprintf (stream, "extern void __register_frame_table (void *, struct object *);\n");
-      fprintf (stream, "extern void __deregister_frame (void *);\n");
+      fprintf (stream, "extern void __register_frame_info_table (void *, struct object *);\n");
+      fprintf (stream, "extern void __deregister_frame_info (void *);\n");
 
       fprintf (stream, "static void reg_frame () {\n");
       fprintf (stream, "\tstatic struct object ob;\n");
-      fprintf (stream, "\t__register_frame_table (frame_table, &ob);\n");
+      fprintf (stream, "\t__register_frame_info_table (frame_table, &ob);\n");
       fprintf (stream, "\t}\n");
 
       fprintf (stream, "static void dereg_frame () {\n");
-      fprintf (stream, "\t__deregister_frame (frame_table);\n");
+      fprintf (stream, "\t__deregister_frame_info (frame_table);\n");
       fprintf (stream, "\t}\n");
     }
 
index e535674f3d7b95c5c6eb0eef9c63b31ca7a1664c..92d4ca095fe7fec81ae68168ab5986f1f54b4291 100644 (file)
@@ -20,6 +20,9 @@
 /* Whether rindex must be declared even if <stdlib.h> is included.  */
 #undef NEED_DECLARATION_RINDEX
 
+/* Whether getenv must be declared even if <stdlib.h> is included.  */
+#undef NEED_DECLARATION_GETENV
+
 /* Define if you have the ANSI C header files.  */
 #undef STDC_HEADERS
 
index 9bfef4e98b2c4115d001b18b5e5c76f5a0e5aeca..6fb08a120d2d0056887e1332475b6dcc9b3da591 100644 (file)
@@ -1524,8 +1524,9 @@ do {                                              \
                                                                        \
       for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)          \
        if ((regs_ever_live[regno] && ! call_used_regs[regno])          \
-           || (current_function_uses_pic_offset_table                  \
-               && regno == PIC_OFFSET_TABLE_REGNUM))                   \
+           || ((current_function_uses_pic_offset_table                 \
+                || current_function_uses_const_pool)                   \
+               && flag_pic && regno == PIC_OFFSET_TABLE_REGNUM))       \
          offset += 4;                                                  \
                                                                        \
       (OFFSET) = offset + get_frame_size ();                           \
index 50964a8005055c23ecab62f72e0a5d416ace76ec..3f3643f6b8de7897c3d3fca94d117d5ab1b652fc 100644 (file)
@@ -142,7 +142,7 @@ __do_global_dtors_aux ()
     }
 
 #ifdef EH_FRAME_SECTION_ASM_OP
-  __deregister_frame (__EH_FRAME_BEGIN__);
+  __deregister_frame_info (__EH_FRAME_BEGIN__);
 #endif
   completed = 1;
 }
@@ -162,15 +162,15 @@ fini_dummy ()
 }
 
 #ifdef EH_FRAME_SECTION_ASM_OP
-/* Stick a call to __register_frame into the .init section.  For some reason
-   calls with no arguments work more reliably in .init, so stick the call
-   in another function.  */
+/* Stick a call to __register_frame_info into the .init section.  For some
+   reason calls with no arguments work more reliably in .init, so stick the
+   call in another function.  */
 
 static void
 frame_dummy ()
 {
   static struct object object;
-  __register_frame (__EH_FRAME_BEGIN__, &object);
+  __register_frame_info (__EH_FRAME_BEGIN__, &object);
 }
 
 static void
@@ -254,7 +254,7 @@ __do_global_dtors ()
     (*p) ();
 
 #ifdef EH_FRAME_SECTION_ASM_OP
-  __deregister_frame (__EH_FRAME_BEGIN__);
+  __deregister_frame_info (__EH_FRAME_BEGIN__);
 #endif
 }
 #endif
@@ -395,7 +395,7 @@ __do_global_ctors ()
   func_ptr *p;
 #ifdef EH_FRAME_SECTION_ASM_OP
   static struct object object;
-  __register_frame (__EH_FRAME_BEGIN__, &object);
+  __register_frame_info (__EH_FRAME_BEGIN__, &object);
 #endif
   for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
     (*p) ();
index c0db69f87eb3f538a91d81b0818a41edf18d8874..e2a591447c0b16a6b57d5149c391874a6ad079ab 100644 (file)
@@ -97,9 +97,9 @@ Boston, MA 02111-1307, USA.  */
    On targets that support crtstuff.c, the unwind information
    is stored in a section named .eh_frame and the information for the
    entire shared object or program is registered with a call to
-   __register_frame.  On other targets, the information for each
+   __register_frame_info.  On other targets, the information for each
    translation unit is registered from the file generated by collect2.
-   __register_frame is defined in frame.c, and is responsible for
+   __register_frame_info is defined in frame.c, and is responsible for
    recording all of the unwind regions into one list (which is kept in a
    static variable named unwind_table_list).
 
index 8f46449caf41074cdccb3a9c852d6e947d1a4416..339f3e2b420c37070f8c86607c1ff912b7488294 100644 (file)
@@ -5293,7 +5293,7 @@ expand_expr (exp, target, tmode, modifier)
        tree placeholder_expr;
 
        /* If there is an object on the head of the placeholder list,
-          see if some object in it's references is of type TYPE.  For
+          see if some object in its references is of type TYPE.  For
           further information, see tree.def.  */
        for (placeholder_expr = placeholder_list;
             placeholder_expr != 0;
@@ -5310,9 +5310,9 @@ expand_expr (exp, target, tmode, modifier)
                 == need_type))
              object = TREE_PURPOSE (placeholder_expr);
 
-           /* Find the innermost reference that is of the type we want.  */
+           /* Find the outermost reference that is of the type we want.  */
            for (elt = TREE_PURPOSE (placeholder_expr);
-                elt != 0
+                elt != 0 && object == 0
                 && (TREE_CODE_CLASS (TREE_CODE (elt)) == 'r'
                     || TREE_CODE_CLASS (TREE_CODE (elt)) == '1'
                     || TREE_CODE_CLASS (TREE_CODE (elt)) == '2'
@@ -5323,10 +5323,7 @@ expand_expr (exp, target, tmode, modifier)
              if (TREE_CODE_CLASS (TREE_CODE (elt)) == 'r'
                  && (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (elt, 0)))
                      == need_type))
-               {
-                 object = TREE_OPERAND (elt, 0);
-                 break;
-               }
+               object = TREE_OPERAND (elt, 0);
 
            if (object != 0)
              {
index 296e6a9456d190528425543a7e520a1bddeb4284..ca107b081d3b774f7e7102f54587fcc2143d3a7b 100644 (file)
@@ -512,7 +512,7 @@ execute_cfa_insn (void *p, struct frame_state_internal *state,
 /* Called from crtbegin.o to register the unwind info for an object.  */
 
 void
-__register_frame (void *begin, struct object *ob)
+__register_frame_info (void *begin, struct object *ob)
 {
   ob->fde_begin = begin;
 
@@ -533,7 +533,7 @@ __register_frame (void *begin, struct object *ob)
    collect2.  */
 
 void
-__register_frame_table (void *begin, struct object *ob)
+__register_frame_info_table (void *begin, struct object *ob)
 {
   ob->fde_begin = begin;
   ob->fde_array = begin;
@@ -552,7 +552,7 @@ __register_frame_table (void *begin, struct object *ob)
 /* Called from crtend.o to deregister the unwind info for an object.  */
 
 void
-__deregister_frame (void *begin)
+__deregister_frame_info (void *begin)
 {
   struct object **p;
 
index c1cc7028c2dda770726df556a5b6eeb6731dcf2c..7fa40d7af480ae5f5f9744e61f3051ed7c5e01b1 100644 (file)
@@ -37,11 +37,16 @@ struct object {
 /* Called either from crtbegin.o or a static constructor to register the
    unwind info for an object or translation unit, respectively.  */
 
-extern void __register_frame (void *, struct object *);
+extern void __register_frame_info (void *, struct object *);
+
+/* Similar, but BEGIN is actually a pointer to a table of unwind entries
+   for different translation units.  Called from the file generated by
+   collect2.  */
+extern void __register_frame_info_table (void *, struct object *);
 
 /* Called from crtend.o to deregister the unwind info for an object.  */
 
-extern void __deregister_frame (void *);
+extern void __deregister_frame_info (void *);
 
 /* Called from __throw to find the registers to restore for a given
    PC_TARGET.  The caller should allocate a local variable of `struct
index d13724fea3465eaa702675944089a6699e6e174b..2759b80fde082c397ffed052bb323ed09120b83b 100644 (file)
@@ -2739,8 +2739,8 @@ purge_addressof_1 (loc, insn, force)
   else if (code == MEM && GET_CODE (XEXP (x, 0)) == ADDRESSOF && ! force)
     {
       rtx sub = XEXP (XEXP (x, 0), 0);
-      if (GET_CODE (sub) != REG)
-       sub = copy_rtx (sub);
+      if (GET_CODE (sub) == MEM)
+       sub = gen_rtx (MEM, GET_MODE (x), copy_rtx (XEXP (sub, 0)));
       if (GET_CODE (sub) == REG && GET_MODE (x) != GET_MODE (sub))
        {
          if (! BYTES_BIG_ENDIAN && ! WORDS_BIG_ENDIAN)
index ab8fbc2d7696b6fe97fbde442e0aae0b58b11b52..b2545a2ace7475675fb0c85657f3e3e269c89815 100644 (file)
@@ -884,17 +884,19 @@ remove_dependence (insn, elem)
   rtx prev, link;
   int found = 0;
 
-  for (prev = 0, link = LOG_LINKS (insn); link;
-       prev = link, link = XEXP (link, 1))
+  for (prev = 0, link = LOG_LINKS (insn); link; link = XEXP (link, 1))
     {
       if (XEXP (link, 0) == elem)
        {
+         RTX_INTEGRATED_P (link) = 1;
          if (prev)
            XEXP (prev, 1) = XEXP (link, 1);
          else
            LOG_LINKS (insn) = XEXP (link, 1);
          found = 1;
        }
+      else
+       prev = link;
     }
 
   if (!found)
@@ -3210,6 +3212,9 @@ priority (insn)
            rtx next;
            int next_priority;
 
+           if (RTX_INTEGRATED_P (link))
+             continue;
+
            next = XEXP (link, 0);
 
            /* critical path is meaningful in block boundaries only */
index bb60f0aa70fa9b0f16a9b0ae2bf8c8c23cc2fba7..b879850d4036be3d8203edf530f2047042a70783 100644 (file)
@@ -191,7 +191,7 @@ will print out whether the Haifa scheduler is enabled when it is run.
 
 @cindex Objective C threads
 @cindex threads, Objective C
-@item --enable-objcthreads=@var{type}
+@item --enable-threads=@var{type}
 Certain systems, notably Linux-based GNU systems, can't be relied on to
 supply a threads facility for the Objective C runtime and so will
 default to single-threaded runtime.  They may, however, have a library
index 9f80cb05b39a498b9f32e5734c42b2ddae310fa5..7f1ac4021eb8f7b7f4a00c65eff3f86b226a458e 100644 (file)
@@ -236,7 +236,7 @@ extern int _spawnvp ();
 /* This is a kludge to get around the Microsoft C spawn functions' propensity
    to remove the outermost set of double quotes from all arguments.  */
 
-const char * const *
+char * const *
 fix_argv (argvec)
      char **argvec;
 {
@@ -267,7 +267,7 @@ fix_argv (argvec)
         argvec[i] = temp;
       }
 
-  return (const char * const *) argvec;
+  return (char * const *) argvec;
 }
 
 #endif /* ! defined (__CYGWIN32__) */
@@ -278,7 +278,8 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
      char * const *argv;
      const char *this_pname;
      const char *temp_base;
-     char **errmsg_fmt, **errmsg_arg;
+     char **errmsg_fmt;
+     const char **errmsg_arg;
      int flags;
 {
   int pid;
@@ -286,7 +287,7 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
   if ((flags & PEXECUTE_ONE) != PEXECUTE_ONE)
     abort ();
   pid = (flags & PEXECUTE_SEARCH ? _spawnvp : _spawnv)
-    (_P_NOWAIT, program, fix_argv(argv));
+    (_P_NOWAIT, program, fix_argv (argv));
   if (pid == -1)
     {
       *errmsg_fmt = install_error_msg;
index a06044e2d295ecbdfa9cdc01103a61c617835548..b7aa75de1eb1c9912ff965958630646abcf5b0b5 100644 (file)
@@ -431,17 +431,19 @@ remove_dependence (insn, elem)
   rtx prev, link;
   int found = 0;
 
-  for (prev = 0, link = LOG_LINKS (insn); link;
-       prev = link, link = XEXP (link, 1))
+  for (prev = 0, link = LOG_LINKS (insn); link; link = XEXP (link, 1))
     {
       if (XEXP (link, 0) == elem)
        {
+         RTX_INTEGRATED_P (link) = 1;
          if (prev)
            XEXP (prev, 1) = XEXP (link, 1);
          else
            LOG_LINKS (insn) = XEXP (link, 1);
          found = 1;
        }
+      else
+       prev = link;
     }
 
   if (! found)
@@ -919,6 +921,11 @@ priority (insn)
        {
          rtx x = XEXP (prev, 0);
 
+         /* If this was a duplicate of a dependence we already deleted,
+            ignore it.  */
+         if (RTX_INTEGRATED_P (prev))
+           continue;
+
          /* A dependence pointing to a note or deleted insn is always
             obsolete, because sched_analyze_insn will have created any
             necessary new dependences which replace it.  Notes and deleted