aboutsummaryrefslogtreecommitdiff
path: root/gcc/basic-block.h
AgeCommit message (Collapse)AuthorFilesLines
1998-10-29flow.c (XNMALLOC): New macro.Bernd Schmidt1-1/+2
* flow.c (XNMALLOC): New macro. (flow_int_list_blocks, basic_block_succ, basic_block_pred): New static variables. (add_edge, add_edge_to_label): New static functions. (free_bb_memory): New function. (flow_delete_insn): Delete function. (basic_block_drops_in): Delete variable. (find_basic_blocks): Allocate and initialize basic_block_head, basic_block_succ. Don't allocate basic_block_drops_in. Call free_bb_memory at the beginning. (find_basic_blocks_1): Don't do multiple passes. Delete code to compute basic_block_drops_in. After calling make_edges, mark blocks reached by current block live. Update test for unreachable live blocks. (mark_label_ref): Delete args X, CHECKDUP. Add PRED arg. All callers changed. Simplify to call add_edge_to_label when a LABEL_REF is found. (make_edges): Simplify to call add_edge_to_label instead of mark_label_ref most of the time. Compute here whether control drops into the next block. (delete_unreachable_blocks): Return void. All callers changed. Delete unreachable blocks in reverse order. After deleting all unreachable blocks, renumber the remaining ones and update n_basic_blocks. (delete_block): Speed up deletion a bit. Don't set basic_block_drops_in for deleted blocks. (free_basic_block_vars): Don't free basic_block_drops_in. (life_analysis_1): Update to use new edge representation. (dump_flow_info): Delete code to print basic block info; call dump_bb_data instead. (compute_preds_succs): Delete code to recompute basic_block_drops_in and uid_block_number. Simply copy the previously computed cfg. (dump_bb_data): New arg LIVE_INFO. All callers changed. Print register lifetime information if LIVE_INFO is nonzero. * basic-block.h (dump_bb_data): Adjust prototype. * gcse.c (gcse_main): Update call to dump_bb_data. * rtl.h (free_bb_memory): Declare. * toplev.c (rest_of_compilation): Call free_bb_memory. From-SVN: r23443
1998-10-10basic-block.h (EXECUTE_IF_SET_IN_SBITMAP): New macro.Richard Henderson1-1/+35
* basic-block.h (EXECUTE_IF_SET_IN_SBITMAP): New macro. (sbitmap_free, sbitmap_vector_free): New macros. * output.h (rtl_dump_file): Declare. From-SVN: r22978
1998-07-02Switch reg_n_info structure to use varraysMichael Meissner1-2/+2
From-SVN: r20894
1998-06-21basic-block.h (init_regset_vector): Delete declaration.Jeffrey A Law1-3/+0
* basic-block.h (init_regset_vector): Delete declaration. * flow.c (init_regset_vector): Make it static and add a prototype. From-SVN: r20647
1998-06-21bitmap.h (debug_bitmap): Declare.Jeff Law1-0/+3
* bitmap.h (debug_bitmap): Declare. * basic-block.h (init_regset_vector): New declaration. From-SVN: r20646
1998-05-19Warning Fixes:Kaveh R. Ghazi1-0/+1
* Makefile.in (print-rtl.o): Depend on bitmap.h. (dbxout.o): Depend on toplev.h. ($(SCHED_PREFIX)sched.o): Likewise. ($(out_object_file)): Likewise for system.h and toplev.h. (cppmain.o): Depend on gansidecl.h. (cpplib.o): Likewise. (cpperror.o): Likewise. (cppexp.o): Likewise. (cpphash.o): Likewise. (cppalloc.o): Likewise. (fix-header.o): Depend on cpplib.h and cpphash.h. (scan-decls.o): Depend on gansidecl.h. * basic-block.h (free_regset_vector): Add prototype. * cccp.c (check_precompiled): Mark parameter `fname' with ATTRIBUTE_UNUSED. (do_assert): Likewise for `op' and `keyword'. (do_unassert): Likewise. (do_line): Likewise for `keyword'. (do_error): Likewise for `op' and `keyword'. (do_warning): Likewise. (do_ident): Likewise for `keyword'. (do_pragma): Likewise for `limit', `op' and `keyword'. (do_sccs): Likewise. (do_if): Likewise for `keyword'. (do_elif): Likewise. (do_else): Likewise. (do_endif): Likewise. * collect2.c (getenv): Remove redundant prototype. (collect_exit, collect_execute, dump_file): Likewise. (dump_list): Wrap prototype and definition in COLLECT_EXPORT_LIST. (dump_prefix_list): Hide prototype and definition. * sparc.c: Include toplev.h. (intreg_operand): Mark parameter `mode' with ATTRIBUTE_UNUSED. (symbolic_memory_operand): Likewise. (sp64_medium_pic_operand): Likewise. (data_segment_operand): Likewise. (text_segment_operand): Likewise. (splittable_symbolic_memory_operand): Likewise. (splittable_immediate_memory_operand): Likewise. (eq_or_neq): Likewise. (normal_comp_operator): Likewise. (noov_compare_op): Likewise. (v9_regcmp_op): Likewise. (v8plus_regcmp_op): Likewise. (extend_op): Likewise. (cc_arithop): Likewise. (cc_arithopn): Likewise. (small_int): Likewise. (uns_small_int): Likewise. (clobbered_register): Likewise. (legitimize_pic_address): Likewise. (delay_operand): Likewise. (sparc_builtin_saveregs): Remove unused variable `stdarg'. * sparc.h (order_regs_for_local_alloc, eligible_for_return_delay, sparc_issue_rate, v8plus_regcmp_p): Add prototypes. * sparc.md (cmpdi_v8plus): Add abort for default case in switch. * cppalloc.c: Include gansidecl.h. * cpperror.c: Include stdarg.h/varargs.h and gansidecl.h. (cpp_file_line_for_message): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (v_cpp_message): New function. (cpp_message): Use it. Also convert to variable arguments. (cpp_fatal): Likewise. (cpp_pfatal_with_name): Constify parameter `name'. * cppexp.c: Move gansidecl.h before cpplib.h. * cpphash.c: Likewise. * cpphash.h (hashf, delete_macro): Add prototypes. * cpplib.c: Include stdarg.h/varargs.h and move gansidecl.h before cpplib.h. Don't include errno.h. (update_path): Add arguments to prototype. (cpp_fatal, cpp_file_line_for_message, cpp_message, delete_macro, cpp_print_containing_files): Remove redundant prototypes. (cpp_hash_cleanup, add_import, append_include_chain, make_assertion, path_include, initialize_builtins, initialize_char_syntax, finclude, validate_else, comp_def_part, lookup_import, redundant_include_p, is_system_include, read_name_map, read_filename_string, open_include_file, check_macro_name, compare_defs, compare_token_lists, eval_if_expression, change_newlines): Add prototype arguments. (hashf): Remove redundant prototype. (read_token_list, free_token_list, safe_read, xcalloc, savestring, conditional_skip, skip_if_group): Add prototype arguments. (fdopen): Remove redundant prototype. (do_define, do_line, do_include, do_undef, do_error, do_pragma, do_ident, do_if, do_xifdef, do_else, do_elif, do_endif, do_sccs, do_once, do_assert, do_unassert, do_warning): Add prototype arguments. (struct directive): Add prototype arguments to function pointer member `func'. (handle_directive): Add missing arguments to call to `do_line'. (do_include): Mark parameters `unused1' and `unused2' with ATTRIBUTE_UNUSED. (do_line): Likewise for `keyword' and new parameters `unused1' and `unused2'. (do_error): Likewise for `keyword'. (do_warning): Likewise. Also add missing argument `pfile' in call to cpp_pedwarn. (do_once): Mark parameter `keyword', `unused1' and `unused2' with ATTRIBUTE_UNUSED. (do_ident): Likewise for `keyword', `buf' and `limit'. (do_pragma): Likewise. Also add missing arguments in call to do_once. (do_sccs): Mark parameter `keyword', `buf' and `limit' with ATTRIBUTE_UNUSED. (do_if): Likewise for `keyword'. (do_elif): Likewise. (eval_if_expression): Likewise for `buf' and `length'. (do_xifdef): Likewise for `unused1' and `unused2'. (do_else): Likewise for `keyword', `buf' and `limit'. (do_endif): Likewise. (parse_name): Add missing argument `pfile' in call to cpp_pedwarn. (cpp_handle_options): Remove superfluous NULL argument in call to cpp_fatal. (cpp_handle_options): Likewise. (do_assert): Mark parameter `keyword', `buf' and `limit' with ATTRIBUTE_UNUSED. (do_unassert): Likewise. (cpp_print_file_and_line): Add missing argument `pfile' in call to cpp_file_line_for_message. (v_cpp_error): New function. (cpp_error): Use it. Also accept variable arguments. (v_cpp_warning): New function. (cpp_warning): Use it. Also accept variable arguments. (cpp_pedwarn): Accept variable arguments. (v_cpp_error_with_line): New function (cpp_error_with_line): Use it. Accept variable arguments. (v_cpp_warning_with_line): New function. (cpp_warning_with_line): Use it. Accept variable arguments. Hide definition. (cpp_pedwarn_with_line): Accept variable arguments. (cpp_pedwarn_with_file_and_line): Likewise. (cpp_error_from_errno): Constify parameter `name'. Add missing argument `pfile' in call to cpp_file_line_for_message. (cpp_perror_with_name): Constify parameter `name'. * cpplib.h: Define PARAMS() in terms of PROTO(). (fatal): Remove redundant prototype. (cpp_error, cpp_warning, cpp_pedwarn, cpp_error_with_line, cpp_pedwarn_with_line, cpp_pedwarn_with_file_and_line, cpp_error_from_errno, cpp_perror_with_name, cpp_pfatal_with_name, cpp_fatal, cpp_message, cpp_pfatal_with_name, cpp_file_line_for_message, cpp_print_containing_files): Add arguments to prototypes. (scan_decls, cpp_finish): Add prototypes. * cppmain.c: Include gansidecl.h. (main): Remove unused variable `i'. * dbxout.c: Include toplev.h. * demangle.h (do_tlink, collect_execute, collect_exit, collect_wait, dump_file, file_exists): Add prototype. * dwarf2out.c (dwarf_type_encoding_name, decl_start_label): Hide prototype and definition. (gen_unspecified_parameters_die): Don't assign results of call to function new_die() to unused variable `parm_die'. (dwarf2out_line): Mark parameter `filename' with ATTRIBUTE_UNUSED. (dwarf2out_define): Likewise for `lineno' and `buffer'. * dwarfout.c (output_unsigned_leb128, output_signed_leb128): Hide prototype and definition. (output_die): Add prototype arguments to function pointer arg. (output_unspecified_parameters_die): Mark parameter `arg' with ATTRIBUTE_UNUSED. * except.c (output_exception_table_entry): Remove unused variable `eh_entry'. * except.h (expand_fixup_region_start, expand_fixup_region_end): Add prototypes. * expr.c (do_jump_by_parts_equality_rtx): Remove prototype. * expr.h (do_jump_by_parts_equality_rtx): Add prototype. * fix-header.c: Include stdarg.h/varargs.h, move gansidecl.h before cpplib.h, include cpphash.h, remove redundant prototype of cpp_fatal, don't define `const', add a prototype for `fatal'. (cpp_file_line_for_message): Add missing arguments `pfile'. (v_cpp_message): New function. (cpp_message): Use it. (v_fatal): New function. (fatal, cpp_fatal): Use it. (cpp_pfatal_with_name): Constify parameter `name'. * flow.c (free_regset_vector): Remove redundant prototype. * function.c (round_down): Wrap prototype and definition with macro ARGS_GROW_DOWNWARD. (record_insns): Wrap prototype and definition with defined (HAVE_prologue) || defined (HAVE_epilogue). * gansidecl.h (ATTRIBUTE_PRINTF_4, ATTRIBUTE_PRINTF_5): New macros. * gen-protos.c: Include gansidecl.h. (hashf): Don't make it static, constify parameter `name'. * genattrtab.c (check_attr_test): Change XEXP() to XSTR() to match specifier %s in calls to function `fatal'. * haifa-sched.c: Include toplev.h. (find_rgns): Remove unused variable `j'. * integrate.c (note_modified_parmregs): Mark parameter `x' with ATTRIBUTE_UNUSED. (mark_stores): Likewise. * jump.c (mark_modified_reg): Likewise. * output.h (insn_current_reference_address): Add prototype. (eh_frame_section): Likewise. * print-rtl.c: Include bitmap.h. * reload1.c (reload): Wrap variables `note' and `next' in macro PRESERVE_DEATH_INFO_REGNO_P. (forget_old_reloads_1): Mark parameter `ignored' with ATTRIBUTE_UNUSED. (choose_reload_regs): Remove unused variable `in'. (reload_cse_invalidate_mem): Mark parameter `ignore' with ATTRIBUTE_UNUSED. (reload_cse_check_clobber): Likewise. * rtl.h (expand_null_return, reg_classes_intersect_p): Add prototype. (mark_elimination): Fix typo in prototype. * scan-decls.c: Include gansidecl.h. * tree.h (using_eh_for_cleanups, supports_one_only): Add prototype. From-SVN: r19867
1998-04-16* basic-block.h (compute_dominators): Declare.Jeffrey A Law1-3/+5
From-SVN: r19243
1998-04-16flow.c (dump_sbitmap, [...]): New debugging functions.Jeff Law1-0/+3
8 * flow.c (dump_sbitmap, dump_sbitmap_vector): New debugging functions. * basic-block.h: Declare them. From-SVN: r19242
1998-04-15flow.c (sbitmap_union_of_successors): New function.Jeffrey A Law1-0/+2
* flow.c (sbitmap_union_of_successors): New function. * basic-block.h (sbitmap_union_of_successors): Declare it. For completeness, we already had the other 3 variants. This one is useful for backwards lazy code motion. From-SVN: r19232
1998-03-27basic-block.h (basic_block_computed_jump_target): Declare.Bernd Schmidt1-0/+5
* basic-block.h (basic_block_computed_jump_target): Declare. * flags.h: (current_function_has_computed_jump): Declare. * flow.c: (basic_block_computed_jump_target): Define. (flow_analysis): Allocate it. Set current_function_has_computed_jump to 0. (find_basic_blocks): Set current_function_has_computed_jump and elements of basic_block_computed_jump_target to 1 as appropriate. * function.c: (current_function_has_computed_jump): Define. * global.c (global_conflicts): Don't allocate pseudos into stack regs at the start of a block that is reachable by a computed jump. * reg-stack.c (stack_reg_life_analysis): If must restart, do so immediately. (subst_stack_regs): Undo change from Sep 4 1997. (uses_reg_or_mem): Now unused, deleted. * stupid.c (stupid_life_analysis): Compute current_function_has_computed_jump. (stupid_find_reg): Don't allocate stack regs if the function has a computed goto. * haifa-sched.c (is_cfg_nonregular): Delete code to determine if the current function has a computed jump. Use the global value instead. Co-Authored-By: Jeffrey A Law <law@cygnus.com> From-SVN: r18860
1998-03-12basic-block.h (compute_preds_succs): Change return type in prototype to void.Manfred Hollstein1-2/+2
a * basic-block.h (compute_preds_succs): Change return type in prototype to void. * flow.c (compute_preds_succs): Likewise in function definition. * regmove.c (find_matches): Cast char used as array index to unsigned char to supress warning. From-SVN: r18506
1998-03-06* basic-block.h (free_basic_block_vargs): Provide prototype.Jeffrey A Law1-0/+2
From-SVN: r18438
1998-03-05haifa-sched.c (build_jmp_edges): Delete dead function.Jeffrey A Law1-0/+121
* haifa-sched.c (build_jmp_edges): Delete dead function. (build_control_flow): Use cfg routines from flow.c (schedule_insns): Remove debugging code accidentally checked in earlier today. * basic-block.h: Add external integer list structures, typdefs, accessor macros and function declarations. Simlarly for basic block pred/succ support and simple bitmap stuff. * flow.c: Add functions for integer list, basic block pred/succ support and simple bitmap support. (compute_dominators): New function to compute dominators and post dominators. (find_basic_blocks): Split into two functions. (life_analysis): Likewise. (flow_analysis): Removed. Now handled by calling find_basic_blocks, the life_analysis from toplev.c * toplev.c (rest_of_compilation): Call find_basic_blocks, then life_analysis instead of flow_analysis. Co-Authored-By: Doug Evans <devans@cygnus.com> From-SVN: r18421
1997-09-04Add EXECUTE_IF_AND_IN_{BITMAP,REG_SET}, and bitmap_printMichael Meissner1-0/+6
From-SVN: r15071
1997-07-14(*REG_SET): Delete old implementation; use bitmap.h.Richard Kenner1-208/+45
(regset_{size,bytes}): Delete. (regs_live_at_setjmp): Declare. (EXECUTE_IF_SET_AND_RESET_IN_REG_SET): Delete. From-SVN: r14421
1997-06-06(EXECUTE_IF_AND_COMPL_IN_REG_SET): Fix setting of scan_rs_.Doug Evans1-4/+4
From-SVN: r14166
1997-06-06(REG_SET_TO_HARD_REG_SET): Fix typo.Doug Evans1-12/+12
(EXECUTE_IF_SET_IN_REG_SET): Fix setting of scan_rs_. (EXECUTE_IF_SET_AND_RESET_IN_REG_SET): Likewise. (EXECUTE_IF_AND_IN_REG_SET): Likewise. From-SVN: r14165
1997-06-05Fix urgent bugMichael Meissner1-2/+2
From-SVN: r14150
1997-06-05abstract regset stuff into macrosMichael Meissner1-2/+219
From-SVN: r14147
1997-05-30Use accessor macros to access arrays based on regno; move many of the arrays ↵Michael Meissner1-1/+2
into a single structure. From-SVN: r14140
1995-06-15Update FSF address.Richard Kenner1-1/+2
From-SVN: r9959
1993-07-10(REGSET_ELT_TYPE): Make unsigned to avoid signed arithmetic overflow.Richard Stallman1-1/+1
From-SVN: r4900
1993-04-17(reg_basic_block): Now int *, not short *.Richard Kenner1-1/+1
From-SVN: r4173
1992-07-06entered into RCSCharles Hannum1-0/+68
From-SVN: r1466