Bring over changes from latest gcc-2.8 pre-release.

Mirror sched.c change into haifa-sched.c

From-SVN: r17097
This commit is contained in:
Jeff Law 1997-12-15 00:05:04 -07:00
parent 7b8dd49741
commit 6d8ccdbbb2
18 changed files with 118 additions and 46 deletions

View 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.

View 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.

View 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

View 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

View 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@

View 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");
}

View 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

View 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 (); \

View 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) ();

View 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).

View 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)
{

View 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;

View 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

View 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)

View 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 */

View 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

View 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;

View 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