Age | Commit message (Collapse) | Author |
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@78914 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
comparison of the address of two variables.
* tree-inline.c (setup_one_parameter): Improve test for when we
need to gimplify the initialization statements.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@78573 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
integrate.c, print-tree.c, toplev.c, tree-inline.c, tree-nested.c,
tree-optimize.s, tree.h): Replace DECL_SAVED_INSNS with
DECL_STRUCT_FUNCTION.
* ada/utils.c: Likewise.
* cp/decl.c: Likewise.
* f/com.c: Likewise.
* fortran/trans-decl.c: Likewise.
* java/decl.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@77890 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* Makefile.in (OBJS-common, GTFILES, tree-nested.o): Add it.
* builtin-types.def (BT_FN_VOID_PTR_PTR, BT_FN_VOID_PTR_PTR_PTR): New.
* builtins.c (expand_builtin_nonlocal_goto): New.
(expand_builtin_apply): Fix prepare_call_address args.
(round_trampoline_addr): Move from function.c.
(expand_builtin_init_trampoline): New.
(expand_builtin_adjust_trampoline): New.
(expand_builtin): Invoke them.
(build_function_call_expr): Add CALL_EXPR chain operand.
* builtins.def (BUILT_IN_INIT_TRAMPOLINE,
BUILT_IN_ADJUST_TRAMPOLINE, BUILT_IN_NONLOCAL_GOTO): New.
* c-decl.c (finish_function): Call lower_nested_functions.
(c_expand_decl): Don't declare_nonlocal_label.
* calls.c (prepare_call_address): Replace fndecl arg with a
precomputed static chain value.
(expand_call): Precompute the static chain value. Use
update_nonlocal_goto_save_area.
* cgraph.c (cgraph_mark_reachable_node): Don't force nested
functions to be reachable.
(cgraph_clone_node): Don't abort cloning functions containing
nested functions.
* cgraphunit.c (cgraph_assemble_pending_functions): Don't do
anything special for nested functions.
(cgraph_mark_functions_to_output): Likewise.
(cgraph_estimate_growth, cgraph_clone_inlined_nodes): Likewise.
(cgraph_optimize): Likewise.
(cgraph_finalize_function): Don't zap DECL_SAVED_INSNS.
(cgraph_expand_function): Allow functions to not be emitted.
* defaults.h (TRAMPOLINE_ALIGNMENT): Move from function.c.
* dwarf2out.c (gen_subprogram_die): Generate DW_AT_static_link.
* emit-rtl.c (maybe_set_first_label_num): New.
* explow.c (update_nonlocal_goto_save_area): New.
(allocate_dynamic_stack_space): Use it.
* expr.c (expand_expr_real_1) <LABEL_DECL>: Don't force_label_rtx.
<COND_EXPR>: Ignore the possibility of non-local labels.
<ADDR_EXPR>: Don't do trampoline_address.
* expr.h (lookup_static_chain): Remove.
(prepare_call_address): Update 2nd arg.
(update_nonlocal_goto_save_area): Declare.
* final.c (profile_function): Update static chain test.
* function.c (TRAMPOLINE_ALIGNMENT): Move to defaults.h.
(trampolines_created): Move to varasm.c.
(free_after_compilation): Update for removed fields.
(allocate_struct_function): Likewise.
(delete_handlers, lookup_static_chain): Remove.
(fix_lexical_addr): Don't consider non-local variable refs.
(trampoline_address): Remove.
(round_trampoline_addr): Move to builtins.c.
(adjust_trampoline_addr): Remove.
(expand_function_start): Update for changes to static chain
and nonlocal goto handling.
(initial_trampoline): Move to varasm.c.
(expand_function_end): Don't build trampolines or kill
unreferenced nonlocal goto labels.
* function.h (struct function): Remove x_nonlocal_labels,
x_nonlocal_goto_handler_slots, x_nonlocal_goto_stack_level,
x_context_display, x_trampoline_list, needs_context.
Add static_chain_decl, nonlocal_goto_save_area.
* gimple-low.c (record_vars): Don't record functions.
* gimplify.c (declare_tmp_vars): Export.
(create_artificial_label): Set type.
(gimplify_expr): Don't consider nonlocal gotos.
* integrate.c (expand_inline_function): Kill lookup_static_chain ref.
* jump.c (any_uncondjump_p): Reject nonlocal goto.
* rtl.h (maybe_set_first_label_num): Declare.
* stmt.c (label_rtx): Set LABEL_PRESERVE_P appropriately.
(expand_label): Handle DECL_NONLOCAL and FORCED_LABEL.
(declare_nonlocal_label): Remove.
(expand_goto): Don't handle nonlocal gotos.
(expand_nl_handler_label): Remove.
(expand_nl_goto_receivers): Remove.
(expand_end_bindings): Don't expand_nl_goto_receivers. Use
update_nonlocal_goto_save_area.
* tree-cfg.c (make_edges): Handle abnormal edges out of block
falling through to EXIT.
(make_ctrl_stmt_edges): Don't check GOTO_EXPR for nonlocal goto.
Handle computed goto with no destinations.
(tree_can_merge_blocks_p): Don't merge blocks with nonlocal labels.
(remove_useless_stmts_label, stmt_starts_bb_p): Likewise.
(tree_forwarder_block_p): Likewise.
(nonlocal_goto_p): Remove.
(tree_verify_flow_info): Update to match.
* tree-dump.c (dump_files): Add tree-nested.
* tree-flow.h (nonlocal_goto_p): Remove.
* tree-inline.c (setup_one_parameter): Split out from ...
(initialize_inlined_parameters): ... here. Handle static chain.
(inline_forbidden_p_1): Update nonlocal goto check.
(expand_call_inline): Disable mysterious cgraph abort.
* tree-optimize.c (tree_rest_of_compilation): Save DECL_SAVED_INSNS.
* tree-pretty-print.c (dump_generic_node): Print static chain
and nonlocal label.
* tree-simple.h (declare_tmp_vars): Declare.
(lower_nested_functions): Declare.
* tree-ssa-dom.c (propagate_value): Avoid sharing problems.
* tree-ssa-operands.c (get_expr_operands): Walk static chain
field of call_expr.
* tree.def (CALL_EXPR): Add static chain operand.
* tree.h (NONLOCAL_LABEL): Remove.
(TDI_nested): New.
* varasm.c (TRAMPOLINE_ALIGNMENT): Remove.
(initial_trampoline): Move from function.c.
(assemble_trampoline_template): Set and return it.
(trampolines_created): Move from function.c.
ada/
* utils.c (max_size): Add static chain op for call_expr.
cp/
* call.c (build_call, build_over_call, build_new_method_call): Add
static chain operand to call_expr.
* decl.c (build_offset_ref_call_from_tree): Likewise.
* parser.c (cp_parser_postfix_expression): Likewise.
* semantics.c (finish_call_expr): Likewise.
* cp-lang.c (cp_expand_decl): Don't declare_nonlocal_label.
fortran/
* Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
* f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
(LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
(gfc_expand_function): Rename from expand_function_body, make static,
don't do anything except invoke tree_rest_of_compilation.
(gfc_be_parse_file): Invoke cgraph.
(gfc_expand_decl): Remove.
(gfc_init_builtin_functions): Add __builtin_init_trampoline and
__builtin_adjust_trampoline.
* trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
(gfc_finalize): New.
(gfc_generate_function_code): Use it. Lower nested functions.
* trans-expr.c (gfc_conv_function_call): Add static chain operand
to call_expr.
* trans.c (gfc_build_function_call): Likewise.
* trans.h (expand_function_body): Remove.
java/
* builtins.c (java_build_function_call_expr): Add static chain
operand to call_expr.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@77885 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@77756 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@77465 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
PR middle-end/13127
* tree-inline.c (declare_return_variable): Set the no warning bit
on the variable created for the return value.
2004-02-06 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/13127
* gcc.dg/20040206-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@77424 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@76954 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* tree-inline.c (initialize_inlined_parameters): Register the
substitute reference also.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@76909 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
RETURN_EXPR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@76908 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* tree-eh.c: Likewise.
* tree-inline.c: Likewise.
* tree-optimize.c: Likewise.
* tree-ssa.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-ssa-operands.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-tailcall.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@75904 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@75581 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* cgraph.c (create_edge, dump_cgraph): Update to use inline_failed
* cgraph.h (cgraph_edge): Replace inline_call by inline_failed
(cgraph_inline_p): Add extra argument reason.
* cgraphunit.c: Minor formating fixes.
cgraph_first_inlined_callee): New functions.
(record_call_1): Record builtins too.
(cgraph_analyze_function): Update inline_failed messages.
(cgraph_mark_functions_to_output, cgraph_expand_function, cgraph_inlined_into,
cgraph_inlined_callees, cgraph_estimate_growth): Update to use inline_failed.
(cgraph_check_inline_limits): Likewise; Add argument reason.
(cgraph_set_inline_failed): New static function.
(cgraph_decide_inlining_of_small_function, cgraph_decide_inlining): Set
reasons.
(cgraph_inline_p): Add new argument reason.
* tree-inline.c (expand_call_inline): Update warning.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@75392 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
known; add missing nodes; fix MODIFY_EXPR
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@74748 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
longer needed.
(lookup_recursive_calls): New function.
(cgraph_decide_recursive_inlining): Likewise.
(cgraph_decide_inlining_of_small_functions): Do recursive inlining.
* tree-inline.c: Include function.h
(copy_body): Choose saved body for recursive inlining.
(initialize_inlined_parameters): Likewise.
(expand_call_inline): Do not verify nodes when recursivly inlining,
insert ret_label into decl map.
* params.def (PARAM_MAX_INLINE_INSNS_RECURSIVE,
PARAM_MAX_INLINE_INSNS_RECURSIVE_AUTO,
PARAM_MAX_INLINE_RECURSIVE_DEPTH,
PARAM_MAX_INLINE_RECURSIVE_DEPTH_AUTO): New argument.
* invoke.texi (max-inline-insns-recursive, max-inline-recursive-depth):
Document.
* Makefile.in (tree-inline.o): Include function.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@74617 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
New timers.
* tree-cfg.c (verify_stmts): Push/pop timevar.
* cfg.c: Include timevar.h
(verify_flow_info): Push/pop timevar.
* Makefile.in (cfg.o): Add dependnecy on TIMEVARS
* cgraph.c (cgraph_create_edge): Sanity check for duplicates;
initialize aux.
(cgraph_remove_node): Decrease cgraph_n_nodes; do not clear
DECL_SAVED_TREE when dumping.
(cgraph_dump_node): Break out from ...; print more information.
(cgraph_dump): ... here.
* cgraph.h (cgraph_node): Add aux field.
(dump_cgraph_node, verify_cgraph, verify_cgraph_node): Declare.
(cgraph_mark_inline_edge): Declare
* cgraphunit.c (error_found): New static variable.
(verify_cgraph_node_1): New static function.
(verify_cgraph_node, verify_cgraph): New global function.
(cgraph_expand_function): More sanity checks.
(cgraph_clone_inline_nodes): Destructivly clone DECL_EXTERNAL nodes.
(cgraph_mark_inline_edge): Make global.
(cgraph_decide_inlining): Remove extern inline functions never inlined.
(cgraph_decide_inlining_incrementally): Verify that function body is
still present.
(expand_all_functions): Verify that all nodes are reachable.
(cgraph_optimize): Verify cgraph and memory management.
* tree-inline.c (copy_body_r): All edges must be present.
(expand_call_inline): Sanity check newly created edges and nodes
being inlined.
(optimize_inline_calls): Sanity check that we've inlined everything.
* tree-optimize.c (tree_rest_of_compilation): Clone functions inlined
into cloned node.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@74606 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* cp-tree.h (optimize_function): Kill.
* optimize.c (optimize_function): Kill.
* semantics.c (expand_body): Do not call optimize_function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@74586 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
constant propagation for non-gimple-min-invariant when
preserving gimple form.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@74556 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
(cgraph_create_node): Break out of ....
(cgraph_node): ... this one.
(cgraph_redirect_edge_callee): New function.
(cgraph_remove_node): Aggressively elliminate dead nodes;
remove node out of clone list.
(dump_cgraph): Dump inlined_to field; dump uid numbers.
(cgraph_clone_edge): Return edge created.
(cgraph_clone_node): New.
(cgraph_function_possibly_inlined_p): Re-implement using hashtable.
* cgraph.h: Include hashtab.h
(struct cgraph_global_info): Kill inline_once, will be output and
cloned_times fields. Add inlined_to field.
(cgraph_node): Add next_clone.
(cgraph_inline_hash): Declare.
(cgraph_clone_edge): Update prototype.
(cgraph_clone_node, cgraph_redirect_callee): Declare.
* cgraphunit.c (cgraph_optimize_function): Kill.
(cgraph_assemble_function): Kill next_needed to avoid GGC corruption.
(cgraph_analyze_function): Do not intialize cloned_times and
will_be_output.
(cgraph_finalize_compilation_unit): Clear next_needed.
(cgraph_optimize_function): Kill.
(cgraph_expand_function): Do not use cgraph_optimize_function.
(cgraph_estimate_growth, cgraph_mark_inline,
cgraph_check_inline_limits, cgraph_recursive_inlining_p,
cgraph_preserve_function_body_p): Update for explicit clones.
(INLINED_TIMES, SET_INLINED_TIMES, cgraph_inlined_into,
cgraph_inlined_callees, struct cgraph_inline_context,
cgraph_create_inline_context, cgraph_free_inline_context,
cgraph_inline_context_set_caller, cgraph_inline_context_clear_caller,
cgraph_inline_context_set_callee, cgraph_inline_context_clear_callee,
update_callee_keys): Kill.
(cgraph_clone_inlined_nodes, cgraph_mark_inline_edge): New.
(cgraph_decide_inlining_of_small_functions, (cgraph_decide_inlining,
cgraph_decide_inlining_incrementally): Simplify.
* tree-inline.c (typedef struct_inline_data): New field saving_p.
(copy_body_r): Update all clones.
(expand_call_inline): Remove inlined cgraph node.
(save_body): Inicialize id.node and id.saving_p.
* tree-optimize.c (tree_rest_of_compilation): Maintain clone up-to-date
in no-unit-at-a-time mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@74469 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
(cgraph_create_edge): ... this one; accept call_expr as operand.
(cgraph_edge): New function
(cgraph_remove_edge): Use edge as argument
(cgraph_record_call, cgraph_remove_call): Kill.
(clone_cgraphedge): New function.
* cgraph.h (cgraph_edge): Add call_expr argument; add chain_next.
(cgraph_record_call, cgraph_remove_call): Kill prototype.
(cgraph_remove_call, cgraph_inline_p): Update prototype.
(cgraph_clone_edge): Declare.
* cgraphunit.c (cgraph_finalize_function): Update use of
cgraph_remove_edge
(record_call_1): Use cgraph_create_edge; record builtins too.
(cgraph_create_edges): Accept node instead of decl.
(cgraph_analyze_function): Update use cgraph_create_edges.
(cgraph_inline_p): Accept edge.
* tree-inline.c (inline_data): Replace decl and current_decl
by node and current_node.
(copy_body_r): Clone edges.
(expand_call_inline): Do not create inlined edges.
(optimize_inline_call): Set id->current_node, id->node.
* tree-optimize.c (tree_rest_of_compilation): Update cgraph edges after
compiling.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@74397 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* tree-inline.h (save_body): Declare.
* tree-optimize.c (tree_rest_of_compilation): Save function tree
properly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73920 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73909 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
recording vdefs.
(cleanup_operand_arrays): Similarly.
* tree-sra.c (create_scalar_copies): Similarly.
* tree-ssa-ccp.c (visit_stmt, initialize): Similarly.
* tree-ssa-dce.c (stmt_useful_p, process_worklist): Similarly.
* tree-ssa-dom.c (cprop_into_stmt): Similarly.
(record_equivalences_from_stmt): Similarly.
* tree-ssa-live.c (create_ssa_var_map): Similarly.
(calculate_live_on_entry): Similarly.
* tree-ssa.c (mark_def_sites, rewrite_stmt): Similarly.
* tree-ssa-pre.c (process_left_occr_and_kills): Similarly.
* tree-inline.c (estimate_num_insns_1): Kill VDEF_EXPR.
* tree-pretty-print.c (dump_generic_node) Kill VDEF_EXPR.
(dump_vops): Dump VDEFs here.
* tree.c (build_vdef_expr): Kill.
* tree.h (build_vdef_expr): Kill prototype.
(VDEF_RESULT, VDEF_OP): Revamp to handle new method for recording
vdefs.
* tree.def (VDEF_EXPR): Kill.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73814 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* gimplify.c (gimplify_addr_expr): Kill missing cast workaround.
(cpt_same_type, check_pointer_types_r): New.
(gimplify_body): Call it.
* tree-inline.c (insert_decl_map): New.
(remap_decl, remap_type, remap_block, copy_body_r,
initialize_inlined_parameters, declare_return_variable,
remap_save_expr, mark_local_for_remap_r): Use it.
cp/
* call.c (build_java_interface_fn_ref): Use build_address+convert.
* except.c (build_eh_type_type): Likewise.
* class.c (build_base_path): Use convert+build_indirect_ref.
* init.c (expand_virtual_init): Likewise.
* rtti.c (get_tinfo_decl_dynamic): Use convert.
fortran/
* trans-array.c (gfc_trans_allocate_array_storage): Use convert.
(gfc_conv_array_base): Likewise.
* trans-decl.c (gfc_trans_auto_character_variable): Likewise.
* trans-expr.c (gfc_conv_string_tmp): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
* trans-stmt.c (gfc_trans_character_select): Likewise.
java/
* class.c (build_indirect_class_ref): Use convert.
* constants.c (build_constant_data_ref): Fix type on the decl
and return that directly.
(build_constants_constructor): Remove kruft to match.
(build_ref_from_constant_pool): Use ARRAY_REF.
* expr.c (build_java_indirect_ref): Use convert.
(build_known_method_ref): Likewise.
* parse.y (patch_string_cst): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73779 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
2003-11-20 Frank Ch. Eigler <fche@redhat.com>
libstdc++/11696
* c-pragma.c (handle_pragma_redefine_extname): Define always.
(init_pragma): Activate #pragma redefine_extname for mudflap.
* tree-inline.c (copy_tree_r): Propagate mf_marked-ness.
* tree-mudflap.c (mudflap_c_function): Break into new
_decls and _ops functions.
(mudflap_c_function_decls): Avoid unnecessary tree copying.
(mudflap_c_function_ops): Ditto. Gimplify explicitly only for
tree dumping.
* tree-nomudflap.c: Add new stub functions. Simplify error
message emission throughout.
* tree-mudflap.h: Corresponding changes.
* tree-optimize.c (tree_rest_of_compilation): Call the _decl
instrumentation before gimplification and ssa optimizations;
call the _ops instrumentation after ssa optimizations.
2003-11-20 Frank Ch. Eigler <fche@redhat.com>
* cp-mudflap.c (mflang_flush_calls): Adapt to direct expansion of
synthetic function, bypassing callgraph code.
* cp-decl2.c (finish_file): Call mudflap after callgraph-based
expansion.
2003-11-19 Frank Ch. Eigler <fche@redhat.com>
libstdc++/11696
* mf-runtime.h.in: Switch to #pragma redefine_extname for
symbols interposed at compile time.
* testsuite/libmudflap.c++/pass41-frag.cxx: New test.
libmudflap/12939
* mf-hooks2.c (semctl): Tolerate FreeBSD.
* configure.in: Reorganize check for <pthread.h>.
* configure: Regenerated.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73774 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* semantics.c (finalize_nrv_r): Rename from nullify_returns_r.
Also replace uses of the nrv with our RESULT_DECL.
(cxx_expand_function_start): Don't mess with the nrv.
(finalize_nrv): New fn.
* cp-tree.h: Declare it.
* decl.c (finish_function): Call it.
* tree.c (cp_copy_res_decl_for_inlining): Don't mess with the nrv.
* dwarf2out.c (gen_subprogram_die): Generate a DIE for a named
return value.
(loc_descriptor_from_tree): Treat RESULT_DECL like VAR_DECL.
(add_location_or_const_value_attribute): Likewise.
(add_bound_info): Likewise.
(gen_decl_die): Likewise.
* tree-inline.c (walk_tree): Don't walk into the BIND_EXPR_VARS
of a BIND_EXPR.
* c-common.c (c_walk_subtrees): Don't walk into the decl of a
DECL_STMT.
* gimplify.c (mostly_copy_tree_r): Don't walk into a BLOCK.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73660 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73558 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73535 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
(expr.o): Depend on tree-iterator.h.
(GTFILES): Add tree-iterator.c.
* basic-block.h (struct basic_block_def): Replace head_tree_p
and end_tree_p with stmt_list.
(tree_bb_root): New.
(create_bb): Don't declare.
* c-common.c (c_warn_unused_result): Handle STATEMENT_LIST.
* c-simplify.c (c_gimplify_stmt): Don't rationalize_compound_expr.
* cfg.c (entry_exit_blocks): Adjust for member changes.
(compact_blocks): Manage tree_bb_root.
* expr.c (expand_expr_1): Handle STATEMENT_LIST.
* gimple-low.c: Update for tree_stmt_iterator changes.
(lower_cond_expr): Use expr_only. Notice empty conditionals.
* gimplify.c (append_to_statement_list_1): Create and
manage statement_list nodes.
(foreach_stmt): Remove.
(wfl_locus): Remove.
(annotate_all_with_locus_1): Merge into...
(annotate_all_with_locus): ... here. Iterate over the
statement list directly.
(voidify_wrapper_expr): Handle STATEMENT_LIST.
(gimplify_return_expr): Likewise.
(gimplify_loop_expr): Likewise.
(shortcut_cond_r, shortcut_cond_expr): Likewise.
(gimplify_cleanup_point_expr): Likewise.
(gimple_build_eh_filter): Create statement list bodies.
(gimplify_bind_expr): Likewise.
(gimplify_switch_expr): Likewise.
(gimplify_cond_expr): Likewise.
(gimplify_compound_expr): Handle void expressions as well.
(gimplify_statement_list): New.
(gimple_push_cleanup): Gimplify the WITH_CLEANUP_EXPR operand.
(gimplify_stmt): Ensure non-null result.
(gimplify_to_stmt_list): New.
(gimplify_expr): Use gimplify_compound_expr, gimplify_statement_list,
gimplify_to_stmt_list as appropriate.
(gimplify_body): Fix creation of outer BIND_EXPR.
* tree-cfg.c (tree_bb_root): New.
(build_tree_cfg): Initialize it. Update for make_blocks changes.
(factor_computed_gotos): Use create_bb directly.
(make_blocks): Rewrite to use statement lists.
(append_stmt_to_bb, prepend_stmt_to_bb): Remove.
(create_bb): Make static. Add stmt_list argument. Don't allow
null after argument. Set tree_bb_root.
(make_edges): ENTRY block successor is FALLTHRU.
(remove_useless_stmts_warn_notreached): Handle STATEMENT_LIST.
(struct rus_data): Add last_goto.
(remove_useless_stmts_cond): Clear it. Zap empty conditionals.
Use expr_only for simple statment elimination.
(remove_useless_stmts_tf): Clear last_goto. Use TREE_SIDE_EFFECTS
instead of IS_EMPTY_STMT. Use append_to_statement_list instead of
munging to COMPOUND_EXPR.
(remove_useless_stmts_tc): Clear last_goto. Use TREE_SIDE_EFFECTS.
(remove_useless_stmts_goto): Set last_goto.
(remove_useless_stmts_label): New. Kill goto-next-label.
(remove_useless_stmts_1): Reorg to handle STATEMENT_LIST.
(remove_bb): Simplify block removal.
(remove_bsi_from_block): Kill.
(tree_block_forwards_to): Tidy bsi loops. Do not create
block label here.
(tree_cfg2dot): Update for bb->stmt_list.
(delete_tree_cfg): Clear tree_bb_root.
(set_bb_for_stmt): Handle STATEMENT_LISTs.
(bsi_insert_before, bsi_insert_after): Re-implement on TSIs.
(bsi_move_after, bsi_move_before, bsi_move_to_bb_end): Likewise.
(bsi_replace): Likewise.
(tree_find_edge_insert_loc): New, split from ...
(bsi_insert_on_edge_immediate): ... here.
(bsi_commit_edge_inserts): Use it. Add all stmts at once.
(bsi_insert_on_edge): Use statement lists.
(tree_split_edge): Position new block correctly. Deal with
fallthrough to EXIT.
(tree_verify_flow_info): Do not check block order vs statement chain.
(tree_make_forwarder_block): Update create_bb call, fix edge flags.
(thread_jumps): Call tree_redirect_edge_and_branch directly.
(tree_block_label): Don't return a NONLOCAL_LABEL.
(tree_redirect_edge_and_branch_1): Rename from s/_1//. Take an
argument to use ssa_redirect_edge or redirect_edge_succ. Use
tree_split_edge instead of bsi_insert_on_edge_immediate.
(tree_redirect_edge_and_branch): New.
(remove_stmt, first_exec_stmt, bsi_init, bsi_next_in_bb): Kill.
(bsi_start, bsi_last, bsi_prev, bsi_from_tsi): Kill.
(bsi_update_from_tsi, bsi_link_after): Kill.
* tree-eh.c (collect_finally_tree): Handle STATEMENT_LIST.
(replace_goto_queue_1): Likewise.
(replace_goto_queue): Don't use walk_tree.
(do_return_redirection): Create statement lists.
(do_goto_redirection): Likewise.
(block_may_fallthru_last): Fold into...
(block_may_fallthru): ... here.
(frob_into_branch_around): Use append_to_statement_list.
(honor_protect_cleanup_actions): Likewise.
(lower_try_finally_nofallthru): Likewise.
(lower_try_finally_onedest): Likewise.
(lower_try_finally_copy): Likewise.
(lower_try_finally_switch): Likewise.
(lower_try_finally): Likewise.
(lower_catch): Likewise.
(lower_eh_filter): Likewise.
(lower_eh_constructs_1): Handle STATEMENT_LIST.
* tree-flow-inline.h (BSI_NUM_ELEMENTS, bsi_list_p): Remove.
(new_bsi_list, empty_bsi_stack, FOR_EACH_BSI_IN_REVERSE): Remove.
(FOR_EACH_STMT_IN_REVERSE): Remove.
(bsi_start, bsi_last, bsi_end_p): Re-implement based on TSIs.
(bsi_next, bsi_prev, bsi_stmt, bsi_stmt_ptr, bsi_remove): Likewise.
* tree-flow.h (block_stmt_iterator): Likewise.
* tree-inline.c (copy_statement_list): New.
(copy_body_r): Use it, and append_to_statement_list.
(initialize_inlined_parameters): Use append_to_statement_list.
(expand_call_inline): Likewise.
(gimple_expand_calls_inline): New.
(expand_calls_inline): Use it.
(walk_tree, unsave_r): Handle STATEMENT_LIST.
(add_stmt_to_compound): Remove.
* tree-iterator.c: New file.
* tree-iterator.h: Re-implement based on STATEMENT_LIST.
* tree-mudflap.c (mf_decl_cache_locals): Don't
rationalize_compound_expr.
* tree-optimize.c (optimize_function_tree): Make static.
Rechain statements from blocks before deleting the cfg.
* tree-pretty-print.c (dump_generic_node): Handle STATEMENT_LIST,
update for change in tree_stmt_iterator wrt COMPOUND_EXPR.
(dump_generic_node): Dump lowered COND_EXPR on a single line.
* tree-simple.c (is_gimple_stmt): Handle STATEMENT_LIST.
* tree-simple.h (foreach_stmt_fn, foreach_stmt): Remove.
(gimplify_to_stmt_list): Declare.
(alloc_stmt_list, free_stmt_list): Declare.
* tree-ssa-dce.c (should_remove_dead_stmt): Rename from
remove_dead_stmt; return bool if statement should be removed.
(remove_dead_stmts): Update to match.
* tree-ssa-live.c (build_tree_conflict_graph): Don't use
FOR_EACH_STMT_IN_REVERSE.
* tree-ssa-pre.c (reaching_def): Tidy BSI usage.
(insert_one_operand, collect_expressions): Likewise.
* tree.c (tree_size): Handle STATEMENT_LIST.
(copy_node): Abort on STATEMENT_LIST.
(expr_first, expr_last): Move to tree-iterator.c.
(expr_length): Remove.
(tree_node_structure): Handle STATEMENT_LIST.
(tsi_link_before, tsi_link_after, tsi_delink): Move to tree-iterator.c.
(tsi_link_chain_before, tsi_link_chain_after): Merge into non-chain.
(tsi_new_stmt_list, tsi_stmt_list_head, body_is_empty): Kill.
* tree.def (STATEMENT_LIST): New.
* tree.h (STATEMENT_LIST_HEAD, STATEMENT_LIST_TAIL): New.
(struct tree_statement_list_node): New.
(struct tree_statement_list): New.
(enum tree_node_structure_enum): Add TS_STATEMENT_LIST.
(union tree_node): Add stmt_list.
(expr_length): Remove.
(expr_only): New.
(add_to_compound_expr, body_is_empty): Remove.
(optimize_function_tree): Remove.
fortran/
* trans.c (gfc_trans_code): Use annotate_with_locus instead of
annotate_all_with_locus.
java/
* java-gimplify.c (java_gimplify_expr): Use annotate_with_locus
instead of annotate_all_with_locus.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73514 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
COMPOUND_EXPRs.
* tree-eh.c (collect_finally_tree): Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73198 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* c-semantics.c (genrtl_case_label): Update add_case_node call.
* c-simplify.c (gimplify_switch_stmt): Build SWITCH_EXPR and
gimplify it simultaneously with the body.
* expr.c (expand_expr_1): Handle SWITCH_BODY clear and
SWITCH_LABELS set. Update add_case_node calls.
* gimple-low.c (lower_stmt): Don't do anything for SWITCH_EXPR.
(lower_switch_expr, lower_case_label_expr): Remove.
* gimplify.c (gimplify_switch_expr): Zap SWITCH_BODY after
gimplification. Force default entry for SWITCH_LABELS.
(gimplify_case_label_expr): Rename from gimple_add_case_label.
Assert switch in scope; lower to LABEL_EXPR.
* stmt.c (pushcase, pushcase_range) Update add_case_node calls.
(add_case_node): Add dont_expand_label argument.
(same_case_target_p): Don't search rtl.
* tree-cfg.c (enum find_location_action): Remove.
(make_switch_expr_blocks): Remove.
(make_blocks): Update.
(make_case_label_edges): Remove.
(make_edges): Update.
(find_contained_blocks): Remove lowered containers.
(make_switch_expr_edges): New.
(make_ctrl_stmt_edges): Call it.
(make_cond_expr_edges): Use label_to_block.
(remove_useless_stmts_and_vars_1): Don't go into SWITCH_BODY.
(remove_unreachable_block): Remove SWITCH_EXPR special case.
(cleanup_cond_expr_graph): Tidy.
(cleanup_switch_expr_graph): Rewrite.
(disconnect_unreachable_case_labels): Remove.
(find_taken_edge_cond_expr): Use integer_zerop/integer_nonzerop.
(find_taken_edge_switch_expr): Rewrite.
(value_matches_some_label): Remove.
(find_case_label_for_value): New.
(is_ctrl_structure): Remove lowered containers.
(is_ctrl_stmt): Add SWITCH_EXPR.
(switch_parent): Remove.
(handle_switch_fallthru): Remove.
(handle_switch_split): Remove.
(find_insert_location): Merge into ...
(bsi_insert_on_edge_immediate): ... here. Simplify.
(tree_split_edge): Don't set EDGE_FALLTHRU.
* tree-eh.c (collect_finally_tree): Remove lowered containers.
(replace_goto_queue_1, block_may_fallthru_last): Likewise.
(lower_eh_constructs_1): Likewise.
(verify_norecord_switch_expr): New.
(lower_try_finally_switch): Generate lowered switches.
* tree-inline.c (expand_calls_inline): Don't search null SWITCH_BODY.
* tree-pretty-print.c (dump_generic_node): Do something sensible
with lowered switch_expr.
* tree-ssa-dom.c (record_equivalences_from_incoming_edge): Update
for lowered switch_expr.
* tree.def (SWITCH_EXPR): Update docs.
* tree.h (add_case_node): Update decl.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73080 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73009 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
(gimplify_function_tree): Return void. Remove hack for
language not supporting gimple.
* tree.h: Update decls.
* langhooks-def.h (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
* langhooks.h (struct lang_hooks): Add gimple_before_inlining.
* tree-inline.c (copy_body_r): Check that instead of
keep_function_tree_in_gimple_form.
(initialize_inlined_parameters): Likewise.
(expand_call_inline, expand_calls_inline): Likewise.
* explow.c (probe_stack_range): Never emit loop notes.
* expr.c (emit_block_move_via_loop): Likewise.
* toplev.c (rest_of_compilation): Always synthesize loop notes.
fortran/
* f96-lang.c (gfc_gimplify_expr): Remove.
(LANG_HOOKS_GIMPLIFY_EXPR): Remove.
(LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@72972 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
(c_estimate_num_insns): Kill.
* c-common.h (c_estimate_num_insns): Kill.
* c-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Kill.
* cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Kill.
* objc-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Kill.
* lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Kill.
(java_estimate_num_insns_1, java_estimate_num_insns): Kill.
* cgraphunit (cgraph_analyze_function): Use estimate_num_insns.
* tree-eh.c (decide_copy_try_finally): Likewise.
* tree-inline.c (limits_allow_inilining, optimize_inline_calls): Likewise.
(estimate_num_insns_1, estimate_num_insns): New functions.
* langhooks-def.h (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Kill.
* langhooks.h (estimate_num_inssn): Kill.
* tree-inline.h (estimate_num_insns): Declare.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@72934 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* params.def: Syncrhonize with manline.
* tree-inline.c (initialize_inlined_parameters): Set variable as
gimplified.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@72910 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
(build_and_jump): Use it.
* c-simplify.c (c_gimplify_stmt): Likewise.
(gimplify_condition): Likewise.
* tree-cfg.c (factor_computed_gotos, tree_block_forwards_to,
handle_switch_fallthru, handle_switch_split): Likewise.
* tree-ssa-dom.c (thread_edge): Likewise.
* tree-ssa-pre.c (split_critical_edges): Likewise.
* tree-tailcall.c (eliminate_tail_call): Likewise.
* tree-eh.c (frob_into_branch_around,
honor_protect_cleanup_actions, lower_try_finally_nofallthru,
lower_try_finally_onedest, lower_try_finally_copy,
lower_try_finally_switch, lower_catch, lower_eh_filter,
lower_cleanup): Likewise.
(make_label): Remove.
* tree-simple.h (create_artificial_label): Add prototype.
* tree-inline.c (expand_call_inline): Make return label for
inlined function artificial.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@72881 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@72155 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* tree-inline.c (expand_call_inline): Set input_location based
on EXPR_LOCUS; save and restore input_location around that.
(walk_tree): Do not set input_location.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@71890 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@71875 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
(DECL_SOURCE_FILE, DECL_SOURCE_LINE): Likewise.
(EXPR_LOCUS): Renamed from TREE_LOCUS. Null for non-exprs.
(SET_EXPR_LOCUS): New macro.
(EXPR_FILENAME): Renamed from TREE_FILENAME.
(EXPR_LINENO): Renamed from TREE_LINENO.
(struct tree_common): Remove locus field.
(struct tree_decl): Re-add locus field.
(struct tree_expr): Add locus field.
* c-aux-info.c, c-decl.c, coverage.c, c-parse.in, dbxout.c,
diagnostic.c, dwarf2out.c, expr.c, function.c, gimplify.c,
integrate.c, print-tree.c, stmt.c, tree.c, tree-cfg.c,
tree-dump.c, tree-flow-inline.h, config/alpha/alpha.c,
config/mips/mips.c, objc/objc-act.c: Adjust.
cp/
* class.c, decl.c, decl2.c, error.c, init.c, lex.c, method.c,
pt.c, semantics.c, tree.c: Revert from TREE_LOCUS to
DECL_SOURCE_LOCATION.
f/
* com.c, ste.c: Revert earlier change.
fortran/
* f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
TREE_LOCUS.
java/
* decl.c, jcf-parse.c, jcf-write.c, parse.h, parse.y, resource.c:
Revert from TREE_LOCUS to DECL_SOURCE_LOCATION.
treelang/
* treetree.c: Revert 2003-01-15 change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@71739 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
rather than to error_mark_node.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@71694 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@71657 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
(decide_copy_try_finally): Use estimate_num_insns to choose
between copy and switch implementations.
* c-common.c (c_estimate_num_insns): Take an expr, not a decl.
* tree-inline.c (limits_allow_inlining): Pass it the body of the decl.
* java/lang.c (java_estimate_num_insns): Take an expr, not a decl.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@71536 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@71482 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
(gimplify_decl_stmt): Use it to mark labels in static initializers.
* tree-simple.c (is_gimple_initializer): Remove.
(is_gimple_reg_type): New fn.
(is_gimple_reg): Use it. Handle SSA_NAMEs properly.
* tree-simple.h: Adjust.
* gimplify.c (gimplify_expr) <CONSTRUCTOR>: Do nothing here.
* gimplify.c (create_tmp_var): Set DECL_IGNORED_P.
* tree-inline.c (initialize_inlined_parameters): Improve error
recovery.
* gimplify.c (gimplify_boolean_expr): Just replace with a COND_EXPR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@70784 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
Fix thinko in stripping *&.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@70656 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
(EXPR_CHECK): Don't check for 'r' or 's' if we're
checking IS_EXPR_CODE_CLASS.
* calls.c (calls_function_1): Likewise.
* fold-const.c (fold): Likewise.
* tree.c (iterative_hash_expr): Likewise.
* tree-inline.c (walk_tree, copy_tree_r): Likewise.
* expr.c (expand_expr): Don't check for 'r' or 's' if we're
checking IS_EXPR_CODE_CLASS.
* tree-dfa.c (may_access_global_mem_p): Likewise.
* tree-browser.c (browse_tree): Likewise.
* tree-ssa-pre.c (defs_hash_expr): Likewise.
* gimplify.c (gimplify_expr): Likewise.
(internal_get_tmp_var): Only copy TREE_LOCUS from an expr.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@70640 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@70615 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* attribs.c (decl_attributes): Rebuild the function pointer type after
changing the target type.
* tree.c (get_qualified_type): Also check that the attributes match.
* c-typeck.c (build_array_ref): Also build ARRAY_REFs from
INDIRECT_REFs of ARRAY_TYPE.
* tree-ssa.c (tree_ssa_useless_type_conversion): Also strip
conversions between pointer and reference types.
* tree-dfa.c (get_stmt_operands): Just mark non-GIMPLE statements
as unmodified.
(find_referenced_vars): So we don't need to mark them here.
* tree-inline.c (inline_data): Add retvar field.
(declare_return_variable): Set it.
(remap_decls): Use it.
(expand_call_inline): Tweak.
cp/
* typeck.c (build_array_ref): Also build ARRAY_REFs from
INDIRECT_REFs of ARRAY_TYPE.
* semantics.c (finish_id_expression): Unshare aliases.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@70591 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@70056 138bc75d-0d04-0410-961f-82ee72b054a4
|