Jason Merrill [Wed, 22 Aug 2001 14:51:32 +0000 (10:51 -0400)]
jump.c (squeeze_notes): Take parms by reference.
* jump.c (squeeze_notes): Take parms by reference. Handle END being
a squeezable note.
* rtl.h: Adjust.
* ifcvt.c (dead_or_predicable): Adjust.
* loop.c (find_and_verify_loops): Adjust.
* stmt.c (expand_end_case): Adjust.
* flow.c (merge_blocks_move_successor_nojumps): Adjust. Modify the
head and end insn pointers in the basic block, not just local copies.
(merge_blocks_move_predecessor_nojumps): Likewise.
Jason Merrill [Wed, 22 Aug 2001 14:42:22 +0000 (10:42 -0400)]
pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
* pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
* tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
final.c (LABEL_ALIGN_AFTER_BARRIER): Default to no alignment.
* final.c (LABEL_ALIGN_AFTER_BARRIER): Default to no alignment.
(final_scan_insn): Consider jump tables data even if we have no
independant text section if !JUMP_TABLES_IN_TEXT_SECTION. Use
ADDR_VEC_ALIGN.
* config/ia64/ia64.h (JUMP_TABLES_IN_TEXT_SECTION): Remove.
(ASM_OUTPUT_CASE_END): Remove.
(ASM_OUTPUT_ADDR_DIFF_ELT): Emit pc-relative references.
* config/ia64/ia64.md (tablejump): Decode pc-relative references.
* config/ia64/sysv4.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove.
Zack Weinberg [Wed, 22 Aug 2001 07:16:50 +0000 (07:16 +0000)]
caller-save.c: Don't include insn-codes.h.
* caller-save.c: Don't include insn-codes.h.
(reg_save_code, reg_restore_code): Make arrays of int.
All uses updated to match.
(insert_save, insert_restore): No need to initialize "code"
variable upon declaration.
* Makefile.in: update dependencies; fix typo in clean rule.
Zack Weinberg [Wed, 22 Aug 2001 00:39:24 +0000 (00:39 +0000)]
caller-save.c: Don't include insn-codes.h.
* caller-save.c: Don't include insn-codes.h.
(reg_save_code, reg_restore_code): Make arrays of int.
All uses updated to match.
(insert_save, insert_restore): No need to initialize "code"
variable upon declaration.
* Makefile.in: update dependencies; fix typo in clean rule.
Zack Weinberg [Wed, 22 Aug 2001 00:33:33 +0000 (00:33 +0000)]
expmed.c (mode_for_extraction): New function.
* expmed.c (mode_for_extraction): New function.
(store_bit_field, extract_bit_field): Use it.
* expr.h: Prototype it and provide an enum for its first argument.
* combine.c, function.c, recog.c: Don't include insn-codes.h.
Use mode_for_extraction rather than testing HAVE_insv/extv/extzv
and digging through the insn_data tables.
* Makefile.in: Update dependencies.
Neil Booth [Tue, 21 Aug 2001 23:05:12 +0000 (23:05 +0000)]
cppfiles.c (stack_include_file): line-map.c now handles include depth.
* cppfiles.c (stack_include_file): line-map.c now handles include
depth.
(handle_missing_handler): Similarly.
(_cpp_execute_include): Similarly.
(_cpp_pop_file_buffer): Similarly.
* cpphash.h (struct cpp_reader): Remove system_include_depth,
buffer_stack_depth and include_depth.
* cpplib.c (do_include_common): line-map.c now handles include depth.
(cpp_push_buffer): Similarly.
(_cpp_pop_buffer): Similarly.
* cppmacro.c (builtin_macro): Update.
* line-map.c (init_line_maps): Set depth.
(add_line_map): Increment "used" earlier. Update and use the
include depth.
(trace_include): Use the include depth.
* line-map.h (struct line_maps): New member depth.
* cppfiles.c (stack_include_file): Don't handle -H here.
* cppinit.c (cpp_start_read): Set include tracing after
cpp_post_options and after stacking the main file.
* line-map.c (trace_include): New.
(init_line_maps, add_line_map): Update.
* line-map.h (struct line_maps): New member trace_includes.
Neil Booth [Tue, 21 Aug 2001 19:23:24 +0000 (19:23 +0000)]
cppfiles.c (stack_include_file): Harmonize system headerness tests.
* cppfiles.c (stack_include_file): Harmonize system headerness tests.
* cppfiles.c (stack_include_file): Only stack a file if there
is something to do. Return a boolean indicating whether a
buffer was stacked or not.
(_cpp_execute_include): Similarly.
(_cpp_read_file): Similarly.
* cpphash.h (_cpp_read_file, _cpp_execute_include): Update prototypes.
Janis Johnson [Tue, 21 Aug 2001 16:11:35 +0000 (16:11 +0000)]
gcov.exp: Add support for branch information.
* gcc.misc-tests/gcov.exp: Add support for branch information.
* gcc.misc-tests/gcov-2.c: Change to invoke gcov and clean up.
* gcc.misc-tests/gcov-4.c: New test.
* gcc.misc-tests/gcov-4b.c: New test.
* gcc.misc-tests/gcov-5b.c: New test.
Zack Weinberg [Tue, 21 Aug 2001 15:51:22 +0000 (15:51 +0000)]
stmt.c: Don't include insn-codes.h.
* stmt.c: Don't include insn-codes.h.
(expand_end_case): Machine specific logic moved to expr.c.
No need to worry about __builtin_classify_type.
(check_for_full_enumeration_handling, emit_case_nodes):
Kill #if 0 blocks.
* builtins.o (expand_builtin_classify_type): Split up so code
can be shared with fold_builtin_classify_type.
(type_to_class, fold_builtin_classify_type): New functions.
(fold_builtins): Handle __builtin_classify_type.
* expr.c (do_tablejump): Now static.
(case_values_threshold, try_casesi, try_tablejump): New;
code mostly from stmt.c (expand_end_case).
(expr.h): Update prototypes.
Will Cohen [Tue, 21 Aug 2001 12:17:28 +0000 (12:17 +0000)]
alpha.h (CONDITIONAL_REGISTER_USAGE): Added local declaration of variable i.
2001-08-21 Will Cohen <wcohen@redhat.com>
* configure/alpha/alpha.h (CONDITIONAL_REGISTER_USAGE): Added local
declaration of variable i.
* configure/rs6000/rs6000.h (CONDITIONAL_REGISTER_USAGE): Added local
declaration of variable i.
* crtstuff.c: Fix thinko last change. Move list tails to start
of CRT_END section. Tidy ifdefs.
(__EH_FRAME_BEGIN__): Always static for ELF.
(__do_global_ctors_1): Rename from __frame_dummy.
* config/mips/iris6.h (LINK_SPEC): Update for __do_global_ctors_1
name change; don't hide __EH_FRAME_BEGIN__.
Neil Booth [Tue, 21 Aug 2001 06:20:18 +0000 (06:20 +0000)]
cpphash.h (_cpp_push_next_buffer): New.
* cpphash.h (_cpp_push_next_buffer): New.
* cppinit.c (do_includes): Remove.
(push_include, free_chain, _cpp_push_next_buffer): New.
(cpp_start_read): Use them to rework command line option handling.
(cpp_handle_option): Combine handling of -include and -imacros.
* cpplex.c (_cpp_lex_token): Push a new -include buffer if
appropriate. Always insert missing \n at EOF.
* cpplib.c (start_directive): Get the directive position right.
* cppmain.c (cb_file_change): Always print the first line, unless
preprocessed.
Diego Novillo [Tue, 21 Aug 2001 03:22:26 +0000 (03:22 +0000)]
basic-block.h (basic_block): Add new field 'flags'.
* basic-block.h (basic_block): Add new field 'flags'.
(BB_REACHABLE): Define.
(expunge_block): Declare.
* flow.c (ENTRY_BLOCK_PTR): Initialize field 'flags'.
(EXIT_BLOCK_PTR): Ditto.
(expunge_block): Remove static declaration.
(cleanup_cfg): Clear bb->aux on every basic block.
(find_unreachable_blocks): Set BB_REACHABLE bit in bb->flags when
computing reachability.
(delete_unreachable_blocks): Delete block b if b->flags has
BB_REACHABLE unset.
Tom Tromey [Mon, 20 Aug 2001 19:52:02 +0000 (19:52 +0000)]
jni.cc (nathash, [...]): New globals.
* jni.cc (nathash, nathash_count, nathash_size): New globals.
(DELETED_ENTRY): New define.
(hash): New function.
(nathash_find_slot): Likewise.
(natrehash): Likewise.
(nathash_add): Likewise.
(_Jv_JNI_RegisterNatives): No longer interpreter-specific. Use
nathash_add.
(nathash_find): New function.
(_Jv_LookupJNIMethod): Use it. Synchronize body.
(call): Synchronize around assignment.
Janis Johnson [Mon, 20 Aug 2001 17:34:48 +0000 (17:34 +0000)]
gcov.exp: Add support for branch information.
* gcc.misc-tests/gcov.exp: Add support for branch information.
* gcc.misc-tests/gcov-2.c: Change to invoke gcov and clean up.
* gcc.misc-tests/gcov-4.c: New test.
* gcc.misc-tests/gcov-4b.c: New test.
* gcc.misc-tests/gcov-5b.c: New test.
Neil Booth [Mon, 20 Aug 2001 06:14:53 +0000 (06:14 +0000)]
cppinit.c (init_standard_includes): The returned buffer is already malloc-ed.
* cppinit.c (init_standard_includes): The returned buffer
is already malloc-ed.
* gcc.c (add_prefix): Similarly.
* prefix.c (translate_name): Update to support clear buffer
ownership rules.
(update_path): Similarly. Be sure to free any newly allocated
key. UPDATE_PATH_HOST_CANONICALIZE takes only one argument.
(tr): New function.
* prefix.h (update_path): Update prototype and document.
* config/i386/xm-djgpp.h (UPDATE_PATH_HOST_CANONICALIZE): Clean
up and update to new buffer ownership rules.
* doc/gcc.texi (UPDATE_PATH_HOST_CANONICALIZE): Update.
Jan Hubicka [Sun, 19 Aug 2001 23:46:10 +0000 (01:46 +0200)]
final.c (compute_alignments): New function.
* final.c (compute_alignments): New function.
(init_insn_lengths): Do not care label_align.
(LABEL_ALIGN_AFTER_BARRIER): Default to 1.
(LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP): Default to 0.
(JUMP_ALIGN, JUMP_ALIGN_MAX_SKIP): New.
(shorted_branches): Realloc label_align array; do
not call init_insn_lengths; Do not care about loop alignments.
* output.h (compute_alignments): Declare.
* toplev.c (rest_of_compilation): Call compute_alignments.
* tm.texi (JUMP_ALIGN, JUMP_ALIGN_MAX_SKIP): Document.
* predict.c (block_info_def): Add npredecesors, remove nvisited;
change visited to tovisit.
(propagate_freq): Use faster traversing algorithm.
(estimate_loops_at_level, estimate_bb_frequencies): Change visited
to tovisit; reverse meaning.
* predict.c (struct block_info_def): Remove nvisited.
(propagate_freq): Use EDGE_DFS_BACK to detect irreducible regions.
(estimate_bb_frequencies): Call mark_dfs_back_edges.
ia64.h (STRIP_NAME_ENCODING): Handle @ and * in the same string.
* config/ia64/ia64.h (STRIP_NAME_ENCODING): Handle @ and *
in the same string.
(ASM_NAME_TO_STRING): Remove.
* config/ia64/sysv4.h (ASM_OUTPUT_LABELREF): Handle @ and *
in the same string. Remove support for expressions.
* config/ia64/crtbegin.asm (dtor_ptr): Make gp-relative.
(__do_global_dtors_aux): Update to match.
(__JCR_LIST__, __do_jv_register_classes): New.
(.init): Call it.
* config/ia64/crtend.asm (__JCR_END__): New.
(__do_global_ctors_aux): Use a GPREL64I reloc to __CTOR_END__
instead of an indirect LTOFF22 reloc.
crtstuff.c: Move list heads before code that uses them.
* crtstuff.c: Move list heads before code that uses them.
(__JCR_LIST__): Remove initial null.
(frame_dummy, __frame_dummy): Do java registration here ...
(__do_global_ctors_aux): ... not here.
flow.c (mark_regs_live_at_end): Use regs_invalidated_by_call.
* flow.c (mark_regs_live_at_end): Use regs_invalidated_by_call.
* regclass.c (init_reg_sets_1): Fix typo.
* config/ia64/ia64.c (ar_pfs_reg_operand): New.
(ia64_expand_call): Pass ar.pfs to sibcall expanders.
(ia64_compute_frame_size): Make ar.unat live when in use.
(ia64_epilogue_uses): Reformat; do not check current_function_is_leaf
for ar.pfs; remove ar.unat handling.
* config/ia64/ia64.h (CALL_REALLY_USED_REGISTERS): ar.unat is
call-saved.
(PREDICATE_CODES): Add ar_pfs_reg_operand.
* config/ia64/ia64-protos.h: Update decls.
* config/ia64/ia64.md (sibcall_nopic): Use ar.pfs.
(sibcall_pic): Likewise.
timevar.h (struct timevar_time_def): Change element type to float.
* timevar.h (struct timevar_time_def): Change element type to float.
(ticks_to_msec, clocks_to_msec): Likewise.
(TICKS_TO_MSEC, CLOCKS_TO_MSEC): Rescale to seconds; use type float.
(get_time): Likewise.
(timevar_print): Adjust zero check and printing to match.
Zack Weinberg [Sat, 18 Aug 2001 20:46:45 +0000 (20:46 +0000)]
ansidecl.h: Reorganize for readability...
include:
* ansidecl.h: Reorganize for readability, remove documentation
of obsolete macros, document PARAMS and VPARAMS. Add new
macros VA_OPEN, VA_CLOSE, and VA_FIXEDARG for nicer variadic
function implementation.
gcc:
* cpperror.c: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
Zack Weinberg [Sat, 18 Aug 2001 20:25:54 +0000 (20:25 +0000)]
haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks. Macros replaced
are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
MD_SCHED_FINISH, and HAVE_cycle_display.
* target-def.h (TARGET_SCHED_ADJUST_COST,
TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
New hook #defines to be overridden.
(TARGET_SCHED): Bring them all together.
(TARGET_INITIALIZER): Update.
* target.h: Don't forward declare struct rtx_def. Use 'rtx'
instead of 'struct rtx_def *' throughout.
(struct sched): New set of hooks for the scheduler.
* Makefile.in (haifa-sched.o): Depend on target.h.
* doc/tm.texi: Document the new scheduler hooks, together in
their own section, instead of scattered around.
Fix a bunch of underfull/overfull hboxes.
* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
sparc.h: Don't define any of the old scheduler macros.
* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
sparc.c: Create hook functions from code extracted from
corresponding target header, or make existing hooks static, as
appropriate. Set the appropriate entries in targetm.
* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
rs6000-protos.h, s390-protos.h, sparc-protos.h:
Remove prototypes for functions which are now static.
* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
related gunk; the Haifa scheduler is now the only choice.
Zack Weinberg [Sat, 18 Aug 2001 19:59:46 +0000 (19:59 +0000)]
optabs.h (OTI_flodiv, [...]): Kill.
* optabs.h (OTI_flodiv, flodiv_optab): Kill.
* genopinit.c: Put floating point divide insns in sdiv_optab.
* expr.c (expand_expr): Use sdiv_optab, not flodiv_optab.
* config/gofast.h, config/c4x/c4x.h,
config/ia64/hpux_longdouble.h, config/mips/mips.h,
config/pa/long_double.h, config/rs6000/sysv4.h,
config/sparc/sparc.h: Put floating point divide libcalls in sdiv_optab.
* optabs.c (init_optab): Break into new_optab, init_optab, init_optabv.
(init_optabs): Use init_optabv for overflow-trapping optabs.
Don't init flodiv_optab. Give mov_optab, movstrict_optab, and
cmp_optab RTX codes so have_insn_for can find them.
* optabs.c (expand_simple_binop, expand_simple_unop,
have_insn_for, gen_sub3_insn): New interfaces.
* expr.h: Prototype new functions.
(enum optab_methods): Move here from optabs.h.
* builtins.c, combine.c, doloop.c, function.c, ifcvt.c,
loop.c, profile.c, simplify-rtx.c, stmt.c, unroll.c:
Use new functions instead of working directly with optabs.
* doloop.c, ifcvt.c, loop.c, profile.c, simplify-rtx.c,
unroll.c: Don't include optabs.h.
* caller-save.c, combine.c, function.c, stmt.c: Just include
insn-codes.h, not optabs.h.
* Makefile.in: Update dependencies.
* combine.c (make_compound_operation, simplify_comparison):
Fix typos testing for this or that instruction.
* testsuite/22_locale/collate_byname.cc: New.
* testsuite/22_locale/collate.cc: New file.
* testsuite/22_locale/collate_char_members.cc: New file.
* testsuite/22_locale/collate_wchar_t_members.cc: New file.