aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.h
AgeCommit message (Collapse)AuthorFilesLines
2007-01-10function.c (get_last_funcdef_no): New function.Razya Ladelsky1-0/+1
2007-01-10 Razya Ladelsky <razya@il.ibm.com> * function.c (get_last_funcdef_no): New function. * function.h (get_last_funcdef_no): Declare. * tree-inline.c (initialize_cfun): Add initialization. (tree_function_versioning): Cleanup. From-SVN: r120638
2006-12-16omp-low.c (expand_omp_parallel): Set function properties.Jan Hubicka1-0/+4
* omp-low.c (expand_omp_parallel): Set function properties. * function.h (struct function): Add curr_properties and last_verified. * passes.c (register_dump_files): Do not set TODO_set_props for the first pass (init_optimization_passes): Set it here; reorder initialization so the dump files appear in more logical order. (last_verified, curr_properties): Kill. (do_per_function): New function. (execute_function_todo): Break out from ... (execute_todo): ... here; handle per-function flags. (clear_last_verified, verify_curr_properties, update_properties_after_pass): New functions. (execute_one_pass): Handle per-function properties. (execute_ipa_pass_list): Use do_per_function; sanity check that cfun and current_function_decls are cleared out. * ipa-cp.c (constant_val_insert): Clear cfun/current_function_decl after use. From-SVN: r119966
2006-12-13Makefile.in: Add dependencies.Jan Hubicka1-0/+4
* Makefile.in: Add dependencies. * tree-pretty-print.c: Include value-prof.h (dump_generic_bb_buff): Dump histograms * value-prof.c: Include pointer-set.h (gimple_alloc_histogram_value, histogram_hash, histogram_eq, set_histogram_value, gimple_histogram_value, gimple_add_histogram_value, gimple_remove_histogram_value, gimple_histogram_value_of_type, dump_histogram_value, dump_histograms_for_stmt, gimple_remove_stmt_histograms, gimple_duplicate_stmt_histograms, visit_hist, verify_histograms): New functions. (tree_value_profile_transformations): Update for new histogram API. (tree_divmod_fixed_value): Update for new histogram API. (tree_divmod_fixed_value_transform): Update for new histogram API. (tree_mod_pow2): Update for new histogram API. (tree_mod_pow2_value_transform): Update for new histogram API. (tree_mod_subtract): Update for new histogram API. (tree_mod_subtract_transform): Update for new histogram API. (tree_stringops_transform): Update for new histogram API. (tree_divmod_values_to_profile): Update for new histogram API. (tree_stringops_values_to_profile): Update for new histogram API. (tree_find_values_to_profile): Update for new histogram API. * value-prof.h (gimple_histogram_value): Declare. (gimple_histogram_value_of_type): Declare. (gimple_add_histogram_value): Declare. (gimple_remove_histogram_value): Declare. (dump_histograms_for_stmt): Declare. (gimple_remove_histogram_value): Declare. (gimple_remove_stmt_histograms): Declare. (gimple_duplicate_stmt_histograms): Declare. (verify_histograms): Declare. * function.h (struct funrction): Add value_histograms hash. (VALUE_HISTOGRAMS): New macro. * profile.c (compute_value_histograms): update for new API. * tree-inline.c: Include value-prof.h (copy_bb): Update histograms. * tree-flow.h (struct stmt_ann_d): Do not contain pointer to histograms; reorder to get smaller memory layout. * tree-cfg.c: Include value-prof.h (bsi_remove): Update histograms. (bsi_replace): Update histograms. (verify_stmts): Call histogram verifier. (tree_duplicate_bb): Update histograms. (move_block_to_fn): Update histograms. From-SVN: r119829
2006-12-05Merge gimple-tuples-branch into mainline.Aldy Hernandez1-0/+5
From-SVN: r119546
2006-11-28Privatize SSA variables into gimple_df.Jan Hubicka1-0/+3
* tree-flow-inline.h (gimple_in_ssa_p, gimple_aliases_computed_p, gimple_addressable_vars, gimple_call_clobbered_vars, gimple_referenced_vars, gimple_global_var, gimple_nonlocal_all): New accessors. (first_referenced_var): Update. (mark_stmt_modified): Update. (is_call_clobbered): Update. (mark_call_clobbered): Update. (clear_call_clobbered): Update. (mark_non_addressable): Update. * tree-vrp.c (get_value_range): Update. * tree-into-ssa.c (in_ssa_p): Kill. (get_default_def_for): Update. (rewrite_into_ssa): Update. * tree-complex.c (init_parameter_lattice_values): Update. (update_complex_assignment): Update. (update_parameter_components): Update. (expand_complex_libcall): Update. (expand_complex_operations_1): Update. * tree-tailcall.c (arg_needs_copy_p): Update. (add_virtual_phis): Update. (tree_optimize_tail_calls_1): Update. * tree-ssa-dse.c (memory_ssa_name_same): Update. * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Update. * tree-ssa-math-opts.c (execute_cse_reciprocals): Update. * tree-ssa-propagate.c (set_rhs): Update. * tree-ssa-alias.c (aliases_computed_p, call_clobbered_vars, addressable_vars, global_var):Kill. (set_initial_properties): Update. (init_alias_info): Update. (finalize_ref_all_pointers): Update. (setup_pointers_and_addressables): Update. (maybe_create_global_var): Update. (create_global_var): Update. (dump_points_to_info): Update. * function.h (struct gimple_df): Forward declare. (struct function): Add GIMPLE_DF field. * gimplify.c (force_gimple_operand): Update. * tree-dfa.c (referenced_vars, default_defs): KIll. (make_rename_temp): Update. (dump_variable): Update. (referenced_var_lookup): Update. (referenced_var_check_and_insert): Update. (default_def): Rename to ... (gimple_default_def): ... this one; accept cfun argument. (set_default_def): Update. * tree-cfgcleanup.c (modified_noreturn_calls): Kill. (cleanup_control_flow): Update. * tree-ssa-pre.c (compute_avail): Update * tree-ssa-live.c (calculate_live_on_entry): Update. * tree-ssa.c (verify_use): Update. (verify_call_clobbering): Update. (verify_call_clobbering): Update. (init_tree_ssa): Update. (delete_tree_ssa): Update. * tree-outof-ssa.c (coalesce_ssa_name): Update. (rewrite_out_of_ssa): Update. * tree-flow.h (gimple_df): New structure collecting dataflow variables. (FREE_SSANAMES, SSANAMES, MODIFIED_NORETURN_CALLS, DEFAULT_DEFS): New private accessors. (in_ssa_p, modified_noreturn_calls, referenced_vars, default_defs, ssa_names, global_var, nonlocal_all, call_clobbered_vars, addressable_vars, aliases_computed_p): Kill. (default_def): Rename to... (gimple_default_def): ... this one. (defaule_def_fn): Kill. (num_referenced_vars, ssa_names, num_ssa_names): Update. * tree-ssa-structalias.c (nonlocal_all): Kill. (get_constraint_exp_from_ssa_var): Update. (create_nonlocal_var): Update. (get_constraint_for): Update. (update_alias_info): Update. (find_global_initializers): Update. (intra_create_variable_infos): Update. (intra_create_variable_infos): (find_what_p_points_to): Update. (init_alias_heapvars): Update. * tree-cfg.c (remove_bb): Update. (gimplify_val): Update. * tree-ssa-reassoc.c (get_rank): Update. (init_reassoc): Update. * tree-ssanames.c: Do not include gt-tree-ssanames.h (ssa_names, free_ssanames): Kill. (init_ssanames): Update. (make_ssa_name): Update. (release_ssa_name): Update. (release_defs): Update. (replace_ssa_name_symbol): Update. * tree-ssa-operands.c (access_can_touch_variable): Update. (add_virtual_operand): Update. (add_call_clobber_ops): Update. (add_call_read_ops): Update. (get_call_expr_operands): Update. (get_asm_expr_operands): Update. From-SVN: r119294
2006-11-17tree-vrp.c (execute_vrp): Do not update current_loops.Zdenek Dvorak1-0/+4
* tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-06-16function.h (enum function_frequency): Move declaration out of struct function.Richard Guenther1-26/+27
2006-06-16 Richard Guenther <rguenther@suse.de> * function.h (enum function_frequency): Move declaration out of struct function. (struct function): Move bool fields and the enum to the bitfield section. Reorder elements to avoid padding. Remove unused fields left over from the RTL inliner removal. * function.c (free_after_compilation): Do not zero removed fields. * Makefile.in (ipa-reference.o): Add $(FUNCTION_H) dependency. (ipa-type-escape.o): Likewise. From-SVN: r114712
2006-05-05c-parser.c (c_parser_cast_expression): Only insert casts into hash table if ↵Aldy Hernandez1-1/+1
pointer. PR/21391 * c-parser.c (c_parser_cast_expression): Only insert casts into hash table if pointer. * function.c (used_types_insert_helper): Rename from used_types_insert. (used_types_insert): Call used_types_insert_helper. * function.h (used_types_insert): Accept only one argument. * cp/typeck.c (build_static_cast_1): Save casted types in used types hash table. (build_reinterpret_cast_1): Same. * cp/rtti.c (build_dynamic_cast_1): Same. * testsuite/g++.dg/other/unused1.C: New. From-SVN: r113561
2006-04-18function.c (temp_slots_at_level, [...]): Use VEC instead of VARRAY.Kazu Hirata1-1/+7
* function.c (temp_slots_at_level, max_slot_level): Use VEC instead of VARRAY. * function.h (temp_slot_p): New. (function): Change the type of x_used_temp_slots to VEC(temp_slot_p,gc) *. From-SVN: r113029
2006-04-12Makefile.in (GTFILES): Move functions.h after tree.h.Kazu Hirata1-1/+1
* Makefile.in (GTFILES): Move functions.h after tree.h. * function.c (reset_block_changes, record_block_change, check_block_change, free_block_changes): Use VEC instead of VARRAY. * function.h (function): Change the type of ib_boundaries_block to VEC(tree,gc) *. * tree-inline.c (copy_cfg_body): Initialize ib_boundaries_block to NULL instead of (varray_type) 0. From-SVN: r112894
2006-04-1120060410.c: New.Aldy Hernandez1-0/+6
PR/21391 * testsuite/gcc.dg/20060410.c: New. * dwarf2out.c (struct die_struct): Add die_perennial_p field. (premark_used_types_helper): New. (premark_used_types): New. (gen_subprogram_die): Call premark_used_types. (prune_unused_types_walk): Do not prune perennial dies. * function.c (used_types_insert): New. * function.h (struct function): Add used_types_hash field. (used_types_insert): Add prototype. * Makefile.in (FUNCTION_H): Depend on HASHTAB_H. * c-parser.c (c_parser_cast_expression): Save casted types in used types hash table. From-SVN: r112845
2006-03-20function.h (struct function): Rename to x_stack_check_probe_note.Steven Bosscher1-2/+2
* function.h (struct function) <x_tail_recursion_reentry>: Rename to x_stack_check_probe_note. (tail_recursion_reentry): Rename to stack_check_probe_note. * function.c: Replace tail_recursion_reentry with stack_check_probe_note everywhere. (expand_function_start): Only emit a note for stack_check_probe_note with -fstack-protect. * stmt.c (expand_case): Don't emit NOTE_INSN_DELETED notes. * emit-rtl.c (remove_unnecessary_notes): Remove. (pass_remove_unnecessary_notes): Remove. * rtl.h (remove_unnecessary_notes): Remove prototype. * final.c (final_start_function): Don't call remove_unnecessary_notes. * tree-pass.h (pass_remove_unnecessary_notes): Remove. * passes.c (pass_remove_unnecessary_notes): Don't run it. From-SVN: r112229
2006-03-11function.h (frame_offset_overflow): Declare.Eric Botcazou1-0/+5
* function.h (frame_offset_overflow): Declare. * function.c (frame_offset_overflow): New function. (assign_stack_local_1): Call it to detect that the offset overflows. * cfgexpand.c (alloc_stack_frame_space): Likewise. From-SVN: r111964
2006-03-05function.c (use_return_register): Make it static.Kazu Hirata1-1/+0
* function.c (use_return_register): Make it static. * function.h: Remove the prototype. From-SVN: r111737
2006-03-04builtins.c, [...]: Fix comment typos.Kazu Hirata1-1/+1
* builtins.c, c-pragma.h, c-typeck.c, cgraph.c, cgraphunit.c, combine.c, common.opt, config/dfp-bit.c, config/i386/i386.c, config/m68k/m68k.c, config/m68k/m68k.md, config/mt/mt.c, config/mt/mt.h, config/s390/s390.md, df-core.c, df-problems.c, df-scan.c, df.h, diagnostic.c, expr.c, function.h, gimplify.c, loop-invariant.c, omp-low.c, opts.c, passes.c, rtl-factoring.c, rtlanal.c, struct-equiv.c, tree-cfgcleanup.c, tree-ssa-loop-niter.c, tree-ssa-loop-prefetch.c, tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-vect-patterns.c, tree-vect-transform.c, tree-vectorizer.h, tree-vrp.c, unwind-dw2.c: Fix comment typos. Follow spelling conventions. From-SVN: r111721
2006-01-28emit-rtl.c (init_virtual_regs): Make it static.Kazu Hirata1-2/+0
* emit-rtl.c (init_virtual_regs): Make it static. * function.h: Remove the prototype for init_virtual_regs. From-SVN: r110326
2006-01-18function.c (instantiate_virtual_regs): Make it static.Kazu Hirata1-1/+0
* function.c (instantiate_virtual_regs): Make it static. * function.h: Remove the prototype for instantiate_virtual_regs. From-SVN: r109874
2006-01-17Makefile.in (FUNCTION_H): New.Kazu Hirata1-0/+2
* Makefile.in (FUNCTION_H): New. Use it instead of function.h throughout the file. * function.h: Include tree.h. From-SVN: r109800
2006-01-11cgraph.c (cgraph_insert_node_to_hashtable): New function.Jan Hubicka1-11/+0
* cgraph.c (cgraph_insert_node_to_hashtable): New function. * cgraph.h (cgraph_node): Add inline_decl. (cgraph_insert_node_to_hashtable): Declare. (save_inline_function_body): Declare. * cgraphunit.c (verify_cgraph_node): Inline edges might point to inline clones. (cgraph_preserve_function_body_p): Do not presrve when dump is enabled. (cgraph_function_versioning): Update call of tree_function_versioning. (save_inline_function_body): New function. * function.h (struct function): Kill saved_eh, saved_cfg, saved_args, saved_static_chain_decl, saved_blocks and saved-unexpanded_var_list. * ipa-inline.c (cgraph_mark_inline_edge): Look for inline clones. (cgraph_default_inline_p): Likewise. (cgraph_decide_inlining_incrementally): Likewise. * tree-inline.c (inline_data): Kill saving_p add update_clones_p. (copy_bb): Kill saving; do updating of clones. (copy_cfg_body): Kill saving. (initialize_inlined-parameters): Likewise. (expand_call_inline): Likewise. (save_body): Kill. (tree_function_versioning): New parameter "update_clones". (inlining_p): Kill saving. * tree-inline.h (tree_function_versioning): Update prototype. * tree-optimize.c (tree_rest_of_compilation): Use clonning instead of saving. From-SVN: r109580
2005-08-19Fix uninitialized register read problem.James E Wilson1-0/+5
* builtins.c (expand_builtin_return_addr): Set current_function_accesses_prior_frames when count != 0. Use frame_pointer_rtx when count == 0. * function.h (struct function): Add accesses_prior_frames field. (current_function_accesses_prior_frames): Define. * reload1.c (init_elim_table): Check current_function_accesses_prior_frames. * doc/tm.texi (INITIAL_FRAME_ADDRESS_RTX): Update docs. From-SVN: r103294
2005-06-30function.h (struct function): Add saved blocks/unexpanded var list.Jan Hubicka1-0/+2
* function.h (struct function): Add saved blocks/unexpanded var list. * gimple-low.c (record_vars): Insert only VAR_DECLs. * tree-inline.c (add_lexical_block): Declare; do not clear sublocks. (remap_decl): Do not declare vars. (remap_block): Do not care inserting blocks. (remap_blocks): New function. (copy_body_r): Update debug info. (expand_call_inline): Duplicate callee block tree into caller; copy all the unexpanded_var_list. (save_body): Save unexpanded_var_list and blocks. * tree-optimize.c (tree_rest_of_optimization): Restore blocks/unexpanded_var_list. From-SVN: r101449
2005-06-27c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__.Richard Henderson1-0/+4
* c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-06-04function.c (prologue, [...]): Change their types to VEC(int,heap)*.Kazu Hirata1-3/+0
* function.c (prologue, epilogue, sibcall_epilogue): Change their types to VEC(int,heap)*. (free_after_compilation): Free the three vectors above. (init_function_for_compilation, record_insns, contains, prologue_epilogue_contains, sibcall_epilogue_contains, reposition_prologue_and_epilogue_notes): Use VEC instead of VARRAY. (init_function_once): Remove. * function.h: Remove the prototype for init_function_once. * toplev.c (backend_init): Don't call init_function_once. From-SVN: r100588
2005-05-17cgraph.h (cgraph_node): Add 'lowered' state.Steven Bosscher1-1/+2
* cgraph.h (cgraph_node): Add 'lowered' state. (cgraph_lower_function): Declare. * cgraphunit.c (cgraph_finalize_function): Initialize lowered flag. (cgraph_lower_function): New function. (cgraph_create_edges): Deal with lowered function bodies. (verify_cgraph_node): Likewise. (cgraph_analyze_function): Do lowering job. (cgraph_build_static_cdtor): Likewise. * function.h (struct function): Add saved_eh and saved_cfg. * integrate.c (copy_decl_for_inlining): Kill LABEL_DECL_UID field. * tree-cfg.c (fold_cond_expr_cond): Export. * tree-flow.h (fold_cond_expr_cond): Declare. * tree-inline.c: Include basic-block, ggc, tree-flow, except.h and pointer-set. (struct_inline_data): Kill fnd, first_inlined_fn, ret_label, in_target_cleanup_p, tree_pruner, tsi; add callee, caller and callee_cfun, block, eh_region, eh_region_offset. (inlining_p): New predicate. (remap_decl): Update for new inline_data; declare newly created inline vars in low gimple way. (copy_body_r): Update for new datastructure, simplify some of handling when we are in gimple; remap LABEL_DECLs for EH; copy TREE_BLOCK; deal with RESX_EXPRs. (copy_bb): New. (copy_edges_for_bb): Likewise. (remap_decl_1): New. (copy_cfg_body): New. (copy_generic_body): Rewrite to work on low gimple. (copy_body): Turn into simple wrapper around copy_cfg_body. (setup_one_parameter): Insert new statements into given basic block. (initialize_initialized_parameters): Likewise, reorganize way things are gimplified. (declare_return_variable): Update for new inline data datastructure. (inline_forbidden_p): Work on low gimple. (estimate_num_insns): Likewise. (expand_call_inline): Work on CFG. (push_cfun, pop_cfun): New functions. (cfun_stack): New stack. (add_lexical_block): New function. (gimple_expand_calls_inline): Work on basic block. (optimize_inline_calls): Likewise. (clone_body, save_body, unsave_ewpr_now): Update for new datastructures. (declare_inline_vars): Work on block instead of bind_expr. (inlining_p): New predicate. * tree-inline.h (push_cfun, pop_cfun): Declare. * tree-optimize.c: Include except.h (all_lowering_passes): New variable. (execute_fixup_cfg, pass_fixup_cfg): New pass. (init_tree_optimization_passes): Move some to all_lowering_passes. (tree_lowering_passes): New function. (tree_rest_of_compilation): Register cfg hooks; save/unsave eh. Co-Authored-By: Dale Johannesen <dalej@apple.com> Co-Authored-By: Jan Hubicka <jh@suse.cz> Co-Authored-By: Stuart Hastings <stuart@apple.com> From-SVN: r99840
2005-05-16bb-reorder.c (verify_hot_cold_block_grouping): Replace internal_error with ↵Caroline Tice1-4/+4
gcc_assert. 2005-05-16 Caroline Tice <ctice@apple.com> * bb-reorder.c (verify_hot_cold_block_grouping): Replace internal_error with gcc_assert. * dwarf2out.c (dwarf2out_switch_text_section): Likewise. * function.h (struct function): Remove space between "*" and struct field names. * varasm.c (initialize_cold_section_name): Add gcc_assert; modify to use alloca. (unlikely_text_section): Add check for flag_function_sections. (assemble_start_function): Move call to resolve_section, so it comes before first call to unlikely_text_section. (assemble_end_function): Add test and call to function_section if appropriate. From-SVN: r99796
2005-05-12except.c (duplicate_eh_region_1, [...]): New functions, based on old ↵Steven Bosscher1-0/+1
implementation removed with RTL inliner. * except.c (duplicate_eh_region_1, duplicate_eh_region_2, duplicate_eh_regions): New functions, based on old implementation removed with RTL inliner. (reachable_next_level): Modify behaviour pre-inline. * except.h (duplicate_eh_regions_map, duplicate_eh_regions): Declare. * function.h (struct function): Add after_inlining flag. * tree-optimize.c (tree_rest_of_compilation): Set it. * tree-eh.c (add_stmt_to_eh_region_fn): Initialize hashtable when needed. * tree-cfg.c (label_to_block_fn): Deal with cases where label was never insterted into code. Co-Authored-By: Jan Hubicka <jh@suse.cz> Co-Authored-By: Stuart Hastings <stuart@apple.com> From-SVN: r99625
2005-04-27Correct fixes for various hot/cold partitioning concerns.Caroline Tice1-0/+14
2005-04-27 Caroline Tice <ctice@apple.com> * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges): Remove targetm.have_named_sections test. (fix_edges_for_rarely_executed_code): Likewise. (insert_section_boundary_note): Likewise. (reorder_basic_blocks): Check partitioning flag before calling verify_hot_cold_block_grouping. * dbxout.c (dbxout_function_end): Get hot/cold section labels from the function struct rather than global variables. * dwarf2out.c (COLD_TEXT_SECTION_LABEL): New macro. (COLD_END_LABEL): Likewise (cold_text_section_label): New static global variable. (cold_end_label): Likewise. (dwarf2out_switch_text_section): Get hot/cold section labels from the function struct rather than global variables; test to make sure cfun is defined. (output_aranges): Use cold_text_section_label and cold_end_label; check partitioning flag before putting out delta. (output_ranges): Remove incorrect code attempting to use hot/cold labels. (output_line_info): Get cold section label from function struct; test to make sure cfun is defined. (add_location_or_const_value_attribute): Likewise. (dwarf2out_var_location): Likewise. (dwarf2out_init): Generate cold_text_section_label and cold_end_label; write out cold_text_section_label if partition flag is set. (dwarf2out_finish): Write out cold_end_label if partition flag is set; * function.h (struct function): Add new fields to point to hot/cold section labels: hot_section_label, cold_section_label, hot_section_end_label and cold_section_end_label; also add new field for cold text section name, unlikely_text_section_name. * opts.c (decode_options): Turn off partitioning flag if !targetm.have_named_sections. * output.h (hot_section_label): Remove. (hot_section_end_label): Remove. (cold_section_end_label): Remove. (unlikely_section_label): Remove. (unlikely_text_section_name): Remove. * passes.c (rest_of_handle_final): Remove extra blank line. * varasm.c (unlikely_section_label): Remove. (hot_section_label): Remove. (hot_section_end_label): Remove. (cold_section_end_label): Remove. (unlikely_text_section_name): Remove. (initialize_cold_section_name): Modify to call targetm.strip_name_encoding; to store cold section name in current function struct, if it exists; and to only use the decl_section_name if flag_named_sections is true. (unlikely_text_section): Modify to get section name out of current function struct, if there is one; otherwise build it from UNLIKELY_EXECUTED_TEXT_SECTION_NAME. (in_unlikely_text_section): Likewise. (named_section): Modify to get/put cold section name in current function struct, if there is one. (function_section): Change 'bool unlikely' to 'int reloc'; check targetm.have_named_sections before calling named_section. (current_function_section): Likewise. (assemble_start_function): Modify to get/put unlikely_text_section_name in current function struct; modify to get hot/cold section labels from function struct; initialize labels using ASM_GENERATE_INTERNAL_LABEL; test partitioning flag before writing out hot section label. (assemble_end_function): Test partitioning flag before writing out hot/cold section labels. (default_section_type_flags_1): Get cold text section name from function struct if there is one; Set flags correctly for cold text section if there is not a current function struct. From-SVN: r98885
2005-04-12Makefile.in: Add function.h to BASIC_BLOCK_H.Steven Bosscher1-0/+3
* Makefile.in: Add function.h to BASIC_BLOCK_H. Remove all references to gt-tree-cfg.h. * basic-block.h (struct basic_block_def): Don't skip rbi for garbage collection. (struct reorder_block_def): Make GTY-able. (struct control_flow_graph): New structure. (n_edges, n_basic_blocks, last_basic_block, basic_block_info, BASIC_BLOCK, EXIT_BLOCK_PTR, ENTRY_BLOCK_PTR): No longer vars, but instead defines to the control_flow_graph for cfun. (label_to_block_map): New define, points to the label map of the control_flow_graph for cfun. (n_edges_for_function, n_basic_blocks_for_function, last_basic_block_for_function, basic_block_info_for_function, EXIT_BLOCK_PTR_FOR_FUNCTION, ENTRY_BLOCK_PTR_FOR_FUNCTION, basic_block_info_for_function, label_to_block_map_for_function): Counterparts for the above, taking a struct function as an extra argument. (alloc_rbi_pool, free_rbi_pool): Remove prototypes. * cfg.c: (n_edges, n_basic_blocks, last_basic_block, basic_block_info, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR): Remove. (alloc_rbi_pool, free_rbi_pool): Remove. (initialize_bb_rbi): Use ggc_alloc_cleared instead of pool_alloc. * cfglayout.c: (cfg_layout_initialize): Don't allocate the rbi pool here... (cfg_layout_finalize) ... and don't free it here. * cfgrtl.c (cfg_layout_delete_block): Zero out rbi so it gets garbage collected. * flow.c (free_basic_block_vars): Set label_to_block_map and n_edges to zero too. * function.h (struct function): Add cfg field. * function.c (allocate_struct_function): Allocate the cfg. * tree-cfg.c (label_to_block_map): Remove. (build_tree_cfg): Don't allocate the rbi pool here... (delete_tree_cfg_annotations): ...and don't free it here. Also don't nullify label_to_block_map for cfun. Co-Authored-By: Jan Hubicka <jh@suse.cz> Co-Authored-By: Stuart Hastings <stuart@apple.com> From-SVN: r98048
2005-04-12Revert patch from April 9.Caroline Tice1-14/+0
From-SVN: r98039
2005-04-09Fix problems with labels with hot/cold partitioning.Caroline Tice1-0/+14
From-SVN: r97928
2005-04-09tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and ↵Jakub Jelinek1-0/+14
TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * tree-stdarg.h: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * target.h (struct gcc_target): Add stdarg_optimize_hook. * target-def.h (TARGET_STDARG_OPTIMIZE_HOOK): Define. (TARGET_INITIALIZER): Add it. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * config/alpha/alpha.c: Include tree-flow.h and tree-stdarg.h. (alpha_build_builtin_va_list): Initialize va_list_gpr_counter_field. (va_list_skip_additions, alpha_stdarg_optimize_hook): New functions. (TARGET_STDARG_OPTIMIZE_HOOK): Define. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. * gcc.c-torture/execute/stdarg-4.c: New test. * gcc.dg/vmx/varargs-1.c (f1, f2, f3): Add missing va_end. From-SVN: r97916
2005-04-08* function.h (nonlocal_labels): Remove.Kazu Hirata1-1/+0
From-SVN: r97839
2005-04-08function.h (function): Remove instrument_entry_exit.Kazu Hirata1-5/+0
* function.h (function): Remove instrument_entry_exit. (current_function_instrument_entry_exit): Remove. From-SVN: r97838
2005-04-08function.c (push_function_context_to): Don't set contains_functions.Kazu Hirata1-4/+0
* function.c (push_function_context_to): Don't set contains_functions. * function.h (function): Remove contains_functions. (current_function_contains_functions): Remove. From-SVN: r97837
2005-03-14function.c (get_func_frame_size): Make it static.Kazu Hirata1-2/+0
* function.c (get_func_frame_size): Make it static. * function.h: Remove the corresponding type. From-SVN: r96409
2005-02-20re PR middle-end/19698 (Infinite loop in update_life_info)Steven Bosscher1-0/+8
PR middle-end/19698 * function.h (struct function): New field `max_loop_depth'. * cfgloop.c (establish_preds): Update maximum loop depth seen so far. (flow_loops_find): Reset the max loop depth count before finding loops. * flow.c (MAX_LIVENESS_ROUNDS): New constant. (update_life_info_in_dirty_blocks): Remove 2002-05-28 workaround. (calculate_global_regs_live): Make sure the loop will terminate when the initial sets are not empty. From-SVN: r95299
2005-01-27c-common.def, [...]: Update copyright.Kazu Hirata1-1/+1
* c-common.def, c-dump.c, c-gimplify.c, c-objc-common.c, cfgexpand.c, dbxout.c, function.h, opts.c, tree-flow-inline.h, tree-ssa-operands.h, tree-ssa-threadupdate.c, tree-tailcall.c, config/avr/avr.md, config/cris/aout.h, config/cris/cris.h, config/mips/iris6.h, config/sh/sh.c: Update copyright. From-SVN: r94328
2005-01-26re PR middle-end/16585 (current_function_has_computed_jump incorrectly ↵Steven Bosscher1-4/+0
changed in make_edges) PR middle-end/16585 * cfgbuild.c (make_edges): Do not clear or set current_function_has_computed_jump. * function.h (struct function): Remove the has_computed_jump field. (current_function_has_computed_jump): Do not define. * sched-rgn.c (is_cfg_nonregular): Return true if a basic block ends in a computed jump. Ignore current_function_has_computed_jump. From-SVN: r94269
2004-11-23function.h (struct function): Remove calls_longjmp.Zack Weinberg1-4/+0
* function.h (struct function): Remove calls_longjmp. (current_function_calls_longjmp): Delete. * tree.h (ECF_LONGJMP): Delete. (ECF_SIBCALL, ECF_PURE, ECF_SP_DEPRESSED, ECF_ALWAYS_RETURN) (ECF_LIBCALL_BLOCK): Everybody slide down one. (ECF_CONST, ECF_NORETURN, ECF_SIBCALL): Clarify comments. * builtins.c (expand_builtin_longjmp): Don't set current_function_calls_longjmp. * calls.c (special_function_p): Mark longjmp and siglongjmp with ECF_NORETURN, not ECF_LONGJMP. (emit_call_1, expand_call, emit_library_call_value_1): Don't check for ECF_LONGJMP. * tree-cfg.c (make_exit_edges, is_ctrl_altering_stmt) (need_fake_edge_p): Likewise. * config/avr/avr.h, config/ip2k/ip2k.h: Don't define NON_SAVING_SETJMP. * system.h: Poison NON_SAVING_SETJMP. * function.c (use_register_for_decl) * gcse.c (compute_hash_table_work, compute_store_table) * postreload-gcse.c (record_opr_changes) * reload.c (find_equiv_reg) * reload1.c (reload) * config/i386/i386.c (ix86_can_use_return_insn_p): Remove code conditional on NON_SAVING_SETJMP. * doc/tm.texi: Delete documentation of NON_SAVING_SETJMP. * config/i386/sysv3.h: Delete file. * config/i386/i386.c (ix86_svr3_asm_out_constructor): Delete. From-SVN: r91101
2004-10-08emit-rtl.c (last_label_num, [...]): Remove.Kazu Hirata1-1/+0
* emit-rtl.c (last_label_num, base_label_num): Remove. (max_label_num): Always return label_num. (set_new_last_label_num, restore_emit_status): Remove. (init_emit): Don't initialize last_label_num. * function.c (pop_function_context_from): Don't call restore_emit_status. * function.h: Remove the prototype for restore_emit_status. * rtl.h: Remove the prototype for set_new_last_label_num. From-SVN: r88789
2004-10-01revert: tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and ↵Jakub Jelinek1-14/+0
TI_VA_LIST_FPR_COUNTER_FIELD. 2004-10-01 Jakub Jelinek <jakub@redhat.com> Revert 2004-09-29 Jakub Jelinek <jakub@redhat.com> * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * gcc.dg/tree-ssa/stdarg-1.c: Removed. * gcc.dg/tree-ssa/stdarg-2.c: Removed. * gcc.dg/tree-ssa/stdarg-3.c: Removed. * gcc.dg/tree-ssa/stdarg-4.c: Removed. * gcc.dg/tree-ssa/stdarg-5.c: Removed. From-SVN: r88383
2004-09-29tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and ↵Jakub Jelinek1-0/+14
TI_VA_LIST_FPR_COUNTER_FIELD. * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD and TI_VA_LIST_FPR_COUNTER_FIELD. (va_list_gpr_counter_field, va_list_fpr_counter_field): Define. * tree-pass.h (pass_stdarg): Add. * tree-optimize.c (init_tree_optimization_passes): Add pass_stdarg. * tree-stdarg.c: New file. * Makefile.in (OBJS-common): Add tree-stdarg.o. (tree-stdarg.o): Add dependencies. * function.h (struct function): Add va_list_gpr_size and va_list_fpr_size fields. * function.c (allocate_struct_function): Initialize them. * config/i386/i386.c (ix86_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (ix86_setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (ix86_va_start): Don't set up fields that won't be used. * config/rs6000/rs6000.c (rs6000_build_builtin_va_list): Initialize va_list_{g,f}pr_counter_field. (setup_incoming_varargs): Don't do anything if reg_save area will not be used. Only save registers that tree-stdarg.c detected they need saving. (rs6000_va_start): Don't set up fields that won't be used. * gcc.c-torture/execute/stdarg-1.c: New test. * gcc.c-torture/execute/stdarg-2.c: New test. * gcc.c-torture/execute/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-1.c: New test. * gcc.dg/tree-ssa/stdarg-2.c: New test. * gcc.dg/tree-ssa/stdarg-3.c: New test. * gcc.dg/tree-ssa/stdarg-4.c: New test. * gcc.dg/tree-ssa/stdarg-5.c: New test. From-SVN: r88279
2004-09-08function.c (reference_callee_copied): New.Richard Henderson1-0/+2
* function.c (reference_callee_copied): New. (assign_parm_setup_reg): Use it. * calls.c (initialize_argument_information): Likewise. (emit_library_call_value_1): Likewise. * function.h (reference_callee_copied): Declare. * target.h (struct gcc_target): Add callee_copies. * target-def.h (TARGET_CALLEE_COPIES): New. (TARGET_PASS_BY_REFERENCE): Update default. * expr.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * targhooks.c (hook_callee_copies_named): New. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Rename from hook_pass_by_reference_false. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): New. * targhooks.h: Update decls. * config/arc/arc.c (TARGET_CALLEE_COPIES): New. * config/arc/arc.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/frv/frv-protos.h (frv_function_arg_callee_copies): Remove. * config/frv/frv.c (frv_function_arg_callee_copies): Remove. * config/frv/frv.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/iq2000/iq2000.c (TARGET_CALLEE_COPIES): New. * config/iq2000/iq2000.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/m68hc11/m68hc11.c (TARGET_CALLEE_COPIES): New. * config/m68hc11/m68hc11.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mips/mips.c (TARGET_CALLEE_COPIES): New. (mips_callee_copies): New. * config/mips/mips.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mmix/mmix.c (TARGET_CALLEE_COPIES): New. * config/mmix/mmix.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/mn10300/mn10300.c (TARGET_CALLEE_COPIES): New. * config/mn10300/mn10300.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/pa/pa.c (TARGET_CALLEE_COPIES): New. * config/pa/pa.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/sh/sh.c (sh_callee_copies): New. (TARGET_CALLEE_COPIES): New. * config/sh/sh.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * config/v850/v850.c (TARGET_CALLEE_COPIES): New. * config/v850/v850.h (FUNCTION_ARG_CALLEE_COPIES): Remove. * doc/tm.texi (TARGET_CALLEE_COPIES): Replace documentation for FUNCTION_ARG_CALLEE_COPIES. * doc/rtl.texi (CALL_INSN_FUNCTION_USAGE): Update. From-SVN: r87195
2004-08-09Makefile.in (GTFILES): Remove stmt.cPaolo Bonzini1-12/+0
2004-08-09 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (GTFILES): Remove stmt.c (stmt.o): Do not depend on gt-stmt.h. * emit-rtl.c (emit_line_note): Do not call set_file_and_line_for_stmt. * expr.c (expand_expr_real_1) <SWITCH_EXPR>: Let expand_case do everything. * function.c (free_after_parsing): Do not free STMT field. (allocate_struct_function): Do not call init_stmt_for_function. (assign_stack_temp_for_type): Do not accept values of keep other than 0 or 1. (init_temp_slots): Do not initialize removed variables. * function.h (struct function): Remove STMT, X_TARGET_TEMP_SLOT_LEVEL and X_VAR_TEMP_SLOT_LEVEL fields. * rtl.h (set_file_and_line_for_stmt): Remove. * stmt.c (struct nesting, ALLOC_NESTING, POPSTACK, struct stmt_status, cond_stack, case_stack, nesting_stack, nesting_depth, emit_locus, set_file_and_line_for_stmt, same_case_target_p, init_stmt_for_function, emit_nop, expand_start_cond, expand_start_elseif, expand_start_else, expand_elseif, expand_end_cond): Remove. (preserve_subexpressions_p): Remove references to CFUN->STMT. (expand_start_case, expand_end_case_type): Remove, merge into... (expand_case): ... this one, including other bits from expand_expr_real_1. Inline same_case_target_p. Turn members of CASE_STACK into local variables. (emit_case_bit_tests): Inline same_case_target_p. (add_case_node): Add HEAD argument, return new head of the list, do not handle default label here. * tree.h (expand_start_cond, expand_end_cond, expand_start_else, expand_start_elseif, current_nesting_level, expand_start_case, expand_end_case_type, expand_end_case, add_case_node, init_stmt_for_function, expand_elseif): Remove prototypes. (expand_case): Add prototype. From-SVN: r85712
2004-07-27re PR tree-optimization/15077 (ICE in make_decl_rtl when inlining tail ↵Richard Kenner1-1/+2
recursive nested function) PR optimization/15077 * function.h (struct function): Add field saved_static_chain_decl. Fix comment for static_chain_decl. * tree-inline.c (save_body): Add new arg and handle static_chain_decl. * tree-inline.h (save_body): Add new arg. * tree-optimize.c (tree_rest_of_compilation): Handle saving static_chain_decl. From-SVN: r85247
2004-07-26calls.c (combine_pending_stack_adjustment_and_call): Make ↵Richard Henderson1-2/+2
preferred_unit_stack_boundary argument unsigned. * calls.c (combine_pending_stack_adjustment_and_call): Make preferred_unit_stack_boundary argument unsigned. Make unadjusted_alignment unsigned. (expand_call): Make preferred_stack_boundary and preferred_unit_stack_boundary variables unsigned. * function.c (assign_stack_local_1): Make alignment unsigned. * function.h (struct function): Make stack_alignment_needed, preferred_stack_boundary unsigned. * config/i386/i386.c (ix86_preferred_stack_boundary): Make unsigned. (ix86_compute_frame_layout): Make stack_alignment_needed, preferred_alignment variables unsigned. * config/i386/i386.h (ix86_preferred_stack_boundary): Make unsigned. From-SVN: r85196
2004-07-14expr.c (enqueue_insn, [...]): Remove.Paolo Bonzini1-4/+0
2004-07-14 Paolo Bonzini <bonzini@gnu.org> * expr.c (enqueue_insn, finish_expr_for_function, protect_from_queue, queued_subexp_p, mark_queue, emit_insns_enqueued_after_mark, emit_queue, expand_increment): Remove. (store_constructor): Expand increment as an assignment. (expand_expr_real_1 <case PREINCREMENT_EXPR, case PREDECREMENT_EXPR, case POSTINCREMENT_EXPR, case POSTDECREMENT_EXPR>): Abort. * expr.h (QUEUED_VAR, QUEUED_INSN, QUEUED_COPY, QUEUED_BODY, QUEUED_NEXT, finish_expr_for_function, protect_from_queue, emit_queue, queued_subexp_p): Remove. * function.h (pending_chain, x_pending_chain): Remove. * rtl.def (QUEUED): Remove. * emit-rtl.c (copy_insn_1, copy_most_rtx, set_used_flags, verify_rtx_sharing): Remove references to QUEUED. * genattrtab.c (attr_copy_rtx, clear_struct_flag, encode_units_mask): Likewise. * local-alloc.c (equiv_init_varies_p): Likewise. * rtl.c (copy_rtx): Likewise. * rtlanal.c (rtx_unstable_p, rtx_varies_p): Likewise. * simplify-rtx.c (simplify_gen_subreg): Likewise. * config/mn10300/mn10300.c (legitimate_pic_operand_p): Likewise. * builtins.c (expand_builtin, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_mathfn_2, expand_builtin_mathfn_3, expand_builtin_setjmp_setup): Remove calls to emit_queue and protect_from_queue. * calls.c (expand_call, precompute_arguments, precompute_register_parameters, rtx_for_function_call, store_one_arg): Likewise. * dojump.c (do_compare_and_jump, do_jump): Likewise. * explow.c (memory_address): Likewise. * expmed.c (clear_by_pieces_1, clear_storage, clear_storage_via_libcall, emit_group_load, emit_group_store, emit_store_flag, expand_expr_real_1, store_by_pieces, store_constructor, store_expr, try_casesi, try_tablejump): Likewise. * function.c (expand_pending_sizes): Likewise. * optabs.c (emit_cmp_and_jump_insns, emit_conditional_add, emit_conditional_move, expand_fix, expand_float, prepare_cmp_insn): Likewise. * stmt.c (emit_case_bit_tests, expand_asm_expr, expand_computed_goto, expand_decl_init, expand_end_case_type, expand_end_stmt_expr, expand_expr_stmt_value, expand_return, expand_start_case, optimize_tail_recursion): Likewise. * config/c4x/c4x.c (c4x_expand_builtin): Likewise. * config/s390/s390.c (s390_expand_cmpmem): Likewise. From-SVN: r84675
2004-07-13function.c (pass_by_reference): New.Richard Henderson1-0/+3
* function.c (pass_by_reference): New. (assign_parm_find_data_types): Use it. * calls.c (initialize_argument_information): Likewise. (emit_library_call_value_1): Likewise. * expr.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove. * function.h (pass_by_reference): Declare. ada/ * misc.c (default_pass_by_ref): Use pass_by_reference. From-SVN: r84607
2004-07-04rtl.def (ADDRESSOF): Remove.Richard Henderson1-16/+1
* rtl.def (ADDRESSOF): Remove. * alias.c (rtx_equal_for_memref_p): Don't handle addressof. (find_base_term, memrefs_conflict_p): Likewise. * cse.c (fixed_base_plus_p, find_best_addr: Likewise. (fold_rtx, cse_insn, set_live_p): Likewise. * dwarf2out.c (mem_loc_descriptor): Likewise. (add_location_or_const_value_attribute): Likewise. * emit-rtl.c (copy_insn_1): Likewise. * explow.c (memory_address): Likewise. * expmed.c (store_split_bit_field): Likewise. * expr.c (expand_expr_real_1): Likewise. * function.c (instantiate_decl (instantiate_virtual_regs_1, fix_lexical_addr): Likewise. * genrecog.c (preds, validate_pattern): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * recog.c (general_operand, register_operand): Likewise. (memory_address_p): Likwise. * reload1.c (eliminate_regs, elimination_effects): Likewise. * rtl.c (copy_rtx): Likewise. * rtlanal.c (rtx_unstable_p, rtx_varies_p): Likewise. (rtx_addr_can_trap_p, nonzero_address_p, address_cost): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * stmt.c (expand_asm_operands): Likewise. * web.c (entry_register, replace_ref, web_main): Likewise. * config/alpha/alpha.c (input_operand, alpha_legitimate_address_p, alpha_expand_block_move, alpha_expand_block_clear): Likewise. * config/arm/arm.c (thumb_rtx_costs): Likewise. * config/c4x/c4x.c (c4x_valid_operands): Likewise. * config/frv/frv.c (move_destination_operand, move_source_operand, condexec_dest_operand, condexec_source_operand, condexec_memory_operand): Likewise. * config/h8300/h8300.h (PREDICATE_CODES): Likewise. * config/ia64/ia64.c (general_xfmode_operand): Likewise. (destination_xfmode_operand): Likewise. * config/mips/mips.h (PREDICATE_CODES): Likewise. * config/mn10300/mn10300.c (mn10300_address_cost_1): Likewise. * config/s390/s390.c (general_s_operand): Likewise. * config/s390/s390.md (mov*): Likewise. * config/sparc/sparc.h (PREDICATE_CODES): Likewise. * c-typeck.c (c_mark_addressable): Don't put_var_into_stack. * expr.c (expand_expr_real_1): Likewise. * stmt.c (expand_decl): Likewise. * config/c4x/c4x.c (c4x_expand_builtin): Likewise. * function.c (struct fixup_replacement, struct insns_for_mem_entry, postponed_insns, put_var_into_stack, put_reg_into_stack, schedule_fixup_var_refs, fixup_var_refs, find_fixup_replacement, fixup_var_refs_insns, fixup_var_refs_insns_with_hash, fixup_var_refs_insn, fixup_var_refs_1, fixup_memory_subreg, walk_fixup_memory_subreg, fixup_stack_1, optimize_bit_field, gen_mem_addressof, flush_addressof, put_addressof_into_stack, purge_bitfield_addressof_replacements, purge_addressof_replacements, purge_addressof_1, insns_for_mem_hash, insns_for_mem_comp, struct insns_for_mem_walk_info, insns_for_mem_walk, compute_insns_for_mem, is_addressof, purge_addressof, setjmp_protect, setjmp_protect_args): Remove. (push_function_context_to): Don't handle var_refs_queue. (pop_function_context_from, free_after_compilation): Likewise. (instantiate_virtual_regs): Don't handle parm_reg_stack_loc. (assign_parms, allocate_struct_function): Likewise. (use_register_for_decl): New. (expand_function_end): Don't setjmp_protect. * function.h (struct emit_status): Update commentary. (struct function): Remove x_max_parm_reg, x_parm_reg_stack_loc. (max_parm_reg, parm_reg_stack_loc): Remove. * passes.c (DFI_addressof): Remove. (dump_file_info): Remove addressof. (rest_of_handle_addressof): Remove. (rest_of_compilation): Don't call it. * rtl.h (ADDRESSOF_REGNO, ADDRESSOF_DECL): Remove. * stmt.c (expand_decl): Use use_register_for_decl. * tree.h: Update decls. * web.c (mark_addressof): Remove. * doc/invoke.texi (-dF): Remove. ada/ * utils2.c (gnat_mark_addressable): Don't put_var_into_stack. cp/ * typeck.c (cxx_mark_addressable): Don't put_var_into_stack. fortran/ * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack. treelang/ * treetree.c (tree_mark_addressable): Don't put_var_into_stack. From-SVN: r84072