aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
AgeCommit message (Collapse)AuthorFilesLines
2003-09-18re PR target/11184 ([ia64 hpux] ICE on __builtin_apply building libobjc)Mark Mitchell1-12/+3
PR target/11184 * builtins.c (expand_builtin_apply): Use convert_memory_address before returning the value. * alias.c (find_base_value): Simplify use of convert_memory_address. (find_base_term): Likewise. * builtins.c (expand_builtin_stejmp_setup): Likewise. (expand_builtin_longjmp): Likewise. (expand_builtin_prefetch): Likewise. (get_memory_rtx): Likewise. (expand_builtin_return): Likewise. (expand_builtin_memcpy): Likewise. (expand_builtin_strncpy): Likewise. (expand_builtin_memset): Likewise. (expand_builtin_va_arg): Likewise. (expand_builtin_va_copy): Likewise. (expand_builtin_alloca): Likewise. * calls.c (expand_call): Likewise. * except.c (expand_builtin_extract_return_addr): Likewise. (expand_builtin_eh_return): Likewise. * explow.c (convert_memory_address): Define even when POINTER_EXTEND_UNSIGNED is not defined. Do nothing if the address is already in the right mode. * explow.c (memory_address): Simplify use of convert_memory_address. (probe_stack_range): Likewise. * expmed.c (make_tree): Likewise. * expr.c (emit_block_move_in_libcall): Likewise. (expand_assignment): Likewise. (expand_expr): Likewise. * function.c (assign_parms): Likewise. (expand_function_end): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * stmt.c (expand_computed_goto): Likewise. PR target/11184 * gcc.dg/builtin-apply1.c: New test. From-SVN: r71539
2003-09-09except.c: Include cgraph.h.Richard Henderson1-3/+18
* except.c: Include cgraph.h. (output_function_exception_table): Invoke cgraph_varpool_mark_needed_node. * Makefile.in (except.o): Update. * decl2.c (mark_member_pointers): Rename from mark_member_pointers_and_eh_handlers and don't check eh handlers. From-SVN: r71254
2003-08-01except.c (sjlj_emit_dispatch_table): Use ptr_mode, not Pmode, for accesses ↵Richard Kenner1-3/+3
to exc_ptr. * except.c (sjlj_emit_dispatch_table): Use ptr_mode, not Pmode, for accesses to exc_ptr. From-SVN: r70075
2003-07-19alias.c [...]: Remove unnecessary casts.Kaveh R. Ghazi1-13/+10
* alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.c c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c gcse.c genattr.c genattrtab.c genautomata.c genconditions.c genemit.c genextract.c genoutput.c genrecog.c gensupport.c ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c postreload.c prefix.c print-tree.c protoize.c ra-build.c ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c regmove.c regrename.c reload.c reload1.c reorg.c resource.c sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary casts. From-SVN: r69587
2003-06-29except.c: Convert prototypes to ISO C90.Andreas Jaeger1-253/+158
* except.c: Convert prototypes to ISO C90. * except.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * et-forest.h: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. From-SVN: r68674
2003-06-27rtl.h (emit_note): Remove FILE parameter.Nathan Sidwell1-3/+3
* rtl.h (emit_note): Remove FILE parameter. * emit-rtl.c (emit_line_note): Adjust emit_note call. (emit_note): Remove FILE parameter. Adjust. * builtins.c (expand_builtin_expect): Adjust emit_note call. * c-semantics.c (genrtl_scope_stmt): Likewise. (expand_stmt): Likewise. * cfglayout.c (reemit_insn_block_notes): Likewise. (duplicate_insn_chain): Likewise. * except.c (expand_eh_region_start, expand_eh_region_end, sjlj_emit_function_enter): Likewise. * explow.c (probe_stack_range): Likewise. * expr.c (emit_block_move_via_loop): Likewise. * function.c (init_function_start, expand_function_start, expand_function_end, thread_prologue_and_epilogue_insns): Likewise. * integrate.c (expand_inline_function, copy_insn_list): Likewise. * reg-stack.c (compensate_edge): Likewise. * reload1.c (reload): Likewise. * rtlanal.c (hoist_insn_to_edge): Likewise. * stmt.c (expand_fixup, expand_start_loop, expand_start_null_loop, expand_loop_continue_here, expand_end_loop, expand_continue_loop, expand_exit_loop_top_cond, expand_value_return, expand_start_bindings_and_block, expand_end_bindings, expand_decl_cleanup, expand_start_case): Likewise. * unroll.c (copy_loop_body * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise. * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_emit_eh_toc_restore, rs6000_emit_allocate_stack, rs6000_output_function_prologue, rs6000_output_function_epilogue, rs6000_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * ada/misc.c (record_code_position): Likewise. From-SVN: r68561
2003-06-16decl.c, [...]: Don't use the PTR macro.Kaveh R. Ghazi1-33/+33
cp: * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR macro. gcc: * bitmap.c, builtins.c, c-incpath.c, cgraph.c, config/frv/frv.c, config/mips/mips.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c, dwarf2out.c, dwarfout.c, except.c, expr.c, expr.h, fold-const.c, function.c, gcc.c, genoutput.c, gensupport.c, global.c, haifa-sched.c, hashtable.c, ifcvt.c, integrate.c, local-alloc.c, loop.c, mips-tdump.c, mips-tfile.c, mkdeps.c, protoize.c, read-rtl.c, recog.h, reload1.c, sbitmap.c, ssa-dce.c, stringpool.c, tlink.c, tree.c, varasm.c, varray.c: Don't use the PTR macro. From-SVN: r68043
2003-06-10* except.c (call_site_base): Mark with GTY.Geoffrey Keating1-1/+1
From-SVN: r67722
2003-05-29add commentJason Merrill1-0/+3
From-SVN: r67231
2003-05-10except.c (EH_RETURN_STACKADJ_RTX): Do not define.Ulrich Weigand1-48/+38
* except.c (EH_RETURN_STACKADJ_RTX): Do not define. (EH_RETURN_HANDLER_RTX): Likewise. (expand_builtin_eh_return): Do not copy stack adjustment if EH_RETURN_STACKADJ_RTX is not defined. (expand_eh_return): Likewise. Also, do not pass stack adjustment as argument to the eh_return pattern. * except.h (MUST_USE_SJLJ_EXCEPTIONS): Do not define just because EH_RETURN_STACKADJ_RTX is not defined. * unwind-dw.c (uw_update_context_1): If EH_RETURN_STACKADJ_RTX is not defined, treat stack pointer like a regular register. (uw_init_context_1): Set up fake initial stack pointer register. (uw_install_context_1): Do not compute stack adjustment if EH_RETURN_STACKADJ_RTX is not defined. * config/i386/i386.md ("eh_return"): Remove first argument. * config/mips/mips.md ("eh_return"): Likewise. * config/rs6000/rs6000.md ("eh_return"): Likewise. * config/sh/sh.md ("eh_return"): Likewise. * config/s390/s390.h (EH_RETURN_STACKADJ_RTX): Remove. From-SVN: r66672
2003-05-07except.c: Revert 04-01 and 04-02 forced-unwind changes.Richard Henderson1-128/+21
gcc/ * except.c: Revert 04-01 and 04-02 forced-unwind changes. * flags.h, toplev.c, doc/invoke.texi: Likewise. * unwind-dw2.c (_Unwind_GetCFA): Fix ptr->int conversion warning. * unwind.inc (_Unwind_DeleteException): Check for null exception_cleanup. * unwind-sjlj.c (_Unwind_SjLj_Resume_or_Rethrow): New. * unwind.inc (_Unwind_Resume_or_Rethrow): New. * unwind.h: Declare them. * libgcc-std.ver (GCC_3.3): Export them. gcc/cp/ * cfns.gperf: Comment out POSIX thread cancellation points, plus abort and raise. * cfns.h: Regenerate. gcc/testsuite/ * g++.dg/eh/forced1.C: Expect catch-all handlers to run. Verify exception_cleanup not called for rethrows. * g++.dg/eh/forced2.C: Test that exception_cleanup is called when exiting catch block without rethrowing. * g++.dg/eh/forced3.C: New. * g++.dg/eh/forced4.C: New. libstdc++-v3/ * libsupc++/eh_catch.cc (__cxa_begin_catch): Handle foreign exceptions. (__cxa_end_catch): Likewise. * libsupc++/eh_throw.cc (__cxa_rethrow): Likewise. Use _Unwind_Resume_or_Rethrow. * libsupc++/eh_personality.cc (empty_exception_spec): New. (PERSONALITY_FUNCTION): Don't ignore terminate or catch-all for _UA_FORCE_UNWIND. Honor empty filter spec for foreign exceptions. Don't push terminate/unexpected to cxa functions. (__cxa_call_unexpected): Remove foreign exception fixmes. From-SVN: r66583
2003-04-22Makefile.in (calls.o): Depend on except.h.Mark Mitchell1-21/+45
* Makefile.in (calls.o): Depend on except.h. * calls.c: Include except.h. (emit_call_1): Call note_eh_region_may_contain_throw if appropriate. * except.c (eh_region): Add may_contain_throw. (expand_eh_region_end_cleanup): Do not include handler code when it cannot be reached. (note_eh_region_may_contain_throw): New function. * except.h (note_eh_region_may_contain_throw): New function. * call.c (build_over_call): Use build_cxx_call. (build_cxx_call): New method, split out of build_over_call. * cp-tree.h (language_function): Add can_throw. (build_cxx_call): Declare it. * decl.c (finish_function): If a function does not contain any calls to functions that can throw an exception, indicate that fact. * decl2.c (mark_used): Do not defer the instantiation of functions, if the current function does not throw. * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones. * pt.c (instantiate_decl): Make sure import_export_decl is called before emitting things. * rtti.c (throw_bad_cast): Use build_cxx_call. (build_dynamic_cast_1): Likewise. * typeck.c (build_function_call): Likewise. * g++.dg/template/recurse.C: Adjust location of error messages. From-SVN: r65929
2003-04-15except.c (resolve_fixup_regions): Avoid dereferencing null pointer to region...Olivier Hainque1-1/+1
* except.c (resolve_fixup_regions): Avoid dereferencing null pointer to region, possible after integration of function with unreachable regions that were optimized away. From-SVN: r65631
2003-04-02except.c (sjlj_find_directly_reachable_regions): Recognize when ↵Richard Henderson1-0/+2
must-not-throw region has been deleted. * except.c (sjlj_find_directly_reachable_regions): Recognize when must-not-throw region has been deleted. From-SVN: r65170
2003-04-01except.c (convert_from_eh_region_ranges_1): Smash REG_EH_REGION notes for ↵Richard Henderson1-23/+123
nothrow calls if flag_forced_unwind_exceptions. * except.c (convert_from_eh_region_ranges_1): Smash REG_EH_REGION notes for nothrow calls if flag_forced_unwind_exceptions. (build_post_landing_pads): Mind flag_forced_unwind_exceptions. (sjlj_find_directly_reachable_regions): Likewise. (reachable_handlers): Likewise. (can_throw_external): Likewise. (collect_one_action_chain): Record cleanups after catch-all and must-not-throw if flag_forced_unwind_exceptions. * flags.h (flag_forced_unwind_exceptions): Declare. * toplev.c (flag_forced_unwind_exceptions): New. (lang_independent_options): Add it. * doc/invoke.text: Add it. * g++.dg/eh/forced1.C: New. * g++.dg/eh/forced2.C: New. From-SVN: r65158
2003-03-17re PR c++/8805 (compile time regression with many member variables)Mark Mitchell1-4/+16
PR c++/8805 * except.c (eh_region_u_cleanup): Add prev_try. (expand_eh_region_end_cleanup): Set it. (reachable_handlers): Use it to skip over cleanup blocks. PR c++/8805 * g++.dg/eh/cleanup1.C: New test. From-SVN: r64465
2003-01-17et-forest.c: Fix comment typos.Kazu Hirata1-1/+1
* et-forest.c: Fix comment typos. * et-forest.h: Likewise. * except.c: Likewise. * expr.c: Likewise. * flags.h: Likewise. * flow.c: Likewise. * gcc.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * gengtype.c: Likewise. * genrecog.c: Likewise. * global.c: Likewise. * gthr-rtems.h: Likewise. From-SVN: r61443
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-3/+5
From-SVN: r60174
2002-11-28except.c (default_exception_section): Move variable into the scope where it ↵Kaveh R. Ghazi1-2/+2
is used. * except.c (default_exception_section): Move variable into the scope where it is used. From-SVN: r59593
2002-11-26varasm.c (default_exception_section): Move to...Jakub Jelinek1-0/+27
* varasm.c (default_exception_section): Move to... * except.c (default_exception_section): ... here. Make .gcc_except_table read-only if it is not expected to have any dynamic relocations and linker handles it. * dwarf2out.c (default_eh_frame_section): Make .eh_frame read-only if it is not expected to have any dynamic relocations and linker handles it. * configure.in (HAVE_LD_RO_RW_SECTION_MIXING): Check what ld does when linking read-only and read-write sections together. * configure, config.in: Rebuilt. * crtstuff.c (EH_FRAME_SECTION_CONST): Define. (__EH_FRAME_BEGIN__, __FRAME_END__): Add it. From-SVN: r59507
2002-09-26except.c (expand_builtin_extract_return_address): Handle case where Pmode != ↵Eric Christopher1-0/+10
ptr_mode. 2002-09-24 Eric Christopher <echristo@redhat.com> * except.c (expand_builtin_extract_return_address): Handle case where Pmode != ptr_mode. From-SVN: r57552
2002-09-22dbxout.c: Follow spelling conventions.Kazu Hirata1-1/+1
* dbxout.c: Follow spelling conventions. * defaults.h: Likewise. * df.c: Likewise. * diagnostic.h: Likewise. * doloop.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * flags.h: Likewise. * flow.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * genconfig.c: Likewise. * genrecog.c: Likewise. * ggc-page.c: Likewise. * ggc.h: Likewise. * global.c: Likewise. * gthr-win32.h: Likewise. * integrate.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * langhooks.h: Likewise. * line-map.h: Likewise. * local-alloc.c: Likewise. * longlong.h: Likewise. * loop.c: Likewise. * loop.h: Likewise. From-SVN: r57406
2002-08-25function.h (struct function): Add flag all_throwers_are_sibcalls.Stuart Hastings1-9/+34
2002-08-24 Stuart Hastings <stuart@apple.com> * function.h (struct function): Add flag all_throwers_are_sibcalls. * except.c (set_nothrow_function_flags): Replaces nothrow_function_p. Set new flag. * except.h (set_nothrow_function_flags): Replaces nothrow_function_p. * dwarf2out.c (struct dw_fde_struct): Add flag all_throwers_are_sibcalls. (output_call_frame_info): Test it. (dwarf2out_begin_prologue) Propagate it from cfun to dw_fde_struct. * toplev.c (rest_of_compilation): Update calls to nothrow_function_p. From-SVN: r56561
2002-07-09except.c (expand_eh_region_end_cleanup): Change exception pointer from Pmode ↵Steve Ellcey1-4/+4
to ptr_mode. * gcc/except.c (expand_eh_region_end_cleanup): Change exception pointer from Pmode to ptr_mode. (get_exception_pointer): Ditto. (connect_post_landing_pads): Ditto. (dw2_build_landing_pads): Ditto. From-SVN: r55341
2002-06-19* except.c (ehl_free): Remove.Matt Kraai1-9/+0
From-SVN: r54794
2002-06-17function.h (struct function): Rename profile_label_no.Richard Henderson1-15/+8
* function.h (struct function) [funcdef_no]: Rename profile_label_no. (current_function_funcdef_no): Similarly. * function.c (funcdef_no): Similarly. (prepare_function_start): Set current_function_funcdef_no. (expand_function_start): Don't set current_function_profile_label_no. * dwarf2out.h (current_funcdef_number): Remove. * dwarf2out.c (current_funcdef_number): Remove. Replace with current_function_funcdef_no throughout. * dwarfout.c, vmsdbgout.c: Similarly. * except.c (sjlj_funcdef_number): Remove. (sjlj_emit_function_enter): Use current_function_funcdef_no instead. (output_function_exception_table): Likewise. * final.c (profile_function): Use current_function_funcdef_no instead of current_function_profile_label_no. From-SVN: r54709
2002-06-11Delete SEQUENCE rtl usage outside of reorg and ssa passes.David S. Miller1-9/+9
2002-06-05 David S. Miller <davem@redhat.com> Delete SEQUENCE rtl usage outside of reorg and ssa passes. * rtl.h (gen_sequence, emit_insns, emit_insns_before, emit_insns_before_scope, emit_insns_after, emit_insns_after_scope): Delete declaration. * ada/misc.c (insert_code_for): Use emit_insn* instead of emit_insns_foo. * config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE. (alpha_set_memflags): Fix comment. (set_frame_related_p): Use get_insns instead of gen_sequence. * config/alpha/alpha.md (setjmp receiver splitter): Avoid emitting no insns. * config/arm/arm.c (arm_finalize_pic): Use get_insns instead of gen_sequence. (arm_gen_load_multiple, arm_gen_store_multiple): Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/ia64/ia64.md (conditional move spliiter): Avoid emitting no insns. * config/m32r/m32r.c (gen_split_move_double): Use get_insns instead of gen_sequence. * config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise. (mips_expand_prologue, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_need_epilogue): Likewise. * config/sparc/sparc.md (current_function_calls_alloca, flat): New attributes. (setjmp pattern and split): Use them to avoid splitter which emits no RTL. * genattrtab.c (main): Emit include of function.h * config/stormy16/stormy16.c (xstormy16_split_cbranch): Use get_insns instead of gen_sequence. * config/cris/cris.c (cris_split_movdx): Likewise. * emit-rtl.c (emit_insns*): Kill. (try_split): Expect insn list instead of SEQUENCE. (make_jump_insn_raw, make_call_insn_raw): Fix comments. (emit_*insn*): Reimplement to work with INSN lists and PATTERNs. Make them abort if a SEQUENCE is given and RTL checking is enabled. (emit_*_scope): Don't forget to set scope on final insn. (gen_sequence): Move from here... * ssa.c (gen_sequence): To here as private function. * builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix comments. (expand_builtin_return, expand_builtin_mathfn): Likewise. (expand_builtin_strlen): Use get_insns instead of gen_sequence. (expand_builtin_saveregs): Use emit_insn_foo, fix comments. (expand_builtin_expect_jump): Use get_insns and fix comments. * calls.c (try_to_integrate): Use emit_insn_foo. (expand_call, emit_library_call_value_1): Likewise. * expr.c (emit_queue): Handle insn lists instead of SEQUENCE. (emit_move_insn_1): Use get_insns instead of gen_sequence. (expand_expr): Use emit_insn_foo. * cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo. * except.c (build_post_landing_pads): Likewise. * flow.c (attempt_auto_inc): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label, expand_nl_goto_receivers, expand_decl_cleanup): Likewise. * function.c (fixup_var_refs_insn): Use get_insns instead of gen_sequence. (fixup_var_refs_1): Likewise and expect insn list from gen_foo. (fixup_memory_subreg): Use get_insns instead of gen_sequence. (fixup_stack_1, purge_addressof_1, expand_main_function, get_arg_pointer_save_area): Likewise. (optimize_bit_field, instantiate_virtual_regs_1, assign_parms, expand_function_end): Use emit_insn_foo. (record_insns, keep_stack_depressed): Work with insn list instead of SEQUENCE, fix comments. * ifcvt.c (noce_emit_store_flag, noce_try_store_flag, noce_try_store_flag_constants, noce_try_store_flag_inc, noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Use emit_insn_foo. (noce_process_if_block): Use get_insns instead of gen_sequence. * optabs.c (add_equal_note): Work with insn list, fix comments. (expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo. (expand_unop, expand_complex_abs, expand_unop_insn, expand_no_conflict_block): Likewise. (gen_move_insn): Use get_insns instead of gen_sequence. (gen_cond_trap): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. (emit_initial_value_sets): Use emit_insn_foo. * reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise. (fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently now that RTL generators give insn lists. * sibcall.c (replace_call_placeholder): Use emit_insn_foo. * doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns instead of gen_sequence. (doloop_optimize): Work with insn lists instead of SEQUENCE rtl. * explow.c (emit_stack_save, emit_stack_restore): Use get_insns instead of gen_sequence. * loop.c (move_movables, emit_prefetch_instructions, gen_add_mult, check_dbra_loop, gen_load_of_final_value): Likewise. (loop_regs_update): Work with insn list instead of SEQUENCE rtl. (product_cheap_p): Likewise, and add commentary about RTL wastage here. * lcm.c (optimize_mode_switching): Use get_insns instead of gen_sequence. * profile.c (gen_edge_profiler): Likewise. * regmove.c (copy_src_to_dest): Likewise. * reg-stack.c (compensate_edge): Likewise and fix comment. * gcse.c (process_insert_insn): Likewise. (insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl. * jump.c (delete_prior_computation): Update comment. * genemit.c (gen_expand, gen_split, main): Use get_insns instead of gen_sequence, update comments to match. * recog.c (peephole2_optimize): Work with insn lists instead of SEQUENCE rtl. * sched-vis.c (print_pattern): Abort on SEQUENCE. * unroll.c (unroll_loop, find_splittable_givs, final_giv_value): Use get_insns instead of gen_sequence. (copy_loop_body): Likewise and don't emit dummy NOTE. * genrecog.c: Don't mention SEQUENCE rtl in comments. * combine.c (try_combine): Expect insn lists from split generator. * reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by hand. From-SVN: r54497
2002-06-04Merge from pch-branch up to tag pch-commit-20020603.Geoffrey Keating1-282/+57
From-SVN: r54232
2002-06-03except.c (except.c): Do not rebuild CFG.Jan Hubicka1-2/+0
* except.c (except.c): Do not rebuild CFG. * toplev.c (rest_of_compilation): Recompute CFG after sibcall optimization. From-SVN: r54217
2002-06-03emit-rtl.c: Likewise.Kazu Hirata1-17/+17
* emit-rtl.c: Likewise. * errors.h: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. From-SVN: r54197
2002-05-31*** empty log message ***Alan Lehotsky1-1/+1
From-SVN: r54136
2002-05-23basic-block.h (CLEANUP_NO_INSN_DEL): Define it.David S. Miller1-2/+2
2002-05-23 David S. Miller <davem@redhat.com> * basic-block.h (CLEANUP_NO_INSN_DEL): Define it. * cfgcleanup.c (cleanup_cfg): If it is set do not attempt to delete trivially dead insns. * except.c (finish_eh_generation): Pass it to cleanup_cfg. * toplev.c (rest_of_compilation): Document non-trivial aspect the RTL before optimize_save_area_alloca is run. From-SVN: r53789
2002-04-16re PR c++/6320 (3.1 regression wrt 3.0: ICE in remove_eh_handler, at ↵Richard Henderson1-20/+22
except.c:2696) PR c++/6320 * except.c (remove_eh_handler): Insert inner regions at beginning of sibling chain. Refactor expressions. * g++.dg/eh/dead1.C: New. From-SVN: r52397
2002-04-10except.c (add_ehl_entry): Allow duplicates after landing pad creation.Richard Henderson1-1/+7
* except.c (add_ehl_entry): Allow duplicates after landing pad creation. From-SVN: r52149
2002-04-09basic-block.h (flow_delete_block_noexpunge): Declare.Richard Henderson1-49/+199
* basic-block.h (flow_delete_block_noexpunge): Declare. (expunge_block_nocompact): Declare. * cfg.c (expunge_block_nocompact): Split out from ... (expunge_block): ... here. * cfgrtl.c (can_delete_label_p): Don't use exception_handler_labels. (flow_delete_block_noexpunge): Split out from ... (flow_delete_block): ... here. * cfgcleanup.c (delete_unreachable_blocks): Compact while removing dead blocks. * except.c (exception_handler_labels): Remove. (exception_handler_label_map): New. (struct eh_region): Add aka member. (mark_ehl_map_entry, mark_ehl_map, free_region): New. (ehl_hash, ehl_eq, ehl_free, add_ehl_entry): New. (for_each_eh_label, for_each_eh_label_1): New. (init_eh): Register exception_handler_label_map. (free_eh_status): Use free_region. (find_exception_handler_labels): Use the map, not the list. (remove_exception_handler_label): Likewise. (maybe_remove_eh_handler): Likewise. (remove_eh_handler): Use the region aka bitmap. * except.h (exception_handler_labels): Remove. (for_each_eh_label): Declare. * jump.c (rebuild_jump_labels): Don't check exception_handler_labels. * loop.c (invalidate_loops_containing_label): New. (find_and_verify_loops): Use it. Use for_each_eh_label. * sched-rgn.c (is_cfg_nonregular): Use current_function_has_exception_handlers. From-SVN: r52100
2002-04-03re PR c++/5636 (gcc-3.0.3, memory leakage: function that take a string as ↵Jason Merrill1-56/+0
parameter will not call local variable destructors if exception is thrown.) PR c++/5636 * tree.h (CLEANUP_EH_ONLY): New macro. * stmt.c (expand_decl_cleanup_eh): New fn. (expand_cleanups): Check CLEANUP_EH_ONLY. * c-semantics.c (genrtl_decl_cleanup): Just take the CLEANUP_STMT. Use expand_decl_cleanup_eh. (expand_stmt): Adjust. * c-common.h: Adjust prototype. * cp/semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on cleanup for nrv. * except.c (struct eh_status): Remove protect_list. (begin_protect_partials, end_protect_partials): Remove. (add_partial_entry): Remove. * except.h: Remove prototypes. * expr.c (expand_expr) [WITH_CLEANUP_EXPR, TARGET_EXPR]: Use expand_decl_cleanup_eh. cp/: * semantics.c (finish_eh_cleanup): New fn. * cp-tree.h: Add prototype. * init.c (perform_member_init, expand_cleanup_for_base): Use finish_eh_cleanup. * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove. * cp-tree.h: Remove references. * decl.c (begin_constructor_body, end_constructor_body): Likewise. * dump.c (cp_dump_tree): Likewise. * pt.c (tsubst_expr): Likewise. * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove. (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT. * tree.c (cp_statement_code_p): Likewise. * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup. From-SVN: r51827
2002-03-29Makefile.in (convert.o, [...]): Update.Neil Booth1-1/+2
* Makefile.in (convert.o, calls.o, expmed.o): Update. * attribs.c (handle_mode_attribute, handle_vector_size_attribute): Use new hooks. * builtin-types.def (BT_PTRMODE): Update. * c-common.c (type_for_size): Rename c_common_type_for_size. (type_for_mode): Similarly. (shorten_compare, pointer_int_sum, c_common_nodes_and_builtins): Use new hook. * c-bommon.h (c_common_type_for_size, c_common_type_for_mode): New. * c-decl.c (finish_enum, build_enumerator): Use new hooks. * c-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * c-typeck.c (common_type, comptypes, default_conversion): Use new hooks. * calls.c: Include langhooks.h. (emit_library_call_value_1): Use new hooks. Avoid redundant calls. * convert.c: Include langhooks.h (convert_to_pointer, convert_to_integer): Use new hooks. * except.c (init_eh): Similarly. * expmed.c: Include langhooks.h. (expand_mult_add): Use new hooks. * expr.c (store_expr, store_constructor, expand_expr, do_jump, try_casesi): Similarly. * fold-const.c (optimize_bit_field_compare, make_range, decode_field_reference, fold_truthop, fold): Similarly. * function.c (assign_stack_local_1, assign_stack_temp_for_type, put_var_into_stack): Similarly. * langhooks-def.h (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): New. (LANG_HOOKS_TYPES_INITIALIZER): Update. * langhooks.h (lang_hooks_for_types): New hooks. * stmt.c (expand_decl_cleanup, emit_case_nodes): Use new hooks. * tree.c (get_unwidened, get_narrower): Similarly. * tree.h (type_for_mode, type_for_size): Remove. * varasm.c (force_const_mem): Use new hooks. ada: * gigi.h (type_for_size, type_for_mode): Rename. * misc.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * trans.c (tree_transform): Update. * utils.c (gnat_init_decl_processing, init_gigi_decls, builtin_function, float_type_for_size, signed_or_unsigned_type, build_vms_descriptor, unchecked_convert): Update. (type_for_mode, type_for_size): Rename. * utils2.c (nonbinary_modular_operation): Update. cp: * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks. * decl.c (finish_enum): Similarly. * error.c (dump_type): Similarly. * lex.c (cxx_init): Similarly. * mangle.c (write_builtin_type): Similarly. * typeck.c (comptypes): Similarly. f: * com.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. (type_for_mode, type_for_size): Rename. (signed_or_unsigned_type, signed_type, truthvalue_conversion, unsigned_type): Use new hooks. java: * Make-lang.in (builtins.o): Update. * boehm.c (get_boehm_type_descriptor): Update. * builtins.c: Include langhooks.h. * decl.c (java_init_decl_processing): Update. * java-tree.h (java_type_for_mode, java_type_for_size): New. * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): Redefine. * typeck.c (type_for_mode, type_for_size): Update. objc: * objc-act.c (handle_impent): Update. * objc-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): Redefine. From-SVN: r51571
2002-03-29Makefile.in (except.o): Update.Neil Booth1-1/+2
* Makefile.in (except.o): Update. * except.c: Include langhooks.h. (init_eh): Use langhook. * langhooks-def.h (LANG_HOOKS_MAKE_TYPE, LANG_HOOKS_FOR_TYPES_INITIALIZER): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (lang_hooks_for_types): New. (struct lang_hooks): Add it. * tree.c (make_lang_type_fn, make_lang_type): Remove. * tree.h (make_lang_type_fn, make_lang_type): Remove. config: * alpha/alpha.c: Include langhooks.h. (alpha_build_va_list): Use langhook. * d30v/d30v.c: Include langhooks.h. (d30v_build_va_list): Use langhook. * i386/i386.c: Include langhooks.h. (ix86_build_va_list): Use langhook. * rs6000/rs6000.c (rs6000_build_va_list): Use langhook. * s390/s390.c: Include langhooks.h. (s390_build_va_list): Use langhook. * stormy16/stormy16.c: Include langhooks.h. (stormy16_build_va_list): Use langhook. cp: * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine. * cp-tree.h (cp_make_lang_type): Rename. * lex.c (cp_make_lang_type): Rename. (make_aggr_type): Update. * tree.c (init_tree): Don't set make_lang_type_fn. From-SVN: r51558
2002-03-19except.c (current_function_has_exception_handlers): New.Richard Henderson1-0/+17
* except.c (current_function_has_exception_handlers): New. * except.h: Declare it. * sibcall.c (optimize_sibling_and_tail_recursive_call): Use it. Combine tests that disable all sibcalls for the function. From-SVN: r51054
2002-02-21re PR c++/4574 (Internal compiler error in `expand_and', at expmed.c:4055)Jakub Jelinek1-1/+1
PR c++/4574 * expr.h (expand_and): Add mode argument. * expmed.c (expand_and): Add mode argument. (expand_mult_highpart_adjust, emit_store_flag): Adjust callers. * expr.c (store_field, expand_expr, do_store_flag): Likewise. * except.c (expand_builtin_extract_return_addr): Likewise. * config/alpha/alpha.c (alpha_initialize_trampoline): Likewise. * config/sparc/sparc.c (sparc_initialize_trampoline): Likewise. * config/c4x/c4x.h (INITIALIZE_TRAMPOLINE): Likewise. Use GEN_INT (x) instead of gen_rtx (CONST_INT, VOIDmode, x). * config/c4x/c4x.md: Use GEN_INT (x) instead of gen_rtx (CONST_INT, VOIDmode, x). * gcc.dg/20020220-1.c: New test. From-SVN: r49938
2002-01-17except.c (add_partial_entry): Remove backwards compatibility code.Jason Merrill1-16/+0
* except.c (add_partial_entry): Remove backwards compatibility code. (end_protect_partials): Likewise. From-SVN: r48951
2002-01-14except.c (remove_unreachable_regions): New.Jakub Jelinek1-1/+72
* except.c (remove_unreachable_regions): New. (free_eh_status): Clear exception_handler_labels. (convert_from_eh_region_ranges): Call remove_unreachable_regions. (find_exception_handler_labels): Don't add the same label more than once. (remove_exception_handler_label): Don't die if find_exception_handler_labels hasn't been called for the current function yet. From-SVN: r48845
2002-01-03except.c: Fix comment typos.Kazu Hirata1-2/+2
* except.c: Fix comment typos. * loop.c: Likewise. * varasm.c: Likewise. * doc/tm.texi: Fix a typo. From-SVN: r48488
2001-12-28except.c: Fix comment formatting.Kazu Hirata1-1/+1
* except.c: Fix comment formatting. * flags.h: Likewise. * flow.c: Likewise. * predict.c: Likewise. * simplify-rtx.c: Likewise. * system.h: Likewise. * vmsdbg.h: Likewise. * vmsdbgout.c: Likewise. From-SVN: r48349
2001-12-14tweak commentJason Merrill1-1/+6
From-SVN: r47998
2001-12-12except.c (reachable_next_level): Handle ERT_UNKNOWN to avoid compiler ↵Roger Sayle1-33/+34
warning about enumeration values not being... 2001-12-11 Roger Sayle <roger@eyesopen.com> * except.c (reachable_next_level): Handle ERT_UNKNOWN to avoid compiler warning about enumeration values not being handled. From-SVN: r47926
2001-12-11except.c (sjlj_find_directly_reachable_regions): Don't consider RNL_BLOCKED ↵Richard Henderson1-8/+10
a directly reachable region. * except.c (sjlj_find_directly_reachable_regions): Don't consider RNL_BLOCKED a directly reachable region. (sjlj_assign_call_site_values): Trust directly_reachable. (sjlj_emit_dispatch_table): Likewise. From-SVN: r47915
2001-11-23ChangeLog.0, [...]: Fix spelling errors.Joseph Myers1-5/+5
* ChangeLog.0, ChangeLog.2, ChangeLog.3, ChangeLog.4, ChangeLog, FSFChangeLog.10, c-decl.c, cppfiles.c, cppinit.c, cpplex.c, cpplib.c, cppmain.c, cse.c, df.c, diagnostic.c, dominance.c, dwarf2out.c, dwarfout.c, emit-rtl.c, errors.c, except.c, except.h, explow.c, function.c, gcse.c, genrecog.c, predict.c, regmove.c, sched-rgn.c, ssa-ccp.c, stmt.c, toplev.c: Fix spelling errors. From-SVN: r47279
2001-11-17except.c (enum eh_region_type): Add ERT_UNKNOWN.Richard Kenner1-1/+6
* except.c (enum eh_region_type): Add ERT_UNKNOWN. (mark_eh_region, case ERT_UKNONW): New case. From-SVN: r47123
2001-11-16except.c: Support for catching a list of types with a single handler (struct ↵Olivier Hainque1-39/+154
eh_region):... * except.c: Support for catching a list of types with a single handler (struct eh_region): Change type and filter to lists for catch regions. (mark_eh_region): Mark the filter list for GC also. (expand_start_catch): Always build a list if argument not NULL and register each type of the list through add_type_for_runtime. (duplicate_eh_region_1): Change type into type_list for catch regions. (assign_filter_values): Assign a filter to each type associated with a catch region. Assign filter for NULL types in a unique entry in the filter list. (build_post_landing_pads): Emit compare and jump for each filter of the list associated with a catch region. (reachable_next_level): When the type thrown is known, stop the search as soon as one type within a catch list matches. Also, a handler is potentially reachable only if at least one of the types it catches has not been previously caught. (collect_one_action_chain): Retrieve the filter for a NULL type list from the first filter list entry. For non NULL type lists, add an action record for every filter assigned. * except.h: Reflect changes in comment before expand_start_catch. From-SVN: r47087