aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
AgeCommit message (Collapse)AuthorFilesLines
1998-03-27basic-block.h (basic_block_computed_jump_target): Declare.Bernd Schmidt1-7/+24
* 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-20Major cutover to using system.h:Kaveh R. Ghazi1-2/+1
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o, c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o, caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o, dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o, expr.o, final.o, flow.o, function.o, getpwd.o, global.o, integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o, prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o, reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o, rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o, tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend on system.h. * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c, c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c, caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c, dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c, integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c, prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c, reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c, rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c, stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c, xcoffout.c: Include system.h. Organize include ordering so that stdarg/varargs comes before other system headers. Remove spurious casts of functions assured of a prototype in system.h. From-SVN: r18726
1998-03-19More warning fixes...Kaveh R. Ghazi1-2/+1
* final.c (shorten_branches): Add parentheses around +/- in operand of &. * flow.c (life_analysis): Wrap variable `i' in macro ELIMINABLE_REGS. From-SVN: r18703
1998-03-19m68k.md (addqi3): Fix typo gen_INT vs.Manfred Hollstein1-0/+1
� * config/m68k/m68k.md (addqi3): Fix typo gen_INT vs. GEN_INT. * flow.c (life_analysis): #include <sys/types.h> to make sure size_t is defined. * cplus-dem.c (demangle_function_name): Likewise. From-SVN: r18696
1998-03-18Fix more warnings...Kaveh R. Ghazi1-5/+1
* c-lang.c (finish_file): Wrap variable `void_list_node' with macro test !ASM_OUTPUT_CONSTRUCTOR || !ASM_OUTPUT_DESTRUCTOR. * calls.c (emit_call_1): Wrap variable `already_popped' with macro test !ACCUMULATE_OUTGOING_ARGS. * collect2.c (write_c_file_glob): Wrap function definition in macro test !LD_INIT_SWITCH. * combine.c (try_combine): Wrap variables `cc_use' and `compare_mode' in macro test EXTRA_CC_MODES. * cpplib.c (do_ident): Remove unused variable `len'. (skip_if_group): Remove unused variables `at_beg_of_line' and `after_ident'. (cpp_get_token): Remove unused variable `dummy'. * dbxout.c (scope_labelno): Move static variable definition inside the one function scope where it is used. (dbxout_function_end): Wrap prototype and definition in macro test !NO_DBX_FUNCTION_END. * dwarf2out.c (add_subscript_info): Wrap variable `dimension_number' in macro test !MIPS_DEBUGGING_INFO. * expr.c (expand_builtin_setjmp): Move declaration of variable `i' into the scope where it is used. Wrap empty else-statement body in braces. * fix-header.c: Fix typo in comment. (inf_skip_spaces): Cast results of INF_UNGET to (void). (check_protection, main): Likewise. * flow.c (find_basic_blocks_1): Remove dangling comment text. * function.c (contains): Wrap prototype and definition in macro test HAVE_prologue || HAVE_epilogue. (fixup_var_refs_1): Remove unused variable `width'. * gen-protos.c (main): Remove unused variable `optr'. * haifa-sched.c (debug_control_flow): Remove unused variable `j'. * libgcc2.c (__udiv_w_sdiv): Provide dummy return value of 0. (__sjpopnthrow): Remove unused variable `jmpbuf'. (__throw): Remove unused variable `val'. * protoize.c: Check for a previously existing definition before defining *_OK macros. * scan-decls.c (scan_decls): Remove unused variable `old_written'. From-SVN: r18654
1998-03-12basic-block.h (compute_preds_succs): Change return type in prototype to void.Manfred Hollstein1-1/+1
d * 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: r18507
1998-03-12c-decl (finish_struct): Change type of min_align to unsigned.Manfred Hollstein1-2/+1
d gcc/ChangeLog: * c-decl (finish_struct): Change type of min_align to unsigned. * cplus-dem.c (demangle_function_name): Change type of variable i to size_t; remove unused variable len. * dwarf2out.c (reg_save): Add explicit cast of -1 to unsigned and a comment indicating this is proper behaviour. (reg_loc_descriptor): Remove redundant comparison of unsigned variable reg >= 0. (based_loc_descr): Likewise. * enquire.c (bitpattern): Change type of variable i to unsigned. * final.c (output_asm_insn): Don't cast insn_noperands to unsigned. * flow.c (life_analysis): Change type of variable i to size_t; remove unused variable insn. * gcc.c (translate_options): Change type of variables optlen, arglen and complen to size_t. (input_filename_length): Change type to size_t. (do_spec_1): Change type of variable bufsize to size_t. (main): Change type of variables i and j to size_t; remove subblock local definition of variable i. (lookup_compiler): Change type of second argument to size_t; change type of variable i to size_t. * genemit.c (output_init_mov_optab): Change type of variable i to size_t. * genopinit.c (get_insn): Change type of variable pindex to size_t. * genrecog.c (add_to_sequence): Change type of variable i to size_t. * global.c (global_alloc): Change type of variable i to size_t. * regclass.c (init_reg_sets): Change type of variables i and j to unsigned. * stmt.c (expand_end_bindings): Change type of variable i to size_t. (expand_end_case): Change type of variable count to size_t. * toplev.c (main): Change type of variable j to size_t. (set_target_switch): Change type of variable j to size_t. (print_switch_values): Change type of variable j to size_t; remove unused variable flags. * varasm.c (assemble_variable): Change type of variable align to size_t. (const_hash_rtx): Change type of variable i to size_t. gcc/cp/ChangeLog: Sun Mar 8 17:13:38 1998 Manfred Hollstein <manfred@s-direktnet.de> * decl2.c (lang_decode_option): Change j's type to size_t. * tree.c (layout_vbasetypes): record_align and desired_align are of type unsigned int; const_size and nonvirtual_const_size likewise. From-SVN: r18490
1998-03-10flow.c (find_basic_blocks_1): Keep the cfg accurate when removing an ↵Jeff Law1-0/+8
unconditional jump around deleted blocks. P * flow.c (find_basic_blocks_1): Keep the cfg accurate when removing an unconditional jump around deleted blocks. From-SVN: r18468
1998-03-07haifa-sched.c (is_cfg_nonregular): Change return type to an int.Jeffrey A Law1-7/+28
* haifa-sched.c (is_cfg_nonregular): Change return type to an int. No longer compute "estimated" number of edges. Use computed_jump_p instead of duplicating the code. Fixup/add some comments. (build_control_flow): Returns a value indicating an irregularity in the cfg was detected. Count the number of edges in the cfg. allocate various edge tables. (find_rgns): No longer look for unreachable blocks. (schedule_insns): Do not allocate memory for edge tables here. Free memory for edge tables before returning. Do not perform cross block scheduling if build_control_flow returns nonzero. * flow.c (compute_preds_succs): More accurately determine when a block drops in. Fixes various compile hangs after haifa cleanup. From-SVN: r18439
1998-03-05haifa-sched.c (build_jmp_edges): Delete dead function.Jeffrey A Law1-43/+849
* 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
1998-02-10flow.c (life_analysis): Do not conside the stack pointer live at the end of ↵Jeffrey A Law1-2/+6
a function if... * flow.c (life_analysis): Do not conside the stack pointer live at the end of a function if the fucntio ncalls alloca. (mark_used_regs): Similarly. From-SVN: r17839
1998-01-14alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO...Richard Henderson1-36/+35
* alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO; change gen_rtx(expr...) to gen_rtx_fmt_foo(expr...). * caller-save.c, calls.c, combine.c, cse.c: Likewise. * dwarf2out.c, except.c, explow.c, expmed.c, expr.c: Likewise. * final.c, flow.c, function.c, genpeep.c, haifa-sched.c: Likewise. * halfpic.c, integrate.c, jump.c, local-alloc.c, loop.c: Likewise. * profile.c, recog.c, reg-stack.c, regclass.c, regmove.c: Likewise. * reload.c, reload1.c, reorg.c, sched.c, stmt.c, stupid.c: Likewise. * unroll.c, varasm.c: Likewise. * config/alpha/alpha.c, config/alpha/alpha.md: Likewise. From-SVN: r17357
1997-12-27flow.c (find_basic_blocks): Don't create a new basic block for calls in a ↵Jeffrey A Law1-3/+25
LIBCALL block. * flow.c (find_basic_blocks): Don't create a new basic block for calls in a LIBCALL block. From-SVN: r17247
1997-12-20bitmap.c (bitmap_clear): Ensure `inline' is at the beginning of the declaration.Kaveh R. Ghazi1-1/+3
* bitmap.c (bitmap_clear): Ensure `inline' is at the beginning of the declaration. * c-decl.c (finish_decl): Use parentheses around && within ||. * rtl.c: Include stdlib.h. (read_skip_spaces): Add parentheses around assignments used as truth values. (read_rtx): Initialize list_rtx. * cppexp.c (parse_number): Use || when operands are truth values. * alias.c (find_base_value): Add default case. (memrefs_conflict): Likewise. * combine.c (sets_function_arg_p): Likewise. * genemit.c (gen_exp): Likewise. * local-alloc.c (contains_replace_regs): Likewise. * rtlanal.c (jmp_uses_reg_or_mem): Likewise. * fold-const.c (fold_convert): Use "&&" for truth values. (fold): Add default case. * sdbout.c (sdbout_field_types): Fix typo in declaration. (sdbout_one_type): Add default case. * alpha.c (alpha_sa_mask): Prototype only if OPEN_VMS. (some_operand): Add default case. (input_operand): Likewise. (signed_comparison_operator): Likewise. (divmod_operator): Likewise. (alpha_set_memflags_1): Likewise. * reload1.c (reload_cse_simplify_operands): Ensure function always returns a value. * scan-decls.c (scan_decls): Likewise. * c-lex.c (skip_white_space): Fix typo in declaraion. * c-typeck.c (comp_target_types): Add parentheses around assignment used as truth value. (print_spelling): Likewise. (constructor_implicit, constructor_result): Remove unused variables. * collect2.c (scan_library): Protect prototype with #ifdef SCAN_LIBRARIES. * emit-rtl.c (find_line_note): Fix typo in declaration. * final.c (asm_insn_count): Protect prototype with #ifdef HAVE_ATTR_length. * flow.c (find_auto_inc): Protect prototype with #ifdef AUTO_INC_DEC. (try_pre_increment_1, try_pre_increment): Likewise. * regclass.c (auto_inc_dec_reg_p): Protect prototype with #ifdef FORBIDDEN_INC_DEC_CLASSES. Make return type explicit. * gcov-io.h (__store_long, __write_long, __read_long): Fix unsigned/signed comparisons. * gcov.c (read_files): Remove unused "first_type" variable. (scan _for_source_files): Initialize s_ptr. (function_summary): Eliminate "%lf" formatting, use %ld for longs. (output_data): Initialize branch_probs and last_line_num. Eliminate "%lf" formatting, use "%ld" for longs. Co-Authored-By: Jeffrey A Law <law@cygnus.com> From-SVN: r17158
1997-12-12flow.c (flow_analysis): Be consistent with find_basic_blocks in determining ↵Jason Merrill1-1/+2
when a new basic block starts. * flow.c (flow_analysis): Be consistent with find_basic_blocks in determining when a new basic block starts. From-SVN: r17085
1997-12-12flow.c (find_basic_blocks): A CALL_INSN that can throw starts a new basic block.Jason Merrill1-2/+7
* flow.c (find_basic_blocks): A CALL_INSN that can throw starts a new basic block. (find_basic_blocks_1): Likewise. From-SVN: r17055
1997-12-06Merge from gcc-2.8Jeff Law1-5/+5
From-SVN: r16987
1997-12-04./: * libgcc2.c (__throw): Use __builtin_return_addr instead of __eh_pc.Jason Merrill1-18/+1
* except.c: Lose outer_context_label_stack. (expand_eh_region_end): Rethrow from outer_context here. (expand_fixup_region_end): Let expand_eh_region_end do the rethrow. (expand_internal_throw): Take no args. (expand_internal_throw_indirect): Lose. (expand_leftover_cleanups, expand_start_all_catch): Use expand_rethrow. (expand_start_all_catch): Start a rethrow region. (expand_end_all_catch): End it. (expand_rethrow): New fn. * except.h: Reflect above changes. cp/: * except.c (expand_end_catch_block): Lose rethrow region. (expand_start_catch_block): Likewise. (expand_end_catch_block): Don't expand_leftover_cleanups. From-SVN: r16937
1997-11-27Grr. Used the wrong patchfile last time.Jeff Law1-1/+13
From-SVN: r16816
1997-11-27flow.c (find_basic_blocks): Handle cfg issues for rethrows and nested ↵Jeffrey A Law1-0/+5
exceptions correctly. * flow.c (find_basic_blocks): Handle cfg issues for rethrows and nested exceptions correctly. From-SVN: r16812
1997-11-13flow.c (find_basic_blocks): During marking phase...Jeffrey A Law1-30/+23
* flow.c (find_basic_blocks): During marking phase, if we encounter an insn with a REG_LABEL note, make the target block live and create an edge from the insn to the target block. Do not make edges from all blocks to the target block. From-SVN: r16469
1997-11-12flow.c (find_basic_blocks): Refine further to get a more correct cfg...Jeffrey A Law1-121/+150
* flow.c (find_basic_blocks): Refine further to get a more correct cfg, especially in the presense of exception handling, computed gotos, and other non-trivial cases. Call abort if an inaccuracy is detected in the cfg. From-SVN: r16440
1997-11-02Update mainline egcs to gcc2 snapshot 971021.Jeff Law1-1/+4
From-SVN: r16278
1997-11-01flow.c (find_basic_blocks): If we delete the label for an exception handler...Jeffrey A Law1-0/+45
* flow.c (find_basic_blocks): If we delete the label for an exception handler, remove it from the EH label list and remove the EH_BEGIN/EH_END notes for that EH region. From-SVN: r16265
1997-11-01flow.c (find_basic_blocks): Generate correct flow control information when ↵Jason Merrill1-12/+31
exception handling notes are present. * flow.c (find_basic_blocks): Generate correct flow control information when exception handling notes are present. From-SVN: r16263
1997-10-03Cast alloca return value for char *Michael Meissner1-1/+1
From-SVN: r15837
1997-09-29flow.c (find_basic_blocks): Mark calls as potentially jumping to the EH labels.Jason Merrill1-2/+8
* flow.c (find_basic_blocks): Mark calls as potentially jumping to the EH labels. From-SVN: r15792
1997-09-28flow.c (print_rtl_with_bb): Cast alloca return values for variables start ↵Philippe De Muyter1-2/+2
and end. * flow.c (print_rtl_with_bb): Cast alloca return values for variables start and end. From-SVN: r15753
1997-09-21Forgot to check in last time.Jeff Law1-100/+17
From-SVN: r15620
1997-09-11fix typoMichael Meissner1-1/+1
From-SVN: r15401
1997-09-11make change to spacing for KennerMichael Meissner1-4/+3
From-SVN: r15398
1997-09-04For phases starting with flow, print basic block information when doing dumpsMichael Meissner1-0/+79
From-SVN: r15082
1997-08-11* Integrate Haifa instruction scheduler.Jeffrey A Law1-2/+1
* Integrate regmove pass. See ChangeLog for deatils. From-SVN: r14770
1997-07-16Minor reformatting.Richard Kenner1-16/+17
From-SVN: r14461
1997-07-14(init_regset_vector): Make global; don't take basic block times # of pseduos ↵Richard Kenner1-22/+43
as argument. (init_regset_vector): Make global; don't take basic block times # of pseduos as argument. (life_analysis): Change all init_regset_vector calls. Use free_regset_vector to release arrays only flow uses at end. (allocate_for_life_analysis): Change init_regset_vector call. Don't set regset_{size,bytes}. (free_regset_vector): Call FREE_REG_SET to release any memory allocated by each vector. (propagate_block): Call FREE_REG_SET on dead/live. (mark_used_regs): Don't use REGSET_ELT_TYPE anymore. From-SVN: r14422
1997-06-18* flow.c (find_basic_blocks): Fix end case bug.Mike Stump1-1/+1
From-SVN: r14257
1997-06-10(mark_used_regs): Fix typo in Jun 4 change.Richard Kenner1-1/+1
From-SVN: r14220
1997-06-09flow.c (find_basic_blocks): Eliminate more dead code, enables dead throws to ↵Mike Stump1-7/+46
be eliminated. * flow.c (find_basic_blocks): Eliminate more dead code, enables dead throws to be eliminated. From-SVN: r14193
1997-06-05remove cygnus local stuffMichael Meissner1-3/+2
From-SVN: r14152
1997-06-05Fix urgent bugMichael Meissner1-34/+37
From-SVN: r14150
1997-06-05abstract regset stuff into macrosMichael Meissner1-216/+131
From-SVN: r14147
1997-06-02Widen some short fields to int; Use allocate_reg_info to allocate the ↵Michael Meissner1-1/+1
reg_renumber array From-SVN: r14142
1997-05-30Use accessor macros to access arrays based on regno; move many of the arrays ↵Michael Meissner1-108/+48
into a single structure. From-SVN: r14140
1997-05-06reformat a little to match GNU coding standards.Mike Stump1-4/+4
From-SVN: r14024
1997-02-04flow.c (life_analysis): Delete obvious no-op moves which use SUBREGs.Jeff Law1-0/+17
* flow.c (life_analysis): Delete obvious no-op moves which use SUBREGs. From-SVN: r13607
1997-01-29(regno_uninitialized): Return 0 if reg is used for args.Richard Kenner1-3/+5
From-SVN: r13562
1996-08-21flow.c (life_analysis): Preserve registers used by the epilogue.Mike Stump1-5/+14
* flow.c (life_analysis): Preserve registers used by the epilogue. (mark_used_regs): Likewise. * reorg.c (fill_simple_delay_slots): Likewise. (dbr_schedule): Likewise. Fixes eh49.C for sparc. From-SVN: r12666
1996-07-23install EH codeMike Stump1-0/+4
From-SVN: r12548
1996-07-03formatting tweaksMike Stump1-7/+8
From-SVN: r12390
1996-06-18(flow_analysis): Fix typo in last change.Richard Kenner1-1/+1
From-SVN: r12295