Jeffrey A Law [Wed, 10 Mar 1999 21:29:44 +0000 (21:29 +0000)]
gcse.c: More comments, whitespace and similar fixes.
* gcse.c: More comments, whitespace and similar fixes.
(dump_cuid_table, maybe_set_rd_gen, dump_cprop_data): Delete.
(dump_pre_data, compute_cprop_local_properties): Likewise.
(one_classic_gcse_pass): Lose unused argument. All callers changed.
(compute_hash_table, compute_expr_hash_table): Likewise.
(compute_set_hash_table, one_pre_gcse_pass, mark_call): Likewise.
(cprop_insn, cprop, one_cprop_pass): Add new argument ALTER_JUMPS.
All callers changed. Only alter jumps if ALTER_JUMPS is nonzero.
Lose unused argument.
(gcse_main): Always run a cprop pass after finishing global cse.
(compute_local_properties): New function.
(hash_scan_pat, hash_scan_insn): No longer call maybe_set_rd_gen.
(compute_cprop_data): Use compute_local_properties.
Jeffrey A Law [Wed, 10 Mar 1999 19:45:18 +0000 (19:45 +0000)]
gcse.c (run_jump_opt_after_gcse): New variable.
* gcse.c (run_jump_opt_after_gcse): New variable.
(gcse_main): Returns an integer.
(hash_scan_set): Record initializations from CONST_DOUBLEs too.
(try_replace_reg): Update some comments.
(cprop_insn): Allow propagation into some JUMP_INSNs too.
* rtl.h (gcse_main): Update prototype.
* toplev.c (rest_of_compilation): If gcse_main returns nonzero,
then run a jump optimization pass.
* jump.c (delete_barrier_successors): Delete nop jumps too.
J"orn Rennecke [Wed, 10 Mar 1999 11:07:32 +0000 (11:07 +0000)]
sh.c (fp_arith_reg_operand): Actually test if reg is suitable for FP arithmetic.
* sh.c (fp_arith_reg_operand): Actually test if reg is suitable
for FP arithmetic. Changed caller.
* sh.md (subsf3, subsf_i): Use fp_arith_reg_operand.
Mark Mitchell [Wed, 10 Mar 1999 10:53:35 +0000 (10:53 +0000)]
search.c (dfs_canonical_queue): New function.
* search.c (dfs_canonical_queue): New function.
(dfs_assert_unmarked_p): Likewise.
(assert_canonical_unmarked): Likewise.
(access_in_type): Use it.
(accessible_p): Likewise. Walk the whole tree when umarking.
Mark Mitchell [Tue, 9 Mar 1999 23:02:42 +0000 (23:02 +0000)]
cp-tree.h (flag_access_control): Declare.
* cp-tree.h (flag_access_control): Declare.
(TREE_VIA_PPUBLIC): Document.
(DECL_NONSTATIC_MEMBER_P): New macro.
(enforce_access): Return an indication of whether or not access
was permitted.
(build_self_reference): Change prototype.
(compute_access): Replace with ...
(accessible_p): New function.
(dfs_walk): Change prototype.
(dfs_unmark): Likewise.
(markedp): Likewise.
* call.c (enforce_access): Use accessible_p.
* class.c (build_self_reference): Insert the declaration into the
list of members for this type, and make it public.
* decl.c (xref_basetypes): Avoid ill-timed recursion.
* init.c (build_offset_ref): Use lookup_member, not three separate
name-lookups. Call enforce_access rather than checking for
illegal accesses here.
(resolve_offset_ref): Likewise.
* lex.c (do_identifier): Likewise.
* method.c (hack_identifier): Likewise.
* parse.y (self_reference): Remove.
(opt_component_decl_list): Don't use it.
* parse.c: Regenerated.
* pt.c (print_candidates): Generalize to handle lists of
overloaded functions.
(instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
not set.
(get_template_base): Use new calling convention for dfs_walk.
* search.c: Include varray.h. Add prototypes.
(dfs_walk): Accept a data pointer to pass to the work functions.
All callers changed. All work functions changed.
(breadth_first_search): Rename to bfs_walk, and make consistent
with dfs_walk.
(dfs_walk_real): New function.
(canonical_binfo): New function.
(context_for_name_lookup): Likewise.
(shared_marked_p): Likewise.
(shared_unmarked_p): Likewise.
(lokup_field_queue_p): Likewise.
(lookup_field_r): Generalize to handle both functions and fields.
(lookup_field): Just call lookup_member.
(lookup_fnfields): Likewise.
(lookup_member): Move body of lookup_field here and generalize.
(dfs_accessible_queue_p): Likewise.
(dfs_accessible_p): Likewise.
(dfs_access_in_type): Likewise.
(access_in_type): Likewise.
(compute_access): Remove, and replace with ...
(accessible_p): New function.
(vbase_types): Remove.
(vbase_decl_ptr_intermediate): Likewise.
(vbase_decl_ptr): Likewise.
(vbase_init_result): Likewise.
(closed_envelopes): Likewise.
(bvtable): Likewise.
Jeffrey A Law [Tue, 9 Mar 1999 01:09:52 +0000 (01:09 +0000)]
i386.md (zero_extendhisi2): Split into an expander and anonymous pattern.
* i386.md (zero_extendhisi2): Split into an expander and anonymous
pattern. Add new anonymous pattern for use when optimizing for
size or for the PPro.
(zero_extendqihi2, zero_extendqisi2): Likewise.
Jeffrey A Law [Mon, 8 Mar 1999 23:31:28 +0000 (23:31 +0000)]
i386.md (ashlsi3): Revise comments.
* i386.md (ashlsi3): Revise comments. Provide new anonymous
pattern for Pentium and PPro/PII. Reverse constraints in
generic ashlsi3 anonymous pattern.
Per Bothner [Mon, 8 Mar 1999 13:34:12 +0000 (13:34 +0000)]
lex.c (java_parse_end_comment): Take extra parameter (next char).
�
* lex.c (java_parse_end_comment): Take extra parameter (next char).
* class.c (build_utf8_ref): Fix possible name class/ambiguity.
* class.c (layout_class_method): A static method in a base class
is never overridden, so treat it like it doesn't exist.
However, do complain about private non-static method overriding
public static method.
* parse.y: Don't set unused INITIALIZED_P flag.
* java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
* parse.y (find_expr_with_wfl): Optimize tail-calls.
(build_array_from_name): Re-order &index[string] to &string[index].
* parse.y (java_complete_tree): Don't call patch_assignment if rhs is
error_mark (it might catch more errors, but it is more likely to lose).
haifa-sched.c (ENCODE_BLOCKAGE): Don't shift unit too far.
* haifa-sched.c (ENCODE_BLOCKAGE): Don't shift unit too far.
(print_exp): Special case addition of a constant.
(print_value) [CONST_INT]: Use HOST_WIDE_INT_PRINT_HEX.
Kaveh R. Ghazi [Sun, 7 Mar 1999 05:46:30 +0000 (05:46 +0000)]
gmon-sol2.c: Include config.h and system.h.
* gmon-sol2.c: Include config.h and system.h. Don't redundantly
include system header files.
(sccsid): Remove.
(moncontrol, monstartup, _mcleanup, internal_mcount): Prototype.
(_mcleanup): Add the `const' keyword to a char*.
(internal_mcount): Declare `etext' as a char[] not a function.
Cast `etext' to char* when calling `monstartup'.
* sparc.c (frame_base_name, save_regs, restore_regs,
build_big_number, sparc_cmodel_string, sparc_align_loops_string,
sparc_align_jumps_string, sparc_align_funcs_string, code_model,
cpu_default, cpu_table, output_function_prologue,
output_function_epilogue, output_return,
sparc_flat_output_function_prologue, ultra_code_names,
sparc_flat_output_function_epilogue): Constify a char*.
(hypersparc_adjust_cost): Add a default case in a switch.
* sparc.h (sparc_cmodel_string, OVERRIDE_OPTIONS,
sparc_cpu_select, sparc_align_loops_string,
sparc_align_jumps_string, sparc_align_funcs_string,
output_return): Constify a char*.
* sparc.md (movdi): Change the comparison of HOST_BITS_PER_WIDE_INT
so that we check "== 32", instead of "!= 64". Cast a value to
HOST_WIDE_INT when comparing against one. Hide the declaration
for variable `chain'.
Kaveh R. Ghazi [Sun, 7 Mar 1999 05:21:41 +0000 (05:21 +0000)]
system.h (const, inline): Move the stage2 handling of these keywords-as-macros from here...
* system.h (const, inline): Move the stage2 handling of these
keywords-as-macros from here...
* gansidecl.h (const, inline): ...to here.
(This became necessary after using `const' in config directory headers,
which get included before system.h does. If we're going to reset these
keywords, we must do so before absolutely any other header file.)
* cp-tree.h (struct lang_type): Add anon_union field.
(ANON_UNION_TYPE_P): Use it instead of examining type.
(SET_ANON_UNION_TYPE_P): New macro.
* decl.c (check_tag_decl): Use it.
* search.c (compute_access): Handle non-type contexts earlier, and
handle NULL_TREE.
* tree.c (build_exception_variant): Use copy_to_permanent.
Jason Merrill [Sat, 6 Mar 1999 03:54:30 +0000 (03:54 +0000)]
decl2.c (setup_initp): Give statics with no priority the default priority here.
* decl2.c (setup_initp): Give statics with no priority the default
priority here.
(do_dtors, do_ctors, finish_file): Remove special handling of
non-prioritized statics.
Mark Mitchell [Fri, 5 Mar 1999 16:38:54 +0000 (16:38 +0000)]
cp-tree.h (ANON_UNION_TYPE_P): Robustify.
* cp-tree.h (ANON_UNION_TYPE_P): Robustify.
* decl.c (make_typename_type): Don't issue an error if an
immediate lookup fails; it migt be resolved later.
* friend.c (is_friend): Add comment.
* search.c (breadth_first_search): Add POSTFN and DATA
parameters. Tidy. All callers changed.
(lookup_field_queue_p): New function.
(lookup_field_r): Likewise.
(lookup_field_post): Likewise.
(lookup_field): Use them, via breadth_first_search, instead of
duplicating logic.
(compute_access): Robustify.
(lookup_fnfield_info): New structure.
Doug Rabson [Fri, 5 Mar 1999 01:21:14 +0000 (01:21 +0000)]
configure.in: Support shared libs on FreeBSD 3.x and 4.x
* configure.in: Support shared libs on FreeBSD 3.x and 4.x
* config/freebsd.ml: A copy of config/linux.ml since they are both
ELF and both have a shared libm.
John Wehle [Fri, 5 Mar 1999 01:19:25 +0000 (01:19 +0000)]
function.c (assign_stack_temp_for_type): Abort if mode == Blkmode and align is less than BIGGEST_ALIGNMENT / BITS_PER_UNIT.
* function.c (assign_stack_temp_for_type): Abort
if mode == Blkmode and align is less than
BIGGEST_ALIGNMENT / BITS_PER_UNIT.
(assign_stack_temp_for_type): Round the size parameter
passed to assign_stack_local instead of size itself.
Bootstrapped on the PA and x86.
Remove ChangeLog entries for flow rewrite for changes that were removed before they were checked in.
Remove ChangeLog entries for flow rewrite for changes that were removed
before they were checked in. Add Makefile.in changes which were mentioned
in the ChangeLog, but never included in Makefile.in.
Jason Merrill [Wed, 3 Mar 1999 11:24:45 +0000 (11:24 +0000)]
class.c, [...]: Add 'static' to make SunOS 4 cc happy.
* class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
cc happy.
* decl2.c (import_export_class): Also return if
CLASSTYPE_INTERFACE_ONLY is set.
* cp-tree.h (determine_specialization): Don't declare.
* pt.c (determine_specialization): Make it static. Eliminate
complain parameter. Note that decl is always non-NULL now, and
simplify accordingly.