Jim Wilson [Tue, 2 Feb 1999 22:39:13 +0000 (22:39 +0000)]
Patch to fix canadian cross build problem with libcpp.a.
* Makefile.in: Change all uses of AR to AR_FOR_TARGET. Change all uses
of HOST_AR to AR. Likewise for AR_FLAGS, RANLIB, and RANLIB_TEST.
(RANLIB_TEST): Test to see if ranlib exists. Only test absolute file
names if host == target.
(HOST_AR, HOST_AR_FLAGS, HOST_RANLIB, HOST_RANLIB_TEST): Delete.
(AR_FLAGS_FOR_TARGET): Renamed from AR_FOR_TARGET_FLAGS.
(AR, AR_FLAGS, OLDAR, OLDAR_FLAGS, RANLIB, RANLIB_TEST): Delete rules
setting them to *_FOR_TARGET.
* cross-make (AR, AR_FLAGS, OLDAR, OLDAR_FLAGS, RANLIB, RANLIB_TEST):
Delete.
Bob Manson [Tue, 2 Feb 1999 21:22:52 +0000 (21:22 +0000)]
Bob Manson <manson@charmed.cygnus.com>
Bob Manson <manson@charmed.cygnus.com>
* resource.c, resource.h: New files.
* haifa-sched.c (regno_use_in): Moved to rtlanal.c.
(split_block_insns): Moved to recog.c.
(update_flow_info): Make public.
* reorg.c: Moved the functions dealing with computing resource
usage to resource.c.
* sched.c (regno_use_in): Moved to rtlanal.c.
(update_flow_info): Make public.
(schedule_insns): Use split_block_insns.
* recog.c (split_block_insns): New function.
Jeffrey A Law [Tue, 2 Feb 1999 19:06:58 +0000 (19:06 +0000)]
i386.md (ashlsi3): Turn into a define_expand an anonymous pattern.
* i386.md (ashlsi3): Turn into a define_expand an anonymous pattern.
Make the anonymous pattern match when ! optimize_size.
(ashlsi3 size optimizer): New pattern.
Per Bothner [Tue, 2 Feb 1999 12:20:39 +0000 (04:20 -0800)]
Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
* jcf-write.c (generate_bytecode_return): New function.
(generate_bytecode_insns): Use it, for RETURN_EXPR.
* jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
generate special [fd]const_[01] instructions.
* jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
* verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
handling OPCODE_lookupswitch or OPCODE_tableswitch.
Per Bothner [Tue, 2 Feb 1999 12:20:36 +0000 (04:20 -0800)]
Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
a
Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
* jcf-write.c (generate_bytecode_return): New function.
(generate_bytecode_insns): Use it, for RETURN_EXPR.
* jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
generate special [fd]const_[01] instructions.
* jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
* verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
handling OPCODE_lookupswitch or OPCODE_tableswitch.
Per Bothner [Tue, 2 Feb 1999 12:20:34 +0000 (04:20 -0800)]
Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
* jcf-write.c (generate_bytecode_return): New function.
(generate_bytecode_insns): Use it, for RETURN_EXPR.
* jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
generate special [fd]const_[01] instructions.
* jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
* verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
handling OPCODE_lookupswitch or OPCODE_tableswitch.
�
* parse.y (patch_method_invocation): Handle calling static methods,
even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
* parse.y (java_complete_lhs): Don't complain about unreachable
exit condition in a do-while statement.
d
* parse.y (patch_method_invocation): Handle calling static methods,
even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
* parse.y (java_complete_lhs): Don't complain about unreachable
exit condition in a do-while statement.
J"orn Rennecke [Tue, 2 Feb 1999 11:52:00 +0000 (11:52 +0000)]
(recombine_givs): Don't use a giv that's likely to be dead to derive others.
* (recombine_givs): Don't use a giv that's likely to be dead to
derive others.
* loop.c (recombine_givs): Fix test for lifetime overlaps / loop
wrap around when deriving givs.
Per Bothner [Tue, 2 Feb 1999 10:16:58 +0000 (02:16 -0800)]
jcf-write.c (localvar_alloc): Only emit entry for LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
�
* jcf-write.c (localvar_alloc): Only emit entry for
LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
(generate_bytecode_insns): Only call put_linenumber if
debug_info_level > DINFO_LEVEL_NONE.
* jvspec.c (lang_specific_driver): If no -O* or -g* option
is specified, add -g1 (for compatibility wih javac).
Per Bothner [Tue, 2 Feb 1999 10:16:57 +0000 (02:16 -0800)]
jcf-write.c (localvar_alloc): Only emit entry for LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
0
* jcf-write.c (localvar_alloc): Only emit entry for
LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
(generate_bytecode_insns): Only call put_linenumber if
debug_info_level > DINFO_LEVEL_NONE.
* jvspec.c (lang_specific_driver): If no -O* or -g* option
is specified, add -g1 (for compatibility wih javac).
Per Bothner [Tue, 2 Feb 1999 10:16:56 +0000 (02:16 -0800)]
jcf-write.c (localvar_alloc): Only emit entry for LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
* jcf-write.c (localvar_alloc): Only emit entry for
LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
(generate_bytecode_insns): Only call put_linenumber if
debug_info_level > DINFO_LEVEL_NONE.
* jvspec.c (lang_specific_driver): If no -O* or -g* option
is specified, add -g1 (for compatibility wih javac).
recog.c (check_asm_operands): Treat indeterminate operand ok results as success.
* recog.c (check_asm_operands): Treat indeterminate operand ok
results as success. Try harder to resolve a matching constraint.
* stmt.c (expand_asm_operands): Recognize when an output operand's
constraint does not allow memory. Treat indeterminate operand ok
results as failure. Try harder to resolve a matching constraint.
Ken Raeburn [Mon, 1 Feb 1999 12:50:53 +0000 (12:50 +0000)]
Use varrays for constant-equivalence data:
* varray.h (struct const_equiv_data): New type.
(union varray_data_tag): New element const_equiv.
(VARRAY_CONST_EQUIV_INIT, VARRAY_CONST_EQUIV): New macros.
(VARRAY_SIZE): New macro, returns number of elements.
* integrate.h: Include varray.h.
(struct inline_remap): Replace const_equiv_map, const_age_map and
const_equiv_map_size with a const_equiv_varray element.
(MAYBE_EXTEND_CONST_EQUIV_VARRAY): New macro; grows varray if needed.
(SET_CONST_EQUIV_DATA): New macro; sets rtx and age fields simultaneously,
growing the varray if needed.
* integrate.c (global_const_equiv_map, global_const_equiv_map_size): Deleted,
replaced by....
(global_const_equiv_varray): New variable.
(expand_inline_function): References changed.
* integrate.h: Update declarations.
* integrate.c (process_reg_parm, expand_inline_function,
copy_rtx_and_substitute, try_constants, subst_constants, mark_stores): Use
varray allocation and accessor macros, new integrate.h macros, and
global_const_equiv_varray. Don't conditionalize non-NULL stores on array size;
instead, expand the array as needed.
* unroll.c (unroll_loop): Likewise.
* unroll.c (unroll_loop): Initialize const_equiv_varray element to zero. After
allocating varray, always exit through bottom of function, where it can be
deallocated if needed. Don't explicitly reallocate const_equiv_map storage;
instead, just ensure the varray has been initialized, and update the global
reference.
Kaveh R. Ghazi [Mon, 1 Feb 1999 07:00:40 +0000 (07:00 +0000)]
Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
* Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
* gjavah.c: Include config.h and system.h.
* javaop.h (inline): Don't define, its handled by system.h.
(WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
from `inline' to `static inline'.
* jcf.h (inline): Don't define, its handled by system.h.
* lex.c (inline): Likewise.
Michael Hayes [Sun, 31 Jan 1999 13:51:08 +0000 (13:51 +0000)]
configure.in: Don't remove loop.o and unroll.o when enable-haifa is selected.
Mon Feb 1 10:52:07 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* configure.in: Don't remove loop.o and unroll.o when
enable-haifa is selected.
* configure: Rebuilt.
* toplev.c (notice, fnotice): Check ANSI_PROTOTYPES, not __STDC__,
when declaring arguments and calling va_arg() to initialize them.
* collect2.c (notice): Likewise.
* loop.c (find_life_end): Use PROTO() macro in the prototype.
Kaveh R. Ghazi [Fri, 29 Jan 1999 04:18:00 +0000 (04:18 +0000)]
cccp.c (eprint_string): Constify a char*.
* cccp.c (eprint_string): Constify a char*.
(notice): Likewise. Use PVPROTO not VPROTO, add ATTRIBUTE_PRINTF_1.
(vnotice): Constify a char*.
(error): Likewise. Use PVPROTO not VPROTO, add ATTRIBUTE_PRINTF_1.
(verror): Constify a char*.
(warning): Likewise. Use PVPROTO not VPROTO, add ATTRIBUTE_PRINTF_1.
(vwarning): Constify a char*.
(error_with_line): Likewise. Use PVPROTO not VPROTO, add
ATTRIBUTE_PRINTF_2.
(verror_with_line): Constify a char*.
(vwarning_with_line): Likewise.
(warning_with_line): Likewise. Use PVPROTO not VPROTO, add
ATTRIBUTE_PRINTF_2.
(pedwarn): Constify a char*. Use PVPROTO not VPROTO, add
ATTRIBUTE_PRINTF_1.
(pedwarn_with_line): Likewise with ATTRIBUTE_PRINTF_2.
(pedwarn_with_file_and_line): Likewise with ATTRIBUTE_PRINTF_4.
Also correct typo in parameter name declaration.
(make_assertion): Constify a char*.
(quote_string_for_make): Likewise.
(deps_output): Likewise.
(fatal): Likewise. Use PVPROTO not VPROTO, add
ATTRIBUTE_PRINTF_1. Use ATTRIBUTE_NORETURN not an explicit
"__attribute__ ((noreturn))".
(fancy_abort): Likewise for ATTRIBUTE_NORETURN.
(pfatal_with_name): Likewise.
(pipe_closed): Likewise.
(memory_full): Likewise.
J"orn Rennecke [Thu, 28 Jan 1999 15:28:14 +0000 (15:28 +0000)]
loop.c (recombine_givs): New parameter unroll_p.
* loop.c (recombine_givs): New parameter unroll_p. If set, don't
generate complex adds. Changed caller.
Don't generate adds that cost more than the original one.
(strength_reduce): Warning fixes.
J"orn Rennecke [Wed, 27 Jan 1999 15:45:50 +0000 (15:45 +0000)]
rtl.h (insn_first_p): Declare.
* rtl.h (insn_first_p): Declare.
* rtlanal.c (insn_first_p): New function.
* loop.h (varray.h): Include.
(struct induction): Change combined_with to unsigned.
New members derived, ix and last_use.
(reg_iv_type, reg_iv_info): Now varray_type. All references changed.
(REG_IV_TYPE, REG_IV_INFO): Define.
(first_increment_giv, last_increment_giv): Declare.
* loop.c (loop_number_loop_cont): New static variable.
(loop_number_cont_dominator): Likewise.
(reg_iv_type, reg_iv_info): Now varray_type.
(first_increment_giv, last_increment_giv): New variables.
(compute_luids, verify_dominator, find_life_end): New functions.
(cmp_recombine_givs_stats, recombine_givs): Likewise.
(loop_optimize): Allocate loop_number_loop_cont and
loop_number_cont_dominator. Use compute_luids.
(find_and_verify_loops): Initialize loop_number_loop_cont and
loop_number_cont_dominator.
(strength_reduce): Try to find bivs that can be expressed as givs
of another biv, and to convert biv increments into givs.
Call recombine_givs. Handle derived givs.
(record_biv): New argument location. All callers changed.
(record_giv): Initialize derived and last_use fields.
(basic_induction_var): New argument location. All callers changed.
(combine_givs): Don't combine a DEST_REG giv with a DEST_ADDR giv.
Increment combined_with instead of setting to 1.
* unroll.c (derived_regs): New static variable.
(unroll_loop): Initialize it.
Allocate local_regno according to max_reg_num.
(copy_loop_body): Cope with derived givs.
(find_splittable_givs): Check for Givs made from biv increments.
Set derived_regs for givs.
* Makefile.in (stmt.o, loop.o, unroll.o): Depend on loop.h .