John Wehle [Sat, 8 Apr 2000 04:33:28 +0000 (04:33 +0000)]
i386.md (ashrsi3, [...]): Fix typo.
* i386.md (ashrsi3, ashrhi3, ashrqi3): Fix typo.
* i386.md (floathisf2, floathidf2, floathixf2): New patterns.
* i386.c (print_operand): Use the proper suffix for a 387 HImode
operand. Abort if a 387 operand has an unsupported size.
Neil Booth [Sat, 8 Apr 2000 04:00:02 +0000 (04:00 +0000)]
cppexp.c (parse_charconst): Null does not end character constants.
* cppexp.c (parse_charconst): Null does not end character
constants.
* cppinit.c (ISTABLE): Null character handled as whitespace.
* cpplex.c (null_warning): new function.
(skip_string): Emit warning if nulls encountered.
(_cpp_skip_hspace): Emit warning if nulls encountered.
(_cpp_lex_token): Emit warning if nulls encountered. Drop
them.
* cpp.texi: Update.
* flow.c (loop_depth): Remove.
(reg_next_use, cc0_live, mem_set_list): Replace with ...
(struct propagate_block_info): New.
(life_analysis): Don't allocate reg_next_use.
(propagate_block_delete_insn): Break out of propagate_block.
Use flow_delete_insn to unlink rather than use NOTE_INSN_DELETED.
(propagate_block_delete_libcall): Likewise.
(propagate_block): Create a propagate_block_info struct to pass
to subroutines. Allocate one not two temporary regsets. Don't
clobber memory for const calls. Look for clobbers in
CALL_INSN_FUNCTION_USAGE.
(mark_set_regs): Recognize COND_EXEC.
(mark_set_reg): Break out of mark_set_1.
(mark_used_reg): Break out of mark_used_regs.
(mark_used_regs): Recognize COND_EXEC.
(insn_dead_p): Use propagate_block_info struct.
(libcall_dead_p, invalidate_mems_from_autoinc): Likewise.
(find_auto_inc, try_pre_increment_1): Likewise.
(print_rtl_with_bb): Dump regs live at end too.
(count_reg_sets_1): Pass in loop_depth.
(count_reg_sets, count_reg_references): Likewise.
(recompute_reg_usage): Provide it.
cpplib.c (do_elif): Skip the rest of the line if we're not going to bother evaluating it.
* cpplib.c (do_elif): Skip the rest of the line if we're
not going to bother evaluating it.
(skip_if_group): Clear pfile->only_seen_white. Reorder loop
to avoid pointless calls to the lexer.
* gcc.dg/cpp-mi2.c: New test.
* gcc.dg/cpp-mi2[abc].h: New files.
Jakub Jelinek [Fri, 7 Apr 2000 14:57:58 +0000 (16:57 +0200)]
t-linux64 (tcrtbeginS.o, tcrtendS.o): Remove.
* config/sparc/t-linux64 (tcrtbeginS.o, tcrtendS.o): Remove.
* Makefile.in: Build crtbeginS and crtendS like crtbegin and
crtend so they can be multilibbed.
(STAGESTUFF): Remove s-crt and s-crtS.
alpha.c (alpha_emit_conditional_move): Fail if we discover we need a pseudo and no_new_pseudos is true.
* config/alpha/alpha.c (alpha_emit_conditional_move): Fail
if we discover we need a pseudo and no_new_pseudos is true.
* config/alpha/alpha.md (ne:DI insn): New.
(trunctfsf2, sne): Emit NE instead of non-canonical LTU.
* gcse.c (gcse_main): Don't rebuild the CFG here.
(delete_null_pointer_checks): Likewise.
* ssa.c (convert_to_ssa): Likewise.
* toplev.c (rest_of_compilation): Do it here instead. Combine
sequential calls to TIMEVAR. Consistently use `insns' instead of
`get_insns()'. Always split insns after reload when optimizing.
* basic-block.h (merge_blocks_nomove): Declare.
(tidy_fallthru_edge): Declare.
* flow.c (merge_blocks_nomove): Document as merging into previous
blocks. Remove cruft from between blocks; remove all edges out of A.
(tidy_fallthru_edge): Export.
Alex Samuel [Fri, 7 Apr 2000 08:16:31 +0000 (08:16 +0000)]
ssa.c (compute_conservative_reg_partition): Declare with void arguments.
* ssa.c (compute_conservative_reg_partition): Declare with
void arguments.
* toplev.c (clean_dump_file): Remove previously-deleted function
inadvertantly merged back in.
* conflict.c (conflict_graph_add): Use a single call to
htab_find_slot to look up and insert.
Alex Samuel [Fri, 7 Apr 2000 03:33:15 +0000 (03:33 +0000)]
Forgot the ChangeLog entry in this commit; here it is.
* rtl.h (INSN_P): New macro.
(successor_phi_fn): New typedef.
(for_each_successor_phi): New prototype.
(in_ssa_form): New variable.
(PHI_NODE_P): Likewise.
* flow.c (calculate_global_regs_live): Add to new_live_at_end from
phi nodes in successors.
(mark_used_regs): Add PHI case.
(set_phi_alternative_reg): New function.
(life_analysis): Assert that dead code elimination is not selected
when in SSA form.
* toplev.c (to_ssa_time): New variable.
(from_ssa_time): Likewise.
(compile_file): Zero to_ssa_time and from_ssa_time.
Print time to convert to and from SSA.
(rest_of_compilation): Time convert_to_ssa and convert_from_ssa.
(print_time): Compute percent fraction as integer.
* ssa.c (PHI_NODE_P): Moved to rtl.h.
(convert_to_ssa): Check if we're already in SSA.
Don't eliminate dead code in life_analysis.
Rerun flow and life analysis at bottom.
(eliminate_phi): Use canonical regnos when adding nodes.
(mark_reg_in_phi): New function.
(mark_phi_and_copy_regs): Likewise.
(convert_from_ssa): Rerun life analysis at top.
Use coalesced partition.
Check for removing a phi node at the end of the block.
(compute_coalesced_reg_partition): New function.
(coalesce_regs_in_copies): Likewise.
(coalesce_reg_in_phi): Likewise.
(coalesce_regs_in_sucessor_phi_nodes): Likewise.
(for_each_successor_phi): Likewise.
(rename_context): New struct.
(rename_block): Use a rename_context with rename_insn_1. When
renaming sets of a subreg, emit a copy of the entire reg first.
(rename_insn_1): Treat data as a rename_context *. Save current
insn in set_data.
(rename_set_data): Add field set_insn.
* Makefile.in (HASHTAB_H): Move up in file.
(OBSTACK_H): New macro.
(collect2.o): Use OBSTACK_H in dependencies.
(sdbout.o): Likewise.
(emit-rtl.o): Likewise.
(simplify-rtx.o): Likewise.
(fix-header.o): Likewise.
(OBJS): Add conflict.o.
(conflict.o): New rule.
* basic-block.h: Include partition.h.
(conflict_graph): New typedef.
(conflict_graph_enum_fn): Likewise.
(conflict_graph_new): New prototype.
(conflict_graph_delete): Likewise.
(conflict_graph_add): Likewise.
(conflict_graph_conflict_p): Likewise.
(conflict_graph_enum): Likewise.
(conflict_graph_merge_regs): Likewise.
(conflict_graph_print): Likewise.
(conflict_graph_compute): Likewise.
* conflict.c: New file.
Alex Samuel [Thu, 6 Apr 2000 21:22:49 +0000 (21:22 +0000)]
rtl.h (INSN_P): New macro.
* rtl.h (INSN_P): New macro.
(successor_phi_fn): New typedef.
(for_each_successor_phi): New prototype.
(in_ssa_form): New variable.
(PHI_NODE_P): Likewise.
* flow.c (calculate_global_regs_live): Add to new_live_at_end from
phi nodes in successors.
(mark_used_regs): Add PHI case.
(set_phi_alternative_reg): New function.
(life_analysis): Assert that dead code elimination is not selected
when in SSA form.
* toplev.c (to_ssa_time): New variable.
(from_ssa_time): Likewise.
(compile_file): Zero to_ssa_time and from_ssa_time.
Print time to convert to and from SSA.
(rest_of_compilation): Time convert_to_ssa and convert_from_ssa.
(print_time): Compute percent fraction as integer.
* ssa.c (PHI_NODE_P): Moved to rtl.h.
(convert_to_ssa): Check if we're already in SSA.
Don't eliminate dead code in life_analysis.
Rerun flow and life analysis at bottom.
(eliminate_phi): Use canonical regnos when adding nodes.
(mark_reg_in_phi): New function.
(mark_phi_and_copy_regs): Likewise.
(convert_from_ssa): Rerun life analysis at top.
Use coalesced partition.
Check for removing a phi node at the end of the block.
(compute_coalesced_reg_partition): New function.
(coalesce_regs_in_copies): Likewise.
(coalesce_reg_in_phi): Likewise.
(coalesce_regs_in_sucessor_phi_nodes): Likewise.
(for_each_successor_phi): Likewise.
(rename_context): New struct.
(rename_block): Use a rename_context with rename_insn_1. When
renaming sets of a subreg, emit a copy of the entire reg first.
(rename_insn_1): Treat data as a rename_context *. Save current
insn in set_data.
(rename_set_data): Add field set_insn.
* Makefile.in (HASHTAB_H): Move up in file.
(OBSTACK_H): New macro.
(collect2.o): Use OBSTACK_H in dependencies.
(sdbout.o): Likewise.
(emit-rtl.o): Likewise.
(simplify-rtx.o): Likewise.
(fix-header.o): Likewise.
(OBJS): Add conflict.o.
(conflict.o): New rule.
* basic-block.h: Include partition.h.
(conflict_graph): New typedef.
(conflict_graph_enum_fn): Likewise.
(conflict_graph_new): New prototype.
(conflict_graph_delete): Likewise.
(conflict_graph_add): Likewise.
(conflict_graph_conflict_p): Likewise.
(conflict_graph_enum): Likewise.
(conflict_graph_merge_regs): Likewise.
(conflict_graph_print): Likewise.
(conflict_graph_compute): Likewise.
* conflict.c: New file.
* cpphash.c (CPP_IS_MACRO_BUFFER, FORWARD, PEEKC): Delete.
(macro_cleanup): No need to cast pbuf->macro.
(collect_expansion): Use _cpp_get_define_token. Goto done if
it returns VSPACE. Remove check for trailing space after
CPP_COMMENT.
(_cpp_create_definition): Don't diddle flags here. Return
directly on error.
(unsafe_chars): Handle c1 being EOF.
(push_macro_expansion): Use unsafe_chars for both accidental-paste
checks. Don't push the buffer till after we're done with
them.
* cpplex.c (PEEKBUF, GETBUF, FORWARDBUF): New.
(PEEKN, FORWARD, GETC, PEEKC): Use them.
(cpp_push_buffer): Don't set new->alimit. Set new->mark
appropriately.
(_cpp_parse_assertion): Don't NUL terminate.
(_cpp_lex_token): Fix -traditional macro handling. Don't skip
hspace before calling _cpp_parse_assertion. Remove all sets
of only_seen_white. Treat '\f' as hspace. Don't do anything
special with '\n' here.
(maybe_macroexpand): Handle T_EMPTY hash entries without
pushing a buffer at all.
(cpp_get_token): Handle clearing only_seen_white here. Handle
incrementing the line number here. Clear
potential_control_macro as well as only_seen_white, if
appropriate.
(cpp_get_non_space_token): Don't eat CPP_POP tokens.
(_cpp_get_define_token): New function, basically like
_cpp_get_directive_token was but doesn't eat horizontal space.
Don't do anything with only_seen_white here.
(_cpp_get_directive_token): Just call _cpp_get_define_token
repeatedly till it returns non-hspace.
* cpplib.c (PEEKN, FORWARD, GETC, PEEKC): Delete.
(conditional_skip, skip_if_group): Return int.
(DIRECTIVE_TABLE): Change origin of all conditional directives
to "COND".
(TRAD_DIRECT_P): New macro.
(_cpp_handle_directive): Use _cpp_get_directive_token. Issue
an error for a bogus directive, unless -lang-asm. Use
TRAD_DIRECT_P. Loop calling handler functions till one returns
zero.
(get_macro_name): Don't diddle flags here.
(do_define): Diddle flags here. Use _cpp_get_directive_token.
Create T_EMPTY nodes for #define macro /* nothing */.
(do_undef): Don't copy the name. Use _cpp_get_directive_token.
Use hp->name when calling pass_thru_directive.
(do_if, do_else, do_elif, do_ifdef, do_ifndef, conditional_skip):
Return the result of conditional_skip and/or skip_if_group.
Don't call _cpp_output_line_command.
(consider_directive_while_skipping): Use _cpp_get_directive_token.
Issue -Wtraditional warnings as appropriate. Don't complain
about unrecognized directives. If we are to stop skipping,
return the number of the directive that ended the skip.
(skip_if_group): Use _cpp_get_directive_token. Turn off macro
expansion and line commands while skipping. Return the result
of consider_directive_while_skipping, if nonzero.
(do_endif): Just set potential_control_macro here.
(validate_else): Use _cpp_get_directive_token.
(do_assert, do_unassert): Don't save pointers into the
token_buffer across calls to the lexer. Use
_cpp_get_directive_token.
* cpplib.h (cpp_buffer): Remove alimit and colno. Make mark a
pointer, not an offset. Replace 'data', which was a generic
pointer, with 'macro', which points to a struct hashnode.
(cpp_reader): Add 'potential_control_macro' pointer.
* cpphash.h (T_UNUSED): Replace with T_EMPTY.
(CPP_BUF_GET, CPP_FORWARD): Delete.
(CPP_IN_COLUMN_1, ADJACENT_TO_MARK): New macros.
(CPP_IS_MACRO_BUFFER, CPP_SET_BUF_MARK, CPP_GOTO_BUF_MARK,
ACTIVE_MARK_P): Update.
(_cpp_get_define_token): New internal function.
* cppfiles.c (read_include_file): Don't set fp->alimit or fp->colno.
Benjamin Kosnik [Thu, 6 Apr 2000 06:48:16 +0000 (06:48 +0000)]
configure.in (enable_libstdcxx_v3): Add.
2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
Martin v. Loewis <martin@loewis.home.cs.tu-berlin.de>
* configure.in (enable_libstdcxx_v3): Add.
(target_libs): Add bits here to switch between libstdc++-v2 and
libstdc++-v3.
* config.if: And this file too.
* Makefile.in: Add libstdc++-v3 targets.
Co-Authored-By: Martin v. Loewis <martin@loewis.home.cs.tu-berlin.de>
From-SVN: r32963
Benjamin Kosnik [Thu, 6 Apr 2000 06:47:52 +0000 (06:47 +0000)]
configure.in: And here.
2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
* configure.in: And here.
* configure: Regenerate.
* acconfig.h: Add ENABLE_STD_NAMESPACE to set flag_honor_std if
--enable-libstdcxx-v3 is passed at configure time.
* config.h.in: Regenerate.
Mark Mitchell [Thu, 6 Apr 2000 00:51:25 +0000 (00:51 +0000)]
final.c (final): Use xcalloc to allocate line_note_exists.
* final.c (final): Use xcalloc to allocate line_note_exists.
* function.c (free_after_compilation): Free the temp_slots.
(assign_stack_temp_for_type): Use xmalloc to allocate temp_slots.
(combine_temp_slot): Free temp_slots when they get combined.
(purge_addressof): Fix typo in comment.
* stmt.c (mark_goto_fixup): Mark the fixup itself.
(expand_fixup): Allocate the fixup with ggc_alloc_obj.
* ggc.h: Include varray.h.
(ggc_pending_trees): Declare.
(ggc_mark_tree_children): Remove declaration.
(ggc_mark_tree): Just push unmarked trees on ggc_pending_trees.
* ggc-common.c (ggc_pending_trees): New variable.
(ggc_mark_roots): Call ggc_mark_trees.
(ggc_mark_tree_children): Rename to ggc_mark_trees. Process all
the ggc_pending_trees.
* Makefile.in (GGC_H): New variable. Use it throughout in place
of ggc.h.
* Makefile.in (GGC_H): New variable. Use it throughout in place
of ggc.h.
* call.c: Don't include obstack.h. Include ggc.h.
(obstack_chunk_alloc): Don't define.
(obstack_chunk_free): Likewise.
(add_candidate): Allocate the z_candidate with ggc_alloc_obj.
* decl.c (push_switch): Use xmalloc to allocate the cp_switch.
(pop_switch): Free it.
* decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
* dump.c (dequeue_and_dump): Don't try to print the bit_position
if we don't have a DECL_FIELD_OFFSET.
* class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
made global.
(java_hash_compare_tree_node): Renamed from `decl_compare, made
global.
(add_method_1): Use `java_hash_hash_tree_node' and
`java_hash_compare_tree_node'.
* java-tree.h: (java_hash_hash_tree_node): Prototyped.
(java_hash_compare_tree_node): Likewise.
* parse.y (find_applicable_accessible_methods_list): Create,
delete and use a hash table to remember already searched interfaces.
Jakub Jelinek [Wed, 5 Apr 2000 07:54:16 +0000 (09:54 +0200)]
sparc.md (snedi_zero+1, [...]): Allow splits only if registers are different.
* config/sparc/sparc.md (snedi_zero+1, neg_snedi_zero+1,
snedi_zero_trunc+1, seqdi_zero+1, neg_seqdi_zero+1,
seqdi_zero_trunc+1): Allow splits only if registers are
different.
* acconfig.h: Add HAVE_GAS_HIDDEN.
* config.h: Regenerated.
* configure.in: Add test for .hidden pseudo-op in gas.
* configure: Regenerated.
* crtstuff.c: Include auto-host.h.
Emit additional .hidden pseudo-op for __dso_handle if the
assembler knows about it.
regrename.c (regno_first_use_in): Wrap prototype in PARAMS.
* regrename.c (regno_first_use_in): Wrap prototype in PARAMS.
(regrename_optimize): Rename variables `def_uses' and
`ext_basic_blocks' to avoid conflicts with similarly named
typedefs in traditional C.
Martin v. Löwis [Tue, 4 Apr 2000 22:54:44 +0000 (22:54 +0000)]
Makefile (gccbug): New target.
* Makefile (gccbug): New target.
(doc): Depend on it.
* gcc.texi (Bugs): Link subnodes.
(gccbug): New node.
* gccbug.in (CATEGORIES): Remove gc, host, profiling, libgcc.
Document severities, priorities, and classes in bug form.
* ChangeLog: Replace leading spaces with tabs.
cpplex.c (trigraph_map, speccase): Combine into single table, chartab.
* cpplex.c (trigraph_map, speccase): Combine into single
table, chartab.
(NORMAL, NONTRI): New macros.
(_cpp_read_and_prescan): Change to use unified table. Use
is_hspace to test for whitespace.
Mark Mitchell [Tue, 4 Apr 2000 18:13:22 +0000 (18:13 +0000)]
Correct many new ABI issues regarding vbase and vcall offset layout.
Correct many new ABI issues regarding vbase and vcall offset
layout.
* cp-tree.h (BINFO_VTABLE): Document.
(struct lang_type): Tweak formatting.
(BINFO_PRIMARY_BINFO): Add to documentation.
(CLASSTYPE_VSIZE): Fix typo in comment.
(CLASSTYPE_VBASECLASSES): Update documentation.
(BINFO_VBASE_MARKED): Remove.
(SET_BINFO_VBASE_MARKED): Likewise.
(CLEAR_BINFO_VBASE_MARKED): Likewise.
(BINFO_FIELDS_MARKED): Remove.
(SET_BINFO_FIELDS_MARKED): Likewise.
(CLEAR_BINFO_FIELDS_MARKED): Likewise.
(enum access_kind): New enumeration.
(num_extra_vtbl_entries): Remove declaration.
(size_extra_vtbl_entries): Likewise.
(get_vtbl_decl_for_binfo): New function.
(dfs_vbase_unmark): Remove declaration.
(mark_primary_bases): Likewise.
* class.c (SAME_FN): Remove.
(struct vcall_offset_data_s): Move definition.
(build_vbase_pointer): Use `build', not `build_binary_op', to
access the vbase pointer under the new ABI.
(build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
(build_primary_vtable): Likewise.
(dfs_mark_primary_bases): Move here from search.c.
(mark_primary_bases): Likewise.
(determine_primary_bases): Under the new ABI, don't make a base
class a primary base just because we don't yet have any virtual
functions.
(layout_vtable_decl): Use get_vtbl_decl_for_binfo.
(num_vfun_entries): Remove.
(dfs_count_virtuals): Likewise.
(num_extra_vtbl_entries): Likewise.
(size_extra_vtbl_entries): Likewise.
(layout_virtual_bases): Iterate in inheritance graph order under
the new ABI.
(finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
indicate that a vfield is present.
(init_class_processing): Initialize access_public_node, etc., from
ak_public, etc.
(get_vtbl_decl_for_binfo): New function.
(dump_class_hierarchy_r): Likewise.
(dump_class_hierarchy): Use it.
(finish_vtbls): Build the vtbls in inheritance graph order.
(dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
(initialize_vtable): Use get_vtbl_decl_for_binfo.
(accumulate_vtbl_inits): Add comments explaining why a pre-order
walk is required.
(dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
where the vptr points, even for primary vtables.
(build_vtbl_initializer): Adjust handling of vbase and vcall
offsets.
(build_vcall_and_vbase_vtable_entries): New function.
(dfs_build_vbase_offset_vtbl_entries): Remove.
(build_vbase_offset_vtbl_entries): Reimplement.
(dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
were already handled in a primary base class vtable.
(build_vcall_offset_vtbl_entries): Adjust.
(build_rtti_vtbl_entries): Adjust.
* decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
* init.c (expand_virtual_init): Simplify.
* repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
* rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
* search.c (BINFO_ACCESS): New macro.
(SET_BINFO_ACCESS): Likewise.
(dfs_access_in_type): Manipulate access_kinds, not access nodes.
(access_in_type): Likewise.
(dfs_accessible_p): Likewise.
(protected_accessible_p): Likewise.
(lookup_fnfields_1): Adjust documentation.
(dfs_mark_primary_bases): Move to class.c
(mark_primary_bases): Likewise.
(dfs_vbase_unmark): Remove.
(virtual_context): Use BINFO_FOR_VBASE.
(dfs_get_vbase_types): Simplify.
(dfs_build_inheritance_graph_order): New function.
(get_vbase_types): Use it.
* tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
* tinfo.cc (get_vbase_offset): New function.
(__vmi_class_type_info::do_find_public_src): Use it.
(__vmi_class_type_info::do_dyncast): Likewise.
(__vmi_class_type_info::do_upcast): Likewise.