| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144324 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix testsuite/gfortran.dg/graphite/id-4.f90.
* graphite.c (scan_tree_for_params): Do not compute the multiplicand
when not needed.
2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
* graphite.c (build_scops_1): Initialize open_scop.exit
and sinfo.last.
2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
Jan Sjodin <jan.sjodin@amd.com>
Harsha Jagasia <harsha.jagasia@amd.com>
PR middle-end/37852
PR middle-end/37883
PR middle-end/37928
PR middle-end/37980
PR middle-end/38038
PR middle-end/38039
PR middle-end/38073
PR middle-end/38083
PR middle-end/38125
* tree-phinodes.c (remove_phi_nodes): New, extracted from...
* tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block): ...here.
* tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
* Makefile.in (graphite.o): Depend on value-prof.h.
(graphite.o-warn): Removed -Wno-error.
* tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
to be a NULL pointer. Call update_stmt. Return the newly created
cannonical induction variable.
* graphite.h (debug_rename_map): Declared. Fix some comments.
* graphite.c: Reimplement the code generation from graphite to gimple.
Include value-prof.h.
(loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
(get_old_iv_from_ssa_name): Removed.
(graphite_stmt_p): New.
(new_graphite_bb): Test for useful statements before building a
graphite statement for the basic block.
(free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
reason.
(recompute_all_dominators, graphite_verify,
nb_reductions_in_loop, graphite_loop_normal_form): New.
(scop_record_loop): Call graphite_loop_normal_form.
(build_scop_loop_nests): Iterate over all the blocks of the
function instead of relying on the incomplete information from
SCOP_BBS. Return the success of the operation.
(find_params_in_bb): Use the data from GBB_DATA_REFS.
(add_bb_domains): Removed.
(build_loop_iteration_domains): Don't call add_bb_domains.
Add the iteration domain only to the basic blocks that have been
translated to graphite.
(build_scop_conditions_1): Add constraints only if the basic
block have been translated to graphite.
(build_scop_data_accesses): Completely disabled until data
dependence is correctly implemented.
(debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
(remove_all_edges_1, remove_all_edges): Removed.
(get_new_name_from_old_name): New.
(graphite_rename_variables_in_stmt): Renamed
rename_variables_in_stmt. Call get_new_name_from_old_name.
Use replace_exp and update_stmt.
(is_old_iv): Renamed is_iv.
(expand_scalar_variables_stmt): Extra parameter for renaming map.
Use replace_exp and update_stmt.
(expand_scalar_variables_expr): Same. Use the map to get the
new names for the renaming of induction variables and for the
renaming of variables after a basic block has been copied.
(expand_scalar_variables): Same.
(graphite_rename_variables): Renamed rename_variables.
(move_phi_nodes): Removed.
(get_false_edge_from_guard_bb): New.
(build_iv_mapping): Do not insert the induction variable of a
loop in the renaming iv map if the basic block does not belong
to that loop.
(register_old_new_names, graphite_copy_stmts_from_block,
copy_bb_and_scalar_dependences): New.
(translate_clast): Heavily reimplemented: copy basic blocks,
do not move them. Finally, in call cleanup_tree_cfg in gloog.
At each translation step call graphite_verify ensuring the
consistency of the SSA, loops and dominators information.
(collect_virtual_phis, find_vdef_for_var_in_bb,
find_vdef_for_var_1, find_vdef_for_var,
patch_phis_for_virtual_defs): Removed huge hack.
(mark_old_loops, remove_dead_loops, skip_phi_defs,
collect_scop_exit_phi_args, patch_scop_exit_phi_args,
gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
(remove_sese_region, ifsese, if_region_entry, if_region_exit,
if_region_get_condition_block, if_region_set_false_region,
create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
sese_add_exit_phis_edge, sese_add_exit_phis_var,
rewrite_into_sese_closed_ssa): New.
(gloog): Remove dead code. Early return if code cannot be
generated. Call cleanup_tree_cfg once the scop has been code
generated.
(graphite_trans_scop_block, graphite_trans_loop_block): Do not
block loops with less than two loops.
(graphite_apply_transformations): Remove the call to
scop_remove_ignoreable_gbbs.
(limit_scops): When build_scop_loop_nests fails, continue on next scop.
Fix open_scop.entry.
(graphite_transform_loops): Call recompute_all_dominators: force the
recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
Call initialize_original_copy_tables and free_original_copy_tables
to be able to copy basic blocks during code generation.
When build_scop_loop_nests fails, continue on next scop.
(value_clast): New union.
(clast_to_gcc_expression): Fix type cast warning.
2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
* gcc.dg/graphite/pr37928.c: New.
* gcc.dg/graphite/pr37883.c: New.
* gcc.dg/graphite/pr38073.c: New.
* gcc.dg/graphite/pr38125.c: New.
* gfortran.dg/graphite/pr38083.f90: New.
* gfortran.dg/graphite/pr37852.f90: New.
* gfortran.dg/graphite/pr37980.f90: New.
* gfortran.dg/graphite/id-2.f90: New.
* gfortran.dg/graphite/id-4.f90: New.
* gcc.dg/graphite/scop-18.c: Remove reduction, test for
the number of detected scops. Copy exact same test for loop blocking...
* gcc.dg/graphite/block-1.c: Fix the number of expected loops
to be blocked as reductions are not handled.
* gcc.dg/graphite/block-4.c: ...here. New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142673 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tobias Grosser <grosser@fim.uni-passau.de>
Jan Sjodin <jan.sjodin@amd.com>
Harsha Jagasia <harsha.jagasia@amd.com>
Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
Konrad Trifunovic <konrad.trifunovic@inria.fr>
Adrien Eliche <aeliche@isty.uvsq.fr>
Merge from graphite branch.
* configure: Regenerate.
* Makefile.in: Regenerate.
* configure.ac (host_libs): Add ppl and cloog.
Add checks for PPL and CLooG.
* Makefile.def (ppl, cloog): Added modules and dependences.
* Makefile.tpl (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): New.
(HOST_PPLLIBS, HOST_PPLINC, HOST_CLOOGLIBS, HOST_CLOOGINC): New.
gcc/
* graphite.c: New.
* graphite.h: New.
* tree-loop-linear.c (perfect_loop_nest_depth): Export.
* doc/invoke.texi (-floop-block, -floop-interchange,
-floop-strip-mine): Document new flags.
* tree-into-ssa.c (gimple_vec): Moved...
* tree-loop-distribution.c (rdg_component): Moved...
* cfgloopmanip.c: Include tree-flow.h.
(update_dominators_in_loop): New.
(create_empty_if_region_on_edge): New.
(create_empty_loop_on_edge): New.
(loopify): Use update_dominators_in_loop.
* tree-pass.h (pass_graphite_transforms): Declared.
* configure: Regenerate.
* tree-phinodes.c (make_phi_node): Export.
(add_phi_node_to_bb): New, split from create_phi_node.
* tree-chrec.c (for_each_scev_op): New.
* tree-chrec.h (for_each_scev_op): Declared.
* tree-ssa-loop-ivopts.c (get_phi_with_result): New.
(remove_statement): Call get_phi_with_result.
* config.in (HAVE_cloog): Undef.
* gdbinit.in (pgg): New.
* timevar.def (TV_GRAPHITE_TRANSFORMS): New.
* tree-ssa-loop.c (graphite_transforms): New.
(gate_graphite_transforms): New.
(pass_graphite_transforms): New.
* configure.ac (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC,
HAVE_cloog): Defined.
* tree-vectorizer.c (rename_variables_in_bb): Export.
* tree-data-ref.c (dr_may_alias_p): Export.
(stmt_simple_memref_p): New.
(find_data_references_in_stmt): Export.
(find_data_references_in_loop): Export.
(create_rdg_edge_for_ddr): Initialize RDGE_RELATION.
(create_rdg_edges_for_scalar): Initialize RDGE_RELATION.
(create_rdg_vertices): Export.
(build_empty_rdg): New.
(build_rdg): Call build_empty_rdg. Free dependence_relations.
* tree-data-ref.h (rdg_component): ... here.
(scop_p): New.
(struct data_reference): Add a field scop.
(DR_SCOP): New.
(find_data_references_in_loop): Declared.
(find_data_references_in_stmt): Declared.
(create_rdg_vertices): Declared.
(dr_may_alias_p): Declared.
(stmt_simple_memref_p): Declared.
(struct rdg_edge): Add a field ddr_p relation.
(build_empty_rdg): Declared.
* lambda.h (lambda_matrix): Declare a VEC of.
(find_induction_var_from_exit_cond): Declared.
(lambda_vector_compare): New.
* common.opt (fgraphite, floop-strip-mine,
floop-interchange, floop-block): New flags.
* lambda-code.c (find_induction_var_from_exit_cond): Export.
* cfgloop.c (is_loop_exit): New.
* cfgloop.h (is_loop_exit): Declared.
(create_empty_if_region_on_edge): Declared.
(create_empty_loop_on_edge): Declared.
* tree-flow.h (add_phi_node_to_bb): Declared.
(make_phi_node): Declared.
(rename_variables_in_bb): Declared.
(perfect_loop_nest_depth): Declared.
(graphite_transform_loops): Declared.
* Makefile.in (cfgloopmanip.o): Depend on TREE_FLOW_H.
(graphite.o-warn): Add -Wno-error.
(PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): Declared.
(LIBS): Add GMPLIBS, CLOOGLIBS, PPLLIBS.
(INCLUDES): Add PPLINC, CLOOGINC.
(OBJS-common): Add graphite.o.
(graphite.o): Add rule.
* gimple.h (gimple_vec): ... here.
* tree-cfg.c (print_loops): Start printing at ENTRY_BLOCK_PTR.
* passes.c (init_optimization_passes): Schedule
pass_graphite_transforms.
testsuite/
* gcc.dg/graphite/scop-{0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,18}.c: New.
* gcc.dg/graphite/graphite.exp: New.
* gcc.dg/graphite/scop-matmult.c: New.
* gcc.dg/graphite/block-0.c: New.
* lib/target-supports.exp (check_effective_target_fgraphite): New.
* gfortran.dg/graphite/block-1.f90: New.
* gfortran.dg/graphite/scop-{1,2}.f: New.
* gfortran.dg/graphite/block-{1,3,4}.f90: New.
* gfortran.dg/graphite/graphite.exp: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139893 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Merge from gimple-tuples-branch.
* ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
* gimple.def: New file.
* gsstruct.def: Likewise.
* gimple-iterator.c: Likewise.
* gimple-pretty-print.c: Likewise.
* tree-gimple.c: Removed. Merged into ...
* gimple.c: ... here. New file.
* tree-gimple.h: Removed. Merged into ...
* gimple.h: ... here. New file.
* Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h.
* configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the
--enable-checking=gimple flag.
* config.in: Likewise.
* configure: Regenerated.
* tree-ssa-operands.h: Tuplified.
* tree-vrp.c: Likewise.
* tree-loop-linear.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-dump.c: Likewise.
* tree-complex.c: Likewise.
* cgraphbuild.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-pretty-print.c: Likewise.
* tracer.c: Likewise.
* gengtype.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-ssa-loop-unswitch.c: Likewise.
* cgraph.c: Likewise.
* cgraph.h: Likewise.
* tree-ssa-loop-manip.c: Likewise.
* value-prof.c: Likewise.
* tree-ssa-loop-ch.c: Likewise.
* tree-tailcall.c: Likewise.
* value-prof.h: Likewise.
* tree.c: Likewise.
* tree.h: Likewise.
* tree-pass.h: Likewise.
* ipa-cp.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-scalar-evolution.h: Likewise.
* target.h: Likewise.
* lambda-mat.c: Likewise.
* tree-phinodes.c: Likewise.
* diagnostic.h: Likewise.
* builtins.c: Likewise.
* tree-ssa-alias-warnings.c: Likewise.
* cfghooks.c: Likewise.
* fold-const.c: Likewise.
* cfghooks.h: Likewise.
* omp-low.c: Likewise.
* tree-ssa-dse.c: Likewise.
* ipa-reference.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* toplev.c: Likewise.
* tree-gimple.c: Likewise.
* tree-gimple.h: Likewise.
* tree-chrec.c: Likewise.
* tree-chrec.h: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-sccvn.h: Likewise.
* cgraphunit.c: Likewise.
* tree-ssa-copyrename.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-nomudflap.c: Likewise.
* tree-call-cdce.c: Likewise.
* ipa-pure-const.c: Likewise.
* c-format.c: Likewise.
* tree-stdarg.c: Likewise.
* tree-ssa-math-opts.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-nrv.c: Likewise.
* tree-ssa-propagate.c: Likewise.
* ipa-utils.c: Likewise.
* tree-ssa-propagate.h: Likewise.
* tree-ssa-alias.c: Likewise.
* gimple-low.c: Likewise.
* tree-ssa-sink.c: Likewise.
* ipa-inline.c: Likewise.
* c-semantics.c: Likewise.
* dwarf2out.c: Likewise.
* expr.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* predict.c: Likewise.
* tree-ssa-loop.c: Likewise.
* tree-parloops.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-ifcombine.c: Likewise.
* matrix-reorg.c: Likewise.
* c-decl.c: Likewise.
* tree-eh.c: Likewise.
* c-pretty-print.c: Likewise.
* lambda-trans.c: Likewise.
* function.c: Likewise.
* langhooks.c: Likewise.
* ebitmap.h: Likewise.
* tree-vectorizer.c: Likewise.
* function.h: Likewise.
* langhooks.h: Likewise.
* tree-vectorizer.h: Likewise.
* ipa-type-escape.c: Likewise.
* ipa-type-escape.h: Likewise.
* domwalk.c: Likewise.
* tree-if-conv.c: Likewise.
* profile.c: Likewise.
* domwalk.h: Likewise.
* tree-data-ref.c: Likewise.
* tree-data-ref.h: Likewise.
* tree-flow-inline.h: Likewise.
* tree-affine.c: Likewise.
* tree-vect-analyze.c: Likewise.
* c-typeck.c: Likewise.
* gimplify.c: Likewise.
* coretypes.h: Likewise.
* tree-ssa-phiopt.c: Likewise.
* calls.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree.def: Likewise.
* tree-dfa.c: Likewise.
* except.c: Likewise.
* except.h: Likewise.
* cfgexpand.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-predcom.c: Likewise.
* lambda.h: Likewise.
* tree-mudflap.c: Likewise.
* ipa-prop.c: Likewise.
* print-tree.c: Likewise.
* tree-ssa-copy.c: Likewise.
* ipa-prop.h: Likewise.
* tree-ssa-forwprop.c: Likewise.
* ggc-page.c: Likewise.
* c-omp.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-ssa-ter.c: Likewise.
* tree-nested.c: Likewise.
* tree-ssa.c: Likewise.
* lambda-code.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-inline.c: Likewise.
* tree-inline.h: Likewise.
* tree-iterator.c: Likewise.
* tree-optimize.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-vect-transform.c: Likewise.
* tree-object-size.c: Likewise.
* tree-outof-ssa.c: Likewise.
* cfgloop.c: Likewise.
* system.h: Likewise.
* tree-profile.c: Likewise.
* cfgloop.h: Likewise.
* c-gimplify.c: Likewise.
* c-common.c: Likewise.
* tree-vect-generic.c: Likewise.
* tree-flow.h: Likewise.
* c-common.h: Likewise.
* basic-block.h: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-switch-conversion.c: Likewise.
* tree-ssa-structalias.h: Likewise.
* tree-cfg.c: Likewise.
* passes.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa-struct-reorg.h: Likewise.
* tree-ssa-reassoc.c: Likewise.
* cfgrtl.c: Likewise.
* varpool.c: Likewise.
* stmt.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* langhooks-def.h: Likewise.
* tree-ssa-operands.c: Likewise.
* config/alpha/alpha.c: Likewise.
* config/frv/frv.c: Likewise.
* config/s390/s390.c: Likewise.
* config/m32c/m32c.c: Likewise.
* config/m32c/m32c-protos.h: Likewise.
* config/spu/spu.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/i386/i386.c: Likewise.
* config/sh/sh.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/pa/pa.c: Likewise.
* config/mips/mips.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138207 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tracer.c (tail_duplicate): Fix for -Wc++-compat.
* tree-affine.c (aff_combination_expand, free_name_expansion):
Likewise.
* tree-cfg.c (replace_by_duplicate_decl, replace_ssa_name,
move_stmt_r, new_label_mapper): Likewise.
* tree-complex.c (cvc_lookup): Likewise.
* tree-dfa.c (create_function_ann): Likewise.
* tree-dump.c (dump_register): Likewise.
* tree-if-conv.c (tree_if_conversion, add_to_predicate_list,
find_phi_replacement_condition): Likewise.
* tree-inline.c (copy_phis_for_bb, estimate_num_insns_1,
tree_function_versioning): Likewise.
* tree-into-ssa.c (cmp_dfsnum): Likewise.
* tree-iterator.c (tsi_link_before, tsi_link_after): Likewise.
* tree-nested.c (lookup_field_for_decl, lookup_tramp_for_decl,
get_nonlocal_debug_decl, convert_nonlocal_reference,
convert_nonlocal_omp_clauses, get_local_debug_decl,
convert_local_reference, convert_local_omp_clauses,
convert_nl_goto_reference, convert_nl_goto_receiver,
convert_tramp_reference, convert_call_expr): Likewise.
* tree-outof-ssa.c (contains_tree_r): Likewise.
* tree-parloops.c (reduction_phi, initialize_reductions,
eliminate_local_variables_1, add_field_for_reduction,
add_field_for_name, create_phi_for_local_result,
create_call_for_reduction_1, create_loads_for_reductions,
create_stores_for_reduction, create_loads_and_stores_for_name):
Likewise.
* tree-phinodes.c (allocate_phi_node): Likewise.
* tree-predcom.c (order_drefs, execute_pred_commoning_cbck):
Likewise.
* tree-sra.c (sra_elt_hash, sra_elt_eq, lookup_element):
Likewise.
* tree-ssa-alias.c (get_mem_sym_stats_for): Likewise.
* tree-ssa-coalesce.c (compare_pairs): Likewise.
* tree-ssa-loop-im.c (mem_ref_in_stmt, memref_hash, memref_eq,
memref_free, gather_mem_refs_stmt, vtoe_hash, vtoe_eq, vtoe_free,
record_vop_access, get_vop_accesses, get_vop_stores): Likewise.
* tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
* tree-ssa-sccvn.c (VN_INFO_GET, free_phi, free_reference,
vn_nary_op_insert): Likewise.
* tree-ssa.c (redirect_edge_var_map_add,
redirect_edge_var_map_clear, redirect_edge_var_map_dup): Likewise.
* tree-vectorizer.c (vectorize_loops): Likewise.
* tree.c (make_node_stat, copy_node_stat, build_int_cst_wide,
build_fixed, build_real, make_tree_binfo_stat, make_tree_vec_stat,
tree_cons_stat, build1_stat, build_variant_type_copy,
decl_init_priority_lookup, decl_fini_priority_lookup,
decl_priority_info, decl_restrict_base_lookup,
decl_restrict_base_insert, decl_debug_expr_lookup,
decl_debug_expr_insert, decl_value_expr_lookup,
decl_value_expr_insert, type_hash_eq, type_hash_lookup,
type_hash_add, get_file_function_name, tree_check_failed,
tree_not_check_failed, tree_range_check_failed,
omp_clause_range_check_failed, build_omp_clause,
build_vl_exp_stat): Likewise.
* value-prof.c (gimple_histogram_value,
gimple_duplicate_stmt_histograms): Likewise.
* var-tracking.c (attrs_list_insert, attrs_list_copy,
unshare_variable, variable_union_info_cmp_pos, variable_union,
dataflow_set_different_1, dataflow_set_different_2,
vt_find_locations, variable_was_changed, set_variable_part,
emit_notes_for_differences_1, emit_notes_for_differences_2):
Likewise.
* varasm.c (prefix_name, emutls_decl, section_entry_eq,
section_entry_hash, object_block_entry_eq,
object_block_entry_hash, create_block_symbol,
initialize_cold_section_name, default_function_rodata_section,
strip_reg_name, set_user_assembler_name, const_desc_eq,
build_constant_desc, output_constant_def, lookup_constant_def,
const_desc_rtx_hash, const_desc_rtx_eq, const_rtx_hash_1,
create_constant_pool, force_const_mem, compute_reloc_for_rtx_1,
default_internal_label): Likewise.
* varray.c (varray_init, varray_grow): Likewise.
* vec.c (vec_gc_o_reserve_1, vec_heap_o_reserve_1): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136992 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
| |
License and to point readers at the COPYING3 file and the FSF's license web page.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126948 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use phi_nodes_ptr.
(create_phi_node): Use set_phi_nodes.
* omp-low.c (expand_omp_parallel): Use bb_stmt_list.
* tree-if-conv.c (process_phi_nodes): Use set_phi_nodes.
(combine_blocks): Use bb_stmt_list and set_bb_stmt_list.
* tree-flow-inline.h (phi_nodes, set_phi_nodes,
(bsi_start, bsi_last): Use bb_stmt_list.
(phi_nodes_ptr, bb_stmt_list, set_bb_stmt_list): New functions.
* cfgexpand.c (expand_gimple_basic_block): Use bb_stmt_list.
Traverse the statements using tsi iterator.
* basic-block.h (struct basic_block_def): Fields stmt_list
and phi_nodes moved to ...
(struct tree_bb_info): ... new structure.
* tree-cfg.c (create_bb): Allocate il.tree. Use set_bb_stmt_list.
(tree_merge_blocks): Use bb_stmt_list and set_bb_stmt_list.
(remove_bb): Handle blocks with NULL stmt list. Clear il.tree field.
(tree_verify_flow_info): Verify that il.tree is not set for
entry and exit block.
(tree_split_block): Use set_bb_stmt_list.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124086 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tree.h (GIMPLE_TUPLE_P): Also true for PHI_NODEs.
(GENERIC_NEXT): New function macro.
(PHI_CHAIN): Use phi_node's new chain variable.
(tree_phi_node): Change tree_common to tree_base
and add the chain field.
* tree-phinodes.c (make_phi_node): Don't set
TREE_TYPE on the new node.
* c-decl.c (lang_tree_node): Use GENERIC_NEXT
instead of checking GIMPLE_TUPLE_P in chain_next.
* tree-vect-transform.c
(get_initial_def_for_induction): Look at
PHI_RESULT_TREE for the type of the phi node.
(update_vuses_to_preheader): Use PHI_CHAIN
instead of TREE_CHAIN on the phi node.
* tree-ssa-structalias.c (compute_points_to_sets):
Likewise.
(ipa_pta_execute): Likewise.
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
* cp-tree.h (lang_tree_node): Use GENERIC_NEXT
instead of checking GIMPLE_STMT_P in chain_next.
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
* ada-tree.h (lang_tree_node): Use GENERIC_NEXT
instead of checking GIMPLE_STMT_P in chain_next.
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
* f95-lang.c (lang_tree_node): Use GENERIC_NEXT
instead of checking GIMPLE_STMT_P in chain_next.
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
* java-tree.h (lang_tree_node): Use GENERIC_NEXT
instead of checking GIMPLE_STMT_P in chain_next.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124021 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tree-phinodes.c (remove_phi_node): Add argument
RELEASE_LHS_P. If given, release the SSA name on the LHS of
the PHI node.
Update all users.
* tree-ssa-dce.c: Remove forward declarations for static
functions. Re-arrange functions bodies as needed.
(find_obviously_necessary_stmts): Never mark PHI nodes as
obviously necessary.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119740 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
typos.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113621 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR tree-optimization/27381
* tree-phinodes.c (remove_phi_arg_num): When moving a phi argument,
maintain the same immediate_use links.
* tree-ssa-operands.c (dump_immediate_uses_for): Show iteration marker
node rather than segfaulting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113499 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
| |
* tree-phinodes.c (add_phi_arg): No longer initialize PHI_ARG_NONZERO.
(remove_phi_arg_num): No longer copy PHI_ARG_NONZERO from the old
node to the new node.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111400 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
| |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101317 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
predictions. Remove tree_annotations.
* predict.c (tree_predicted_by_p, tree_predict_edge,
combine_predictions_for_bb): Adjust references to predictions.
* tree-cfg.c (init_empty_tree_cfg, create_bb): Don't call
create_block_annotation.
(create_block_annotation, free_blocks_annotatios,
clear_blocks_annotations): Remove.
(dump_cfg_stats): Don't print out the memory spent on
bb_ann_d.
(delete_tree_cfg_annotations): Don't call free_blocks_annotations.
* tree-flow-inline.h (bb_ann): Remove.
(phi_nodes, set_phi_nodes): Update references to phi_nodes.
* tree-flow.h (bb_ann_d): Remove.
* tree-if-conv.c (process_phi_nodes): Update a reference to
phi_nodes.
* tree-phinodes.c (reserve_phi_args_for_new_edge,
create_phi_node, remove_phi_node): Likewise.
* tree-pretty-print.c (dump_generic_bb_buff): Don't call bb_ann.
* tree-ssa-dom.c (threaded_blocks): New.
(tree_ssa_dominator_optimize): Initialize, clear, and free
threaded_blocks. Update a call to thread_through_all_blocks.
(thread_across_edge): Use threaded_blocks instead of setting
incoming_edge_threaded.
* tree-ssa-threadupdate.c (threaded_through_all_blocks): Take
a bitmap of blocks that are threaded through.
* tree.h: Move the prototype of threaded_through_blocks to
tree-flow.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100279 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lambda-code.c (gcc_loop_to_lambda_loop,
lambda_loopnest_to_gcc_loopnest, phi_loop_edge_uses_def,
stmt_is_bumper_for_loop, perfect_nest_p, replace_uses_of_x_with_y): Use
generic operand interface.
* tree-data-ref.c (find_data_references_in_loop): Use generic interface.
* tree-dfa.c (collect_dfa_stats_r, mark_new_vars_to_rename): Use
generic operand interface.
* tree-flow-inline.h (delink_imm_use, link_imm_use_to_list,
link_imm_use, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt,
next_safe_imm_use, has_zero_uses, has_single_use, single_imm_use,
num_imm_uses): Use ssa_use_operand_t.
(get_def_ops, get_use_ops, get_v_may_def_ops, get_vuse_ops,
get_v_must_def_ops): Delete.
(get_def_from_ptr, get_phi_result_ptr): Get def directly now.
(get_use_op_ptr, get_def_op_ptr, get_v_may_def_result_ptr,
get_v_may_def_op_ptr, get_vuse_op_ptr, get_v_must_def_result_ptr,
get_v_must_def_kill_ptr): Delete.
(delink_stmt_imm_use): Move and use new operand interface.
(op_iter_next_use, op_iter_next_def, op_iter_next_tree, op_iter_init,
op_iter_next_tree): Use new operand implementation.
(clear_and_done_ssa_iter): New. Initialize a blank operand iterator.
(op_iter_init_use, op_iter_init_def, op_iter_init_tree): Add iterator
type check.
(op_iter_next_mustdef, op_iter_next_maydef,
op_iter_next_must_and_may_def): Delete. Replace with...
(op_iter_next_maymustdef): New. Combine must and may next operations.
(op_iter_init_maydef, op_iter_init_mustdef,
op_iter_init_must_and_may_def): Use new interface.
(single_ssa_tree_operand ): New. Process single operands only as trees.
(single_ssa_use_operand): New. Process single operands only as uses.
(single_ssa_def_operand): New. Process single operands only as defs.
(zero_ssa_operands): New. Return TRUE if there are zero operands of the
specified types.
(num_ssa_operands): New. Count the number of specified operands.
(compare_ssa_operands_equal): New. Compare two statements' operands.
(single_phi_def): New. Return true if PHI has one def of the specified
operand type.
(op_iter_init_phiuse): New. Initialize the iterator for PHI arguments.
(op_iter_init_phidef): New. Initialize the iterator for the PHI def.
* tree-flow.h (struct immediate_use_iterator_d): Use ssa_use_operand_t.
(struct stmt_ann_d): Operands field no longer require GTY().
(vn_compute, vn_lookup_or_add, vn_add, vn_lookup): Change prototype.
* tree-into-ssa.c (mark_def_sites): Use SSA_OP_VMUSTKILL.
* tree-outof-ssa.c (check_replaceable, find_replaceable_in_bb,
dump_replaceable_exprs, rewrite_trees): Use generic interface.
* tree-phinodes.c (make_phi_node, release_phi_node, resize_phi_node):
Use use_operand_p instead of ssa_imm_use_t *.
* tree-pretty-print.c (dump_vops): check if operands are active before
dumping virtual operands.
* tree-sra.c (sra_walk_function): Use ZERO_SSA_OPERANDS.
* tree-ssa-ccp.c (likely_value): Use ZERO_SSA_OPERANDS.
(ccp_fold): Use new interface.
(ccp_visit_stmt): Remove unused variables and code.
(convert_to_gimple_builtin): Insert statements before calling
mark_new_vars_to_rename.
* tree-ssa-copy.c (stmt_may_generate_copy): Use ZERO_SSA_OPERANDS.
(copy_prop_visit_cond_stmt): Use generic interface.
* tree-ssa-dom.c (struct expr_hash_elt): Use stmt pointer, not the
annotation in table.
(thread_across_edge): Use generic interface.
(initialize_hash_element): Initialzie with stmt, not annotation.
(eliminate_redundant_computations): Use generic interface.
(record_equivalences_from_stmt): Pass stmt, not annotation.
(avail_expr_hash, real_avail_expr_hash, avail_expr_eq): Use generic
interface.
* tree-ssa-dse.c (dse_optimize_stmt): Use ZERO_SSA_OPERANDS.
* tree-ssa-loop-ivopts.c (find_invariants_stmt,
find_interesting_uses_stmt, protect_loop_closed_ssa_form_use): Use
generic operand interface.
* tree-ssa-loop-niter.c (chain_of_csts_start, get_val_for): Use generic
interface.
* tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Use Generic operand
Interface.
* tree-ssa-operands.c (struct opbuild_list_d): New. Operand build type.
(build_defs, build_uses, build_v_may_defs, build_vuses,
build_v_must_defs): Change type to struct opbuild_list_d.
(ops_active): New. Operands active boolean.
(operand_memory, operand_memory_index): New. Operand memory managers.
(allocate_def_optype, allocate_use_optype, allocate_v_may_def_optype,
allocate_vuse_optype, allocate_v_must_def_optype): Delete.
(free_uses, free_defs, free_vuses, free_v_may_defs, free_v_must_defs):
Change from functions to static variable list heads.
(opbuild_initialize_virtual): New. Initialize a virtual build list.
(opbuild_initialize_real): New. Initialize a virtual build list.
(opbuild_free): New. Free a build list.
(opbuild_num_elems): New. Number of items in a list.
(opbuild_append_real): New. Add a real (tree *) operand.
(opbuild_append_virtual): New. Add and sort a virtual (tree) operand.
(opbuild_first): New. Return first element index in a list.
(opbuild_next): New. Return next element in a list.
(opbuild_elem_real): New. Return real element.
(opbuild_elem_virtual): New. Return virtual element.
(opbuild_elem_uid): New. Return UID of virtual element.
(opbuild_clear): New. Reset an operand list.
(opbuild_remove_elem): New. Remove an element form a list.
(ssa_operands_active): New. Return true if operand cache is active.
(init_ssa_operands, fini_ssa_operands): Initialize new implementation.
(ssa_operand_alloc): New. Allocate memory from an operand chunk.
(correct_use_link): Use use_operand_p.
(finalize_ssa_uses, finalize_ssa_v_may_defs, finalize_ssa_defs,
finalize_ssa_vuses, finalize_ssa_v_must_defs): New implmentation.
(cleanup_v_may_defs): Use new implmentation.
(finalize_ssa_stmt_operands, start_ssa_stmt_operands): New
implementation.
(append_def, append_use, append_v_may_def, append_vuse,
append_v_must_def): Call opbuild_append routine instead of using varray.
(build_ssa_operands): Simplify to simply use stmt, don't maintain a
global parse_old_ops variable.
(free_ssa_operands): New implementation.
(update_stmt_operands): Move. Change argument to build_ssa_operands.
(copy_virtual_operands): Move. New generic implementation.
(create_ssa_artficial_load_stmt): Move. New implementation.
(swap_tree_operands): Update for new implementation.
(get_expr_operands): Add stmt parameter to calls to swap_tree_operands.
(add_call_clobber_ops, add_call_read_ops): Initialize opbuild list
rather than a varray.
(verify_imm_links): Use use_operand_p.
(dump_immediate_uses_for): If the immediate use variable is a virtual
variable, show the virtual ops in the stmt.
* tree-ssa-operands.h (def_operand_p): No longer a structure.
(NULL_DEF_OPERAND_P): Now a #define.
(def_optype_d, use_optype_d, v_def_use_operand_type, v_may_def_optype_d,
vuse_operand_type, vuse_optype_d, v_must_def_optype_d): Delete.
(def_optype_d, use_optype_d, maydef_optype_d, vuse_optype_d,
mustdef_optype_d): New. Use Linked list representation.
(SSA_OPERAND_MEMORY_SIZE): New. Size of operand memory chunk.
(struct ssa_operand_memory_d): New. Allocated Chunk node.
(struct stmt_operands_d): Change to new pointers that are not GTY.
(STMT_USE_OPS, NUM_USES, SET_USE_OP, STMT_DEF_OPS, NUM_DEFS, SET_DEF_OP,
STMT_V_MAY_DEF_OPS, NUM_V_MAY_DEFS, SET_V_MAY_DEF_RESULT,
SET_V_MAY_DEF_OP, STMT_VUSE_OPS, NUM_VUSES, SET_VUSE_OP,
STMT_V_MUST_DEF_OPS, NUM_V_MUST_DEFS, SET_V_MUST_DEF_RESULT,
SET_V_MUST_DEF_KILL): Delete.
(V_MAY_DEF_OPS, V_MAY_DEF_RESULT_PTR, V_MAY_DEF_RESULT,
V_MAY_DEF_OP_PTR, V_MAY_DEF_OP): Rename to MAYDEF_*.
(V_MUST_DEF_OPS, V_MUST_DEF_RESULT_PTR, V_MUST_DEF_RESULT,
V_MUST_DEF_KILL_PTR, V_MUST_DEF_KILL): Rename to MUSTDEF_*.
(enum ssa_op_iter_type): Operand iterator typechecking values.
(struct ssa_operand_iterator_d): Use linked lists of operands.
(SSA_OP_VMUSTDEFKILL): Rename to SSA_OP_VMUSTKILL.
(FOR_EACH_SSA_MAYDEF_OPERAND, FOR_EACH_SSA_MUSTDEF_OPERAND,
FOR_EACH_SSA_MUST_AND_MAY_DEF_OPERAND): Use op_iter_next_maymustdef.
(FOR_EACH_PHI_ARG): New. Iterate over PHI arguments.
(FOR_EACH_PHI_OR_STMT_USE): New. Iterate over PHI or stmt uses.
(FOR_EACH_PHI_OR_STMT_DEF): New. Iterate over PHI or stmt defs.
(SINGLE_SSA_TREE_OPERAND, SINGLE_SSA_USE_OPERAND,
SINGLE_SSA_DEF_OPERAND, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): New.
* tree-ssa-opfinalize.h: New. Function templates for expansion.
(FINALIZE_ALLOC): Expands into alloc_def, alloc_use, alloc_maydef,
alloc_vuse, and alloc_mustdef.
(FINALIZE_FUNC): Expands into finalize_ssa_def_ops,
finalize_ssa_use_ops, finalize_ssa_v_may_def_ops, finalize_ssa_vuse_ops,
and finalize_ssa_v_must_def_ops.
* tree-ssa-pre.c (add_to_sets): Pass tree to vn_add.
(create_value_expr_from): Use stmt not vuse_optype as a parameter. Pass
stmt around.
(compute_avail): Use generic iterator interface.
* tree-ssa-propagate.c (first_vdef): Use generic operand interface.
(stmt_makes_single_load, stmt_makes_single_store): Use
ZERO_SSA_OPERANDS.
* tree-ssa-sink.c (is_hidden_global_store): Use ZERO_SSA_OPERANDS.
(statement_sink_location): Use generic interface.
* tree-ssa.c (verify_ssa): Use %p in fprintf. Use generic interface.
(delete_tree_ssa): Don't call release_defs. Call release_ssa_name and
reset the immediate use link nodes.
(stmt_references_memory_p): Use ZERO_SSA_OPERANDS.
* tree-ssanames.c (make_ssa_name): Use use_operand_p.
* tree-tailcall.c (find_tail_calls): Use ZERO_SSA_OPERANDS.
(eliminate_tail_call): Use generic operand interface.
* tree-vect-analyze.c (vect_analyze_data_refs): Use ZERO_SSA_OPERANDS.
(vect_mark_relevant, vect_mark_stmts_to_be_vectorized): Use generic
interface.
* tree-vect-transform.c (update_vuses_to_preheader): Use generic
interface.
* tree-vectorizer.c (rename_variables_in_bb): Use generic interface.
* tree-vn.c (struct val_expr_pair_d): Cache statment pointer instead of
vuse_optype.
(vn_compute, val_expr_pair_hash, vn_add, vn_lookup, vn_lookup_or_add):
Use statement pointer instead of vuse_optype. Use generic interface.
* tree-vrp.c (maybe_add_assert_expr): Use generic interface.
(stmt_interesting_for_vrp, vrp_visit_stmt): Use ZERO_SSA_OPERANDS.
* tree.h (struct ssa_imm_use_d): Renamed to ssa_use_operand_d.
(tree_ssa_name, phi_arg_d): Use ssa_use_operand_d.
* doc/tree-ssa.texi: Update documentation for operand interface.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99155 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile.in (tree-into-ssa.o): Add dependency on PARAMS_H.
* lambda-code.c (perfect_nestify): Mark virtual operands in
the moved statement for renaming.
* params.def (PARAM_MIN_VIRTUAL_MAPPINGS): Define.
(PARAM_VIRTUAL_MAPPINGS_TO_SYMS_RATIO): Define.
* params.h (MIN_VIRTUAL_MAPPINGS): Define.
(VIRTUAL_MAPPINGS_TO_SYMS_RATIO): Define.
* tree-flow.h (struct var_ann_d): Update comments.
(rewrite_to_new_ssa_names_bb, rewrite_to_new_ssa_names,
allocate_ssa_names, find_phi_node_for, dump_tree_ssa,
debug_tree_ssa, debug_def_blocks, dump_tree_ssa_stats,
debug_tree_ssa_stats, rewrite_ssa_into_ssa,
dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by,
debug_names_replaced_by): Remove declarations.
(delete_update_ssa, get_current_def, set_current_def): Declare.
(rewrite_into_loop_closed_ssa): Add new argument. Update
all callers.
* tree-into-ssa.c: Include params.h.
(old_virtual_ssa_names): Remove. Update all users.
(need_to_replace_names_p): Remove. Update all users.
(struct update_ssa_stats_d): Declare.
(update_ssa_stats): New local.
(dump_tree_ssa, debug_tree_ssa, debug_def_blocks,
dump_tree_ssa_stats, debug_tree_ssa_stats,
dump_update_ssa, debug_update_ssa,
dump_names_replaced_by, debug_names_replaced_by): Declare.
(get_current_def, set current_def): Make extern.
(is_old_name, is_new_name): Protect against references
past the end of the sets.
(add_new_name_mapping): Assert that OLD and NEW are
different SSA names for the same symbol.
When adding a virtual mapping, update stats for virtual
mapping heuristic.
(insert_phi_nodes_for): If UPDATE_P is true, create the
LHS of the new PHI by duplicating SSA name VAR.
(insert_phi_nodes_1): Remove. Update all users.
(insert_phi_nodes): Remove second argument. Update all
users.
(maybe_replace_use, maybe_replace_def): New.
(rewrite_update_stmt): Call them.
(mark_def_interesting): Remove calls to is_gimple_reg.
(prepare_phi_args_for_update): Remove. Update all users.
(prepare_block_for_update): Only process virtual operands
and GIMPLE registers in normal form.
(prepare_use_sites_for): New.
(prepare_names_to_update): Rename from prepare_def_sites.
Call prepare_use_sites_for.
(dump_update_ssa): Rename from dump_repl_tbl.
Update all users.
Show statistics for virtual mapping heuristic.
(debug_update_ssa): Rename from debug_debug_repl_tbl.
(init_update_ssa): Initialize UPDATE_SSA_STATS.
(delete_update_ssa): Make extern.
(mark_set_for_renaming): If the set is empty, do nothing.
(release_ssa_name_after_update_ssa): Update comment.
(insert_updated_phi_nodes_for): Do not remove existing
PHI nodes for symbols.
(switch_virtuals_to_full_rewrite_p): New.
(switch_virtuals_to_full_rewrite): New.
(update_ssa): Call them.
Clear REWRITE_THIS_STMT and REGISTER_DEFS_IN_THIS_STMT
for every statement before updating.
If all the names in NEW_SSA_NAMES have been marked for
removal, do nothing.
Only start at the top of the CFG if there are symbols in
SYMS_TO_RENAME.
(ssa_rewrite_finalize_block): Remove.
(ssa_register_new_def): Remove.
(ssa_rewrite_stmt): Remove.
(ssa_rewrite_phi_arguments): Remove.
(ssa_rewrite_initialize_block): Remove.
(ssa_mark_def_sites): Remove.
(ssa_mark_def_sites_initialize_block): Remove.
(ssa_mark_phi_uses): Remove.
(rewrite_ssa_into_ssa): Remove.
* tree-phinodes.c (find_phi_node_for): Remove.
* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely):
Call update_ssa.
* tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops):
Remove calls to verify_dominators and
verify_loop_structure.
(tree_unswitch_single_loop): Call update_ssa.
* tree-ssa.c (verify_ssa): Assert that need_ssa_update_p
returns false.
Call verify_stmts.
(delete_tree_ssa): Assert that need_ssa_update_p returns
false.
* tree-vect-transform.c (vect_transform_loop): Call update_ssa.
* tree-vectorizer.c (allocate_new_names, rename_def_op,
free_new_names): Remove. Update all users.
(rename_use_op): Call get_current_def.
(rename_variables_in_bb): Do not handle any real or
virtual definition.
(slpeel_update_phis_for_duplicate_loop): Call
get_current_def and set_current_def instead of using
SSA_NAME_AUX.
(slpeel_update_phi_nodes_for_guard2): Reformat comments.
(slpeel_can_duplicate_loop_p): Call need_ssa_update_p,
ssa_names_to_replace and delete_update_ssa.
* doc/invoke.texi: Document --param min-virtual-mappings
and --param virtual-mappings-ratio.
2005-04-22 Zdenek Dvorak <dvorakz@suse.cz>
Diego Novillo <dnovillo@redhat.com>
* tree-cfg.c (tree_duplicate_bb): Call create_new_def_for
for newly created PHI nodes.
Call create_new_def_for for every new V_MAY_DEF and
V_MUST_DEF on the copied statement.
(struct ssa_name_map_entry): Remove.
(ssa_name_map_entry_hash): Remove.
(ssa_name_map_entry_eq): Remove.
(allocate_ssa_names): Remove.
(rewrite_to_new_ssa_names_def): Remove.
(rewrite_to_new_ssa_names_use): Remove.
(rewrite_to_new_ssa_names_bb): Remove.
(rewrite_to_new_ssa_names): Remove.
(tree_duplicate_sese_region): Remove variables ver,
definitions, phi, ssa_name_map and bi.
Call need_ssa_update_p instead of any_marked_for_rewrite_p.
Call update_ssa.
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Call
update_ssa instead of rewrite_ssa_into_ssa.
* tree-ssa-loop-manip.c (add_exit_phis_edge): Call
create_new_def_for.
(find_uses_to_rename_use): Add argument 'need_phis'.
(find_uses_to_rename_stmt): Do not scan virtual operands.
(find_uses_to_rename): Only scan PHI nodes for
non-virtual names.
(rewrite_into_loop_closed_ssa): Call update_ssa.
(check_loop_closed_ssa_use): Ignore virtual operands.
(check_loop_closed_ssa_stmt): Likewise.
(verify_loop_closed_ssa): Do nothing if CURRENT_LOOPS is
NULL.
(rename_variables, set_phi_def_stmts): Remove.
(tree_duplicate_loop_to_header_edge): Reformat comment.
Remove variables BB, I and DEFINITIONS.
Call need_ssa_update_p.
Call update_ssa.
(lv_adjust_loop_header_phi): Reformat comment.
* tree-ssanames.c (ssa_names_to_rewrite): Remove.
(marked_for_rewrite_p, any_marked_for_rewrite_p,
mark_for_rewrite, unmark_all_for_rewrite,
marked_ssa_names): Remove. Update all users.
(release_ssa_name): If VAR has been registered for SSA
updating, do nothing.
* tree-vrp.c (new_ssa_names, old_ssa_names): Remove.
(build_assert_expr_for): Call register_new_name_mapping.
(insert_range_assertions): Update call to update_ssa.
* tree.h (mark_for_rewrite, unmark_all_for_rewrite,
marked_for_rewrite_p, any_marked_for_rewrite_p,
marked_ssa_names): Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98599 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
copy-prop, incremental SSA updating of FUD chains and
newly exposed symbols.
* Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h.
(OBJS-common): Add tree-vrp.o.
(tree-vrp.o): New rule.
* basic-block.h (nearest_common_dominator_for_set): Declare.
* common.opt (ftree-store-ccp): New flag.
(ftree-copy-prop): New flag.
(ftree-vrp): New flag.
(ftree-store-copy-prop): New flag.
* dominance.c (nearest_common_dominator_for_set): New.
* domwalk.c (walk_dominator_tree): Only traverse
statements in blocks marked in walk_data->interesting_blocks.
* domwalk.h (struct dom_walk_data): Add field interesting_blocks.
* fold-const.c (fold): Handle ASSERT_EXPR.
* opts.c (decode_options): Set flag_tree_copy_prop at -O1.
Set flag_tree_store_ccp, flag_tree_store_copy_prop and
flag_tree_vrp at -O2.
* timevar.def (TV_TREE_VRP): Define.
(TV_TREE_COPY_PROP): Define.
(TV_TREE_STORE_COPY_PROP): Define.
(TV_TREE_SSA_INCREMENTAL): Define.
(TV_TREE_STORE_CCP): Define.
* tree-cfg.c (tree_can_merge_blocks_p): Remove reference
to kill_redundant_phi_nodes from comment.
(verify_expr): Handle ASSERT_EXPR.
* tree-dfa.c (mark_new_vars_to_rename): Remove second
argument. Update all users.
(mark_call_clobbered_vars_to_rename): Remove. Update all
users.
* tree-flow-inline.h (unmodifiable_var_p): New.
* tree-flow.h (enum value_range_type): Declare.
(struct value_range_def): Declare.
(value_range): Declare.
(remove_all_phi_nodes_for): Remove. Update all users.
(find_phi_node_for): Declare.
(add_type_alias): Declare.
(count_uses_and_derefs): Declare.
(kill_redundant_phi_nodes): Remove.
(rewrite_into_ssa): Remove.
(rewrite_def_def_chains): Remove.
(update_ssa, register_new_name_mapping, create_new_def_for,
need_ssa_update_p, name_registered_for_update_p,
release_ssa_name_after_update_ssa, dump_repl_tbl,
debug_repl_tbl, dump_names_replaced_by,
debug_names_replaced_by, mark_sym_for_renaming,
mark_set_for_renaming, get_current_def, set_current_def,
get_value_range, dump_value_range, debug_value_range,
dump_all_value_ranges, debug_all_value_ranges,
expr_computes_nonzero, loop_depth_of_name,
unmodifiable_var_p): Declare.
* tree-gimple.c (is_gimple_formal_tmp_rhs): Handle
ASSERT_EXPR.
* tree-into-ssa.c (block_defs_stack): Update comment.
(old_ssa_names, new_ssa_names, old_virtual_ssa_names,
syms_to_rename, names_to_release, repl_tbl,
need_to_initialize_update_ssa_p, need_to_update_vops_p,
need_to_replace_names_p): New locals.
(NAME_SETS_GROWTH_FACTOR): Define.
(struct repl_map_d): Declare.
(struct mark_def_sites_global_data): Add field
interesting_blocks.
(enum rewrite_mode): Declare.
(REGISTER_DEFS_IN_THIS_STMT): Define.
(compute_global_livein): Use last_basic_block instead of
n_basic_blocks.
(set_def_block): Remove last argument. Update all callers.
(prepare_use_operand_for_rename): Remove. Update all callers.
(prepare_def_operand_for_rename): Remove. Update all callers.
(symbol_marked_for_renaming): New.
(is_old_name): New.
(is_new_name): New.
(repl_map_hash): New.
(repl_map_eq): New.
(repl_map_free): New.
(names_replaced_by): New.
(add_to_repl_tbl): New.
(add_new_name_mapping): New.
(mark_def_sites): Assume that all the operands in the
statement are in normal form.
(find_idf): Assert that the block in the stack is valid.
(get_default_def_for): New.
(insert_phi_nodes_for): Add new argument 'update_p'.
Add documentation.
If update_p is true, add a new mapping between the LHS of
each new PHI and the name that it replaces.
(insert_phi_nodes_1): Only call find_idf if needed.
(get_reaching_def): Call get_default_def_for.
(rewrite_operand): Remove.
(rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT
and REWRITE_THIS_STMT are false.
Assume that all the operands in the statement are in
normal form.
(rewrite_add_phi_arguments): Don't use PHI_REWRITTEN.
(rewrite_virtual_phi_arguments): Remove.
(invalidate_name_tags): Remove.
(register_new_update_single, register_new_update_set,
rewrite_update_init_block, replace_use,
rewrite_update_fini_block, rewrite_update_stmt,
rewrite_update_phi_arguments): New.
rewrite_blocks): Remove argument 'fix_virtual_phis'.
Add arguments 'entry', 'what' and 'blocks'.
Initialize the dominator walker according to 'what' and
'blocks'.
Start the dominator walk at 'entry'.
(mark_def_site_blocks): Add argument 'interesting_blocks'.
Use it to configure the dominator walker.
(rewrite_into_ssa): Remove argument 'all'.
Make internal.
(rewrite_all_into_ssa): Remove.
(rewrite_def_def_chains): Remove.
(mark_def_interesting, mark_use_interesting,
prepare_phi_args_for_update, prepare_block_for_update,
prepare_def_site_for, prepare_def_sites,
dump_names_replaced_by, debug_names_replaced_by,
dump_repl_tbl, debug_repl_tbl, init_update_ssa,
delete_update_ssa, create_new_def_for,
register_new_name_mapping, mark_sym_for_renaming,
mark_set_for_renaming, need_ssa_update_p,
name_registered_for_update_p, ssa_names_to_replace,
release_ssa_name_after_update_ssa,
insert_updated_phi_nodes_for, update_ssa): New.
* tree-loop-linear.c (linear_transform_loops): Call
update_ssa instead of rewrite_into_ssa.
* tree-optimize.c (vars_to_rename): Remove.
Update all users.
(init_tree_optimization_passes): Replace
pass_redundant_phi with pass_copy_prop.
Add pass_vrp.
Replace pass_ccp with pass_store_ccp.
Add pass_store_copy_prop after pass_store_ccp.
(execute_todo): If the TODO_ flags don't include updating
the SSA form, assert that it does not need to be updated.
Call update_ssa instead of rewrite_into_ssa and
rewrite_def_def_chains.
If TODO_verify_loops is set, call verify_loop_closed_ssa.
(tree_rest_of_compilation):
* tree-pass.h (TODO_dump_func, TODO_ggc_collect,
TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts,
TODO_cleanup_cfg): Renumber.
(TODO_verify_loops, TODO_update_ssa,
TODO_update_ssa_no_phi, TODO_update_ssa_full_phi,
TODO_update_ssa_only_virtuals): Define.
(pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp):
Declare.
* tree-phinodes.c (make_phi_node): Update documentation.
(remove_all_phi_nodes_for): Remove.
(find_phi_node_for): New.
* tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR.
* tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise.
(interpret_rhs_modify_expr): Likewise.
* tree-sra.c (decide_instantiations): Mark all symbols in
SRA_CANDIDATES for renaming.
(mark_all_v_defs_1): Rename from mark_all_v_defs.
(mark_all_v_defs): New function. Update all users to call it
with the whole list of scalarized statements, not just the
first one.
* tree-ssa-alias.c (count_ptr_derefs): Make extern.
(compute_flow_insensitive_aliasing): If the tag is
unmodifiable and the variable isn't or vice-versa, don't
make them alias of each other.
(setup_pointers_and_addressables): If the type tag for
VAR is about to change, mark the old one for renaming.
(add_type_alias): New.
* tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP.
(ccp_lattice_t): Rename from latticevalue.
(value): Remove. Update all users.
(const_val): New local variable.
(do_store_ccp): New local variable.
(dump_lattice_value): Handle UNINITIALIZED.
(debug_lattice_value): New.
(get_default_value): Re-write.
(set_lattice_value): Re-write.
(def_to_varying): Remove. Update all users.
(likely_value): Return VARYING for statements that make
stores when STORE_CCP is false.
Return VARYING for any statement other than MODIFY_EXPR,
COND_EXPR and SWITCH_EXPR.
(ccp_initialize): Re-write.
(replace_uses_in, replace_vuse_in, substitute_and_fold):
Move to tree-ssa-propagate.c.
(ccp_lattice_meet): Handle memory stores when
DO_STORE_CCP is true.
(ccp_visit_phi_node): Likewise.
(ccp_fold): Likewise.
(evaluate_stmt): Likewise.
(visit_assignment): Likewise.
(ccp_visit_stmt): Likewise.
(execute_ssa_ccp): Add argument 'store_ccp'. Copy it
into DO_STORE_CCP.
(do_ssa_ccp): New.
(pass_ccp): Use it.
(do_ssa_store_ccp): New.
(gate_store_ccp): New.
(pass_store_ccp): Declare.
* tree-ssa-copy.c: Include tree-ssa-propagate.h.
(may_propagate_copy): Reformat.
Don't abort if ORIG is a virtual and DEST isn't.
If NEW does not have alias information but DEST does,
copy it.
(copy_of, cached_last_copy_of, do_store_copy_prop, enum
copy_prop_kind, which_copy_prop): Declare.
(stmt_may_generate_copy, get_copy_of_val,
get_last_copy_of, set_copy_of_val, dump_copy_of,
copy_prop_visit_assignment, copy_prop_visit_cond_stmt,
copy_prop_visit_stmt, copy_prop_visit_phi_node,
init_copy_prop, fini_copy_prop, execute_copy_prop,
gate_copy_prop, do_copy_prop, gate_store_copy_prop,
store_copy_prop): New.
(pass_copy_prop, pass_store_copy_prop): Declare.
* tree-ssa-dom.c (struct opt_stats_d): Add fields
'num_const_prop' and 'num_copy_prop'.
(cprop_operand): Update them.
(dump_dominator_optimization_stats): Dump them.
(tree_ssa_dominator_optimize): Call update_ssa instead of
rewrite_into_ssa.
(loop_depth_of_name): Declare extern.
(simplify_cond_and_lookup_avail_expr): Guard against NULL
values for LOW or HIGH.
(cprop_into_successor_phis): Only propagate if NEW != ORIG.
(record_equivalences_from_stmt): Call expr_computes_nonzero.
(cprop_operand): Only propagate if VAL != OP.
* tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed
statement for renaming.
* tree-ssa-loop-im.c (move_computations): Call update_ssa.
* tree-ssa-loop-ivopts.c (rewrite_address_base): Call
add_type_alias if necessary.
Call mark_new_vars_to_rename.
(tree_ssa_iv_optimize): If new symbols need to be renamed,
mark every statement updated, call update_ssa and
rewrite_into_loop_closed_ssa.
* tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB
from LIVEIN if VAR is a virtual.
* tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa.
* tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR.
(get_call_expr_operands): Reformat statement.
(add_stmt_operand): Don't create V_MAY_DEFs for read-only
symbols.
* tree-ssa-propagate.c (ssa_prop_init): Initialize
SSA_NAME_VALUE for every name.
(first_vdef, stmt_makes_single_load, stmt_makes_single_store,
get_value_loaded_by): New.
(replace_uses_in, replace_vuses_in, replace_phi_args_in,
substitute_and_fold): Move from tree-ssa-ccp.c.
* tree-ssa-propagate.h (struct prop_value_d, prop_value_t,
first_vdef, stmt_makes_single_load, stmt_makes_single_store,
get_value_loaded_by, replace_uses_in, substitute_and_fold):
Declare.
* tree-ssa.c (verify_use): Fix error message.
(propagate_into_addr, replace_immediate_uses, get_eq_name,
check_phi_redundancy, kill_redundant_phi_nodes,
pass_redundant_phi): Remove. Update all users.
* tree-vect-transform.c (vect_create_data_ref_ptr): Call
add_type_alias, if necessary.
* tree-vectorizer.h (struct _stmt_vect_info): Update
documentation for field 'memtag'.
* tree-vrp.c: New file.
* tree.def (ASSERT_EXPR): Define.
* tree.h (ASSERT_EXPR_VAR): Define.
(ASSERT_EXPR_COND): Define.
(SSA_NAME_VALUE_RANGE): Define.
(struct tree_ssa_name): Add field 'value_range'.
(PHI_REWRITTEN): Remove.
(struct tree_phi_node): Remove field 'rewritten'.
* doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop,
-ftree-store-copy-prop): Document.
* doc/tree-ssa.texi: Remove broken link to McCAT's compiler.
Document usage of update_ssa.
testsuite/ChangeLog
* g++.dg/tree-ssa/pr18178.C: New test.
* gcc.c-torture/execute/20030216-1.x: Ignore at -O1.
* gcc.c-torture/execute/20041019-1.c: New test.
* gcc.dg/tree-ssa/20041008-1.c: New test.
* gcc.dg/tree-ssa/ssa-ccp-12.c: New test.
* gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp.
* gcc.dg/tree-ssa/20030917-1.c: Likewise.
* gcc.dg/tree-ssa/20030917-3.c: Likewise.
* gcc.dg/tree-ssa/20040721-1.c: Likewise.
* gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise.
* gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise.
* gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise.
* gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise.
* gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97884 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lambda-code.c (lambda_loopnest_to_gcc_loopnest): Use update_stmt.
Use immediate use iterator.
(stmt_is_bumper_for_loop): Use immediate use iterator.
* predict.c (strip_builtin_expect): Use update_stmt.
* tree-cfg.c (update_modified_stmts): New. Call update_stmt_if_modified
on all elements of a STATEMENT_LIST.
(bsi_insert_before, bsi_insert_after): Call update_modified_stmts.
(bsi_remove): Remove imm_use links and mark the stmt as modified.
(bsi_replace): Mark stmt as modified and the update it.
* tree-complex.c (update_complex_assignment): Call mark_stmt_modified.
(expand_complex_libcal): Call update_stmt.
(expand_complex_comparison): Call mark_stmt_modified.
(expand_complex_operations_1): Call update_stmt_if_modified.
(expand_vector_operations_1): Call mark_stmt_modified.
* tree-dfa.c (compute_immediate_uses, free_df_for_stmt, free_df,
compute_immediate_uses_for_phi, compute_immediate_uses_for_stmt,
add_immediate_use, redirect_immediate_use,
redirect_immediate_uses, dump_immediate_uses, debug_immediate_uses,
dump_immediate_uses_for, debug_immediate_uses_for): Delete.
(mark_new_vars_to_rename): Call update_stmt.
* tree-dump.c (dump_option_value_in): Add "stmtaddr".
* tree-flow-inline.h (modify_stmt): Rename to mark_stmt_modified.
Ignore PHI nodes.
(unmodify_stmt): Delete.
(update_stmt): New. Force an update of a stmt.
(update_stmt_if_modified): update a stmt if it is out of date.
(get_stmt_operands): Verify stmt is NOT modified.
(stmt_modified_p): Update comment.
(delink_imm_use): Remove a use node from its immuse list.
(link_imm_use_to_list): Link a use node to a specific list.
(link_imm_use): Link a node to the correct list.
(set_ssa_use_from_ptr): Set a use node to a specific value, and insert
it in the correct list, if appropriate.
(link_imm_use_stmt): Link a use node, and set the stmt pointer.
(relink_imm_use): Link a use node in place of another node in a list.
(relink_imm_use_stmt): LInk a node in place of another node, and set
the stmt pointer.
(end_safe_imm_use_traverse): New. Terminate a safe immuse iterator.
(end_safe_imm_use_p): New. Check for the end of a safe immuse iterator.
(first_safe_imm_use): New. Initialize a safe immuse iterator.
(next_safe_imm_use): New. Proceed to next safe immuse iterator value.
(end_readonly_imm_use_p): New. Check for end of a fast immuse iterator.
(first_readonly_imm_use): New. Initialize a fast immuse iterator.
(next_readonly_imm_use): New. Get the next fast immuse iterator value.
(has_zero_uses): New. Return true if there are no uses of a var.
(has_single_use): New. Return true if there is only a single use of a
variable.
(single_imm_use): New. Return the simgle immediate use.
(num_imm_uses): New. Return the number of immediate uses.
(get_v_must_def_ops): Use is now a pointer.
(use_operand_p, get_v_may_def_op_ptr, get_vuse_op_ptr,
get_v_must_def_kill_ptr, get_phi_arg_def_ptr): Return the address of
the use node.
(get_immediate_uses, num_immediate_uses, immediate_use): Delete.
(delink_stmt_imm_use): Delink all immuses from a stmt.
(phi_arg_index_from_use): New. Return a phi arg index for a use.
* tree-flow.h (struct dataflow_d): Delete.
(immediate_use_iterator_d): New. Immediate use iterator struct.
(FOR_EACH_IMM_USE_FAST): New. Macro for read only immuse iteration.
(FOR_EACH_IMM_USE_SAFE): New. Macro for write-safe immuse iteration.
(BREAK_FROM_SAFE_IMM_USE): New. Macro for earlyu exit from write-safe
iteration.
(struct stmt_ann_d): Remove dataflow_t from struct.
* tree-if-conv.c (tree_if_conversion). Don't call free_df.
(if_convertible_phi_p): Use FAST immuse iterator.
(if_convertible_loop_p): Don't call compute_immediate_uses.
(replace_phi_with_cond_modify_expr): Call update_stmt.
* tree-into-ssa.c (mark_def_sites, ssa_mark_def_sites): Call
update_stmt_if_modified.
(rewrite_all_into_ssa): Initialize ssa operands.
* tree-loop-linear.c (linear_transform_loops): Don't call free_df or
compute_immediate_uses.
* tree-optimize.c (execute_todo): Call verify_ssa whenever the
ssa_property is available.
(execute_one_pass): Change parameters passed to execute_todo.
* tree-outof-ssa.c (rewrite_trees): Don't call modify_stmt.
(remove_ssa_form): Call fini_ssa_operands.
(insert_backedge_copies): Delete call to modify_stmt.
* tree-phinodes.c (make_phi_node): Initialize use nodes.
(release_phi_node): Delink any use nodes before releasing.
(resize_phi_node): Relink any use nodes.
(remove_phi_arg_num): Delink the use node.
(remove_phi_node): Release the ssa_name AFTER releasing the phi node.
(remove_all_phi_nodes_for): Release phi node first.
* tree-pretty-print.c (dump_generic_node): Print stmt address.
* tree-sra.c (mark_all_v_defs): Call update_stmt_if_modified.
(scalarize_use, scalarize_copy): Call update_stmt.
* tree-ssa-alias.c (compute_may_aliases): Update all modified stmts.
(compute_points_to_and_addr_escape): Call mark_stmt_modified.
* tree-ssa-cpp.c (need_imm_uses_for): Delete.
(ccp_initialize): Remove call to compute_immediate_uses.
(substitute_and_fold, execute_fold_all_builtins): Call update_stmt.
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Update all modified
stmts.
(simplify_cond_and_lookup_avail_expr): Call mark_stmt_modified.
(simplify_switch_and_lookup_avail_expr): Call mark_stmt_modified.
(eliminate_redundant_computations): Call mark_stmt_modified.
(cprop_operand): Call mark_stmt_modified.
(optimize_stmt): Call update_stmt_if_modified and mark_stmt_modified.
* tree-ssa-dse.c (fix_phi_uses, fix_stmt_v_may_defs): Delete.
(dse_optimize_stmt): Use new immuse interface.
(tree_ssa_dse): Remove calls to compute_immediate_uses and free_df.
* tree-ssa-forwprop.c (need_imm_uses_for): Delete.
(substitute_single_use_vars): Use new immuse interface.
(tree_ssa_forward_propagate_single_use_vars): Remove calls to free_df
and compute_immediate_uses.
* tree-ssa-loop-im.c (single_reachable_address): Use new immuse
interface.
(rewrite_mem_refs): Call update_stmt.
(determine_lsm): Remove call to compute_imm_uses and free_df.
* tree-ssa-loop-ivcanon.c (create_canonical_iv): Call update_stmt.
(try_unroll_loop_completely): Call update_stmt.
* tree-ssa-loop-ivopts.c (rewrite_address_base): Call update_stmt.
(rewrite_use_compare): Call update_stmt.
(compute_phi_arg_on_exit): Insert each stmt before trying to process.
(rewrite_use) : Call update_stmt.
* tree-ssa-loop-manip.c (verify_loop_closed_ssa): Add arg to call.
* tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Call
update_stmt.
* tree-ssa-operands.c (NULL_USE_OPERAND_P): Remove declaration.
(allocate_use_optype, allocate_vuse_optype): Adjust allocation size.
(free_uses, free_vuses, free_v_may_defs, free_v_must_defs): Delink
use nodes.
(initialize_vuse_operand): New. Initialize a vuse operand.
(initialize_v_may_def_operand): New. Initialize a maydef operand.
(initialize_v_must_def_operand): New. Initialize a mustdef operand.
(finalize_ssa_defs): Use stmt parameter.
(correct_use_link): Ensure a use node is in the correct list, and has
the correct stmt pointer.
(finalize_ssa_uses, finalize_ssa_v_may_defs, finalize_ssa_vuses,
finalize_ssa_v_must_defs): Also initialize use nodes.
(finalize_ssa_stmt_operands): Pass extra stmt operands.
(build_ssa_operands): Seperate parsing from final operand construction.
(parse_ssa_operands): New. Parse entry point for operand building.
(swap_tree_operands): New. Swap 2 tree operands.
(update_stmt_operands): Ranamed from get_stmt_operands. Always builds
operands.
(get_expr_operands): Call swap_tree_operands when needed.
(copy_virtual_operands): Use initialize routines for virtual use ops.
(create_ssa_artficial_load_stmt): Add extra stmt parameter.
(verify_abort): New. Issue imm_use error.
(verify_imm_links): New Verify imm_use links for a var.
(dump_immediate_uses_for): New. Dump imm_uses for a var to file.
(dump_immediate_uses): New. Dump imm_uses for all vars to file.
(debug_immediate_uses): New. Dump imm_uses for all vars to stderr.
(debug_immediate_uses_for): New. Dump imm_uses for a var to stderr.
* tree-ssa-operands.h (struct use_operand_ptr): Delete.
(NULL_USE_OPERAND_P) Define.
(use_optype_d, v_def_use_operand_type, vuse_optype_d): Add immediate
use node.
(struct vuse_operand_type): New struct.
(SET_USE): Call set_ssa_use_from_ptr.
(USE_STMT): Define.
(PHI_ARG_INDEX_FROM_USE): Define.
* tree-ssa-phiopt.c (replace_phi_edge_with_variable): Set the phi
argument via SET_USE, not PHI_ARG_DEF_TREE.
* tree-ssa-pre.c (eliminate): Call update_stmt.
* tree-ssa-propagate.c (cfg_blocks_get): Use imm_use iterators. Don't
call free_df.
* tree-ssa-sink.c (all_immediate_uses_same_place): Use imm_use iterator.
(nearest_common_dominator_of_uses): Use imm_use iterator.
(statement_sink_location): Use imm_use iterator and interface.
(execute_sink_code): Don't call compute_immediate_uses or free-df.
* tree-ssa-threadupdate.c (create_edge_and_update_destination_phis): Use
PHI_ARG_DEF, not PHI_ARG_DEF_TREE.
* tree-ssa.c (verify_use, verify_phi_args): Verify some imm_use info.
(verify_ssa): Ensure no stmt is marked modify after optimization pass
if new parameter is true.
(init_tree_ssa): Don't initialize operand cache here.
(delete_tree_ssa): Don't destroy operand cache here.
(propagate_into_addr): Pass in a use pointer, return true if anything
was changed.
(replace_immediate_uses): Use imm_use iterator, call update_stmt.
(check_phi_redundancy): Use imm_use iterator.
(kill_redundant_phi_nodes): Don't call compute_immediate_uses or
free_df.
* tree-ssanames.c (make_ssa_name): Initialize imm_use node.
(release_ssa_name): Delink node and all elements in its imm_use list.
* tree-tailcall.c (adjust_return_value): Call update_stmt.
* tree-vect-analyze.c (vect_stmt_relevant_p): Use imm_use iterator.
* tree-vectorizer.c (need_imm_uses_for): Delete.
(vectorize_loops): Dont call compute_immediate_uses or free_df.
* tree.h (struct ssa_imm_use_d): Define.
(SSA_NAME_IMM_USE_NODE): Define.
(struct tree_ssa_name): Add imm_use node.
(PHI_DF): Delete.
(PHI_ARG_IMM_USE_NODE): Define.
(struct phi_arg_d): Add imm_use node.
(struct tree_phi_node): Remove struct dataflow_d element.
(TDF_STMTADDR): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97648 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tree-flow.h: Adjust the prototype for remove_phi_node.
* lambda-code.c (perfect_nestify): Adjust a call to
remove_phi_node.
* tree-cfg.c
(remove_phi_nodes_and_edges_for_unreachable_block): Likewise.
* tree-outof-ssa.c (eliminate_virtual_phis, remove_ssa_form):
Likewise.
* tree-ssa-dce.c (remove_dead_phis): Likewise.
* tree-ssa-loop-ivopts.c (remove_statement): Likewise.
* tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
* tree-ssa.c (kill_redundant_phi_nodes): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95932 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
| |
gensupport.c, jump.c, tree-phinodes.c, unwind-dw2-fde-glibc.c:
Update copyright.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95931 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
calls to release_ssa_name and release_phi_node.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95835 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
| |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91608 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
| |
"tree *" as the first argument.
* tree-flow.h: Update the prototype of add_phi_arg.
* lambda-code.c, tree-cfg.c, tree-into-ssa.c,
tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-pre.c,
tree-ssa-threadupdate.c, tree-ssa.c, tree-tailcall.c,
tree-vectorizer.c: Update all call sites of add_phi_arg.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91307 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
with e->dest_idx.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91264 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
greater than PHI_ARG_CAPACITY.
(reserve_phi_args_for_new_edge): Initialize the new PHI
argument to NULL_TREE. Increment PHI_NUM_ARGS.
(add_phi_arg): Add a PHI argument to the slot given by
E->dest_idx.
(remove_phi_arg_num): Do not write to PHI_ARG_EDGE.
* tree-flow-inline (phi_arg_from_edge): Return E->dest_idx.
* tree-ssa.c (ssa_redirect_edge): Check for a missing PHI
argument by looking at PHI_ARG_DEF.
(verify_phi_args): Check for a missing PHI argument. Remove
the check for duplicate PHI arguments.
* tree.h (PHI_ARG_EDGE): Redefine in terms of EDGE_PRED.
(phi_arg_d): Remove e.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91097 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
capacity, to receive the return value of ideal_phi_node_len.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91091 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
| |
(tree_cfg_hooks): Add tree_execute_on_growing_pred.
* tree-flow.h: Add a prototype for
reserve_phi_args_for_new_edge.
* tree-phinodes.c (reserve_phi_args_for_new_edge): New.
(add_phi_arg): Don't resize a PHI array.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91075 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
* tree-flow.h: Remove the corresponding prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91037 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
| |
Add a prototype for remove_phi_args.
* tree-phinodes.c (remove_phi_arg): Remove.
(remove_phi_args): New.
* tree-ssa.c (ssa_remove_edge): Call remove_phi_args instead
of remove_phi_arg.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91034 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
| |
* tree-cfg.c (tree_make_forwarder_block, tree_duplicate_bb):
Use it.
* tree-flow.h: Add a prototype for phi_reverse.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90344 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
pointer to the last PHI node in the new PHI chain.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90173 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
* tree.h: Remove the prototypes for make_phi_node.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90093 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
the PHI node currently in use.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90035 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
edge already exists.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89985 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
element that's being removed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89984 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
| |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89867 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
(make_phi_node, resize_phi_node): Use it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89852 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
| |
the whole PHI node.
* tree.h (tree_phi_node): Tell the garbage collector to chase
num_args arguments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89844 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
triggers into gcc_assert.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89800 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
| |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89760 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
| |
without any PHI arguments left. Make sure the argument that
we're supposed to remove exists at all.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89689 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
| |
* tree-into-ssa.c (rewrite_into_ssa): Don't set it.
(rewrite_ssa_into_ssa): Likewise.
* tree-phinodes.c (create_phi_node): Access the number of
predecessor edges using EDGE_COUNT() and not num_preds.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88308 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use gcc_assert, gcc_unreachable & internal_error instead of abort.
* timevar.c (timevar_push, timevar_pop, timevar_start,
timevar_stop): Likewise.
* toplev.c (default_pch_valid_p): Likewise.
* tracer.c (tail_duplicate): Likewise.
* tree-alias-common.c (get_alias_var_decl,
get_values_from_constructor, create_alias_var, delete_alias_vars,
empty_points_to_set, same_points_to_set, ptr_may_alias_var):
Likewise.
* tree.c (tree_size, make_node_stat, copy_node_stat,
build_int_cst_wide, integer_all_onesp, list_length, chainon,
tree_node_structure, type_contains_placeholder_p, substitute_in_expr,
substitute_placeholder_in_expr, tabilize_reference_1, build0_stat,
build1_stat, build2_stat, build3_stat, build4_stat, is_attribute_p,
lookup_attribute, type_hash_canon, host_integerp, iterative_hash_expr,
build_method_type_directly, decl_type_context, get_callee_fndecl,
get_set_constructor_bits, build_vector_type_for_mode, int_cst_value,
tree_fold_gcd): Likewise.
* tree-cfg.c (create_bb, make_ctrl_stmt_edges, make_exit_edges,
make_cond_expr_edges, group_case_labels, tree_merge_blocks,
cleanup_control_expr_graph, find_taken_edge,
find_taken_edge_switch_expr, phi_alternatives_equal,
is_ctrl_altering_stmt, disband_implicit_edges, set_bb_for_stmt,
stmt_for_bsi, tree_find_edge_insert_loc, bsi_insert_on_edge_immediate,
tree_split_edge, tree_verify_flow_info, thread_jumps,
tree_redirect_edge_and_branch, tree_flow_call_edges_add): Likewise.
* tree-chrec.c (chrec_fold_poly_cst, chrec_fold_plus_poly_poly,
chrec_fold_multiply_poly_poly): Likewise.
* tree-complex.c (extract_component, expand_complex_division,
expand_complex_comparison, expand_complex_operations_1,
build_replicated_const, expand_vector_operations_1): Likewise.
* tree-data-ref.c (tree_fold_bezout, build_classic_dist_vector,
build_classic_dir_vector): Likewise.
* tree-dfa.c (compute_immediate_uses_for_phi,
compute_immediate_uses_for_stmt, create_var_ann, create_stmt_ann,
create_tree_ann, collect_dfa_stats, get_virtual_var): Likewise.
* tree-dump.c (dequeue_and_dump): Likewise.
* tree-eh.c (record_stmt_eh_region, add_stmt_to_eh_region,
record_in_finally_tree, replace_goto_queue_1,
maybe_record_in_goto_queue, verify_norecord_switch_expr,
do_return_redirection): Likewise.
* tree-if-conv.c (tree_if_convert_stmt, tree_if_convert_cond_expr,
add_to_dst_predicate_list, find_phi_replacement_condition,
replace_phi_with_cond_modify_expr, get_loop_body_in_if_conv_order):
Likewise.
* tree-inline.c (remap_decl, remap_type, remap_decls, copy_body_r,
initialize_inlined_parameters, declare_return_variable,
estimate_num_insns_1, expand_call_inline, expand_calls_inline,
optimize_inline_calls, copy_tree_r): Likewise.
* tree-into-ssa.c (rewrite_initialize_block_local_data, rewrite_stmt,
ssa_rewrite_stmt, rewrite_into_ssa): Likewise.
* tree-iterator.c (alloc_stmt_list, tsi_link_before, tsi_link_after,
tsi_split_statement_list_after, tsi_split_statement_list_before):
Likewise.
* tree-mudflap.c (mf_varname_tree): Likewise.
* tree-nested.c (create_tmp_var_for, lookup_field_for_decl,
lookup_tramp_for_decl, convert_all_function_calls): Likewise.
* tree-optimize.c (tree_rest_of_compilation): Likewise.
* tree-outof-ssa.c (create_temp, eliminate_build, eliminate_phi,
coalesce_abnormal_edges, coalesce_ssa_name, eliminate_virtual_phis,
free_temp_expr_table, add_dependance, finish_expr, rewrite_trees):
Likewise.
* tree-phinodes.c (resize_phi_node, add_phi_arg,
remove_all_phi_nodes_for): Likewise.
* tree-pretty-print.c (op_prio, print_call_name): Likewise.
* tree-profile.c (tree_gen_interval_profiler, tree_gen_pow2_profiler,
tree_gen_one_value_profiler, tree_gen_const_delta_profiler): Likewise.
* tree-sra.c (type_can_instantiate_all_elements, sra_hash_tree,
sra_elt_eq, sra_walk_expr, instantiate_missing_elements,
generate_one_element_ref, generate_element_copy,
generate_element_zero, scalarize_copy, scalarize_init,
scalarize_ldst): Likewise.
* tree-ssa-alias.c (delete_alias_info, group_aliases, may_alias_p,
add_may_alias, add_pointed_to_expr, add_pointed_to_var,
collect_points_to_info_r, get_tmt_for, get_ptr_info): Likewise.
* tree-ssa.c (walk_use_def_chains, check_phi_redundancy): Likewise.
* tree-ssa-ccp.c (dump_lattice_value, get_default_value, get_value,
set_lattice_value, likely_value, ccp_visit_phi_node, visit_assignment,
widen_bitfield, ccp_fold_builtin): Likewise.
* tree-ssa-copy.c (may_propagate_copy, merge_alias_info,
replace_exp_1, propagate_tree_value): Likewise.
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise.
* tree-ssa-dce.c (set_control_dependence_map_bit,
find_control_dependence, find_pdom, mark_operand_necessary,
mark_stmt_if_obviously_necessary,
mark_control_dependent_edges_necessary, remove_dead_stmt): Likewise.
* tree-ssa-dom.c (dom_opt_initialize_block_local_data,
simplify_switch_and_lookup_avail_expr, cprop_into_successor_phis,
eliminate_redundant_computations, avail_expr_eq): Likewise.
* tree-ssa-dse.c (fix_stmt_v_may_defs): Likewise.
* tree-ssa-loop-ch.c (should_duplicate_loop_header_p,
duplicate_blocks): Likewise.
* tree-ssa-loop-im.c (for_each_index, set_level,
is_call_clobbered_ref): Likewise.
* tree-ssa-loop-ivopts.c (dump_use, divide, stmt_after_ip_normal_pos,
stmt_after_increment, set_iv, contains_abnormal_ssa_name_p,
find_interesting_uses_outer_or_nonlin, add_derived_ivs_candidates,
peel_address, ptr_difference_cost, may_replace_final_value,
determine_use_iv_cost, rewrite_use_nonlinear_expr, rewrite_use_outer,
rewrite_use, rewrite_uses): Likewise.
* tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa,
check_loop_closed_ssa_use): Likewise.
* tree-ssanames.c (make_ssa_name): Likewise.
* tree-ssa-operands.c (finalize_ssa_defs, finalize_ssa_uses,
finalize_ssa_v_must_defs, finalize_ssa_stmt_operands,
get_stmt_operands, get_expr_operands, get_asm_expr_operands,
get_indirect_ref_operands, add_stmt_operand): Likewise.
* tree-ssa-pre.c (value_exists_in_set_bitmap,
value_remove_from_set_bitmap, bitmap_insert_into_set, insert_into_set,
phi_translate, valid_in_set, compute_antic,
find_or_generate_expression, create_expression_by_pieces, insert_aux,
create_value_expr_from, eliminate): Likewise.
* tree-ssa-propagate.c (cfg_blocks_get): Likewise.
* tree-ssa-threadupdate.c (remove_last_stmt_and_useless_edges):
Likewise.
* tree-tailcall.c (independent_of_stmt_p, adjust_return_value,
eliminate_tail_call): Likewise.
* tree-vectorizer.c (vect_create_index_for_array_ref,
vect_align_data_ref, vect_create_data_ref,
vect_create_destination_var, vect_get_vec_def_for_operand,
vect_finish_stmt_generation, vect_transform_stmt,
vect_transform_loop_bound, vect_transform_loop,
vect_analyze_operations): Likewise.
* tree-vn.c (vn_compute, set_value_handle, get_value_handle):
Likewise.
* tree-flow-inline.h (var_ann, get_var_ann, get_def_from_ptr,
get_use_op_ptr, immediate_use, phi_ssa_name_p, bsi_start,
bsi_after_labels, bsi_last): Likewise.
* tree-ssa-live.c (var_union, change_partition_var,
create_ssa_var_map, calculate_live_on_entry, root_var_init,
type_var_init, add_coalesce, sort_coalesce_list, pop_best_coalesce):
Likewise.
* tree-ssa-live.h (partition_is_global, live_entry_blocks,
tpa_find_tree): Likewise.
(register_ssa_partition_check): Declare.
(register_ssa_partition): use it.
* tree-ssa-live.c: Include errors.h.
(register_ssa_partition_check): New.
* tree-ssa-operands.c: Include errors.h.
* Makefile.in (tree-ssa-operands.o): Depend on errors.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87223 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(tree-ssa-threadupdate.o): Add dependencies.
* tree-ssa-threadupdate.c: New file.
* tree-flow.h (incoming_edge_threaded): New flag in block annotation.
(rewrite_vars_out_of_ssa): Remove prototype.
(cleanup_tree_cfg): Returns a bool.
* tree.h (thread_through_all_blocks): Prototype.
* tree-outof-ssa.c (SSANORM_*): Move into here.
(remove_ssa_form): Now static.
(rewrite_vars_out_of_ssa): Kill.
* tree-ssa-live.c (register_ssa_partitions_for_vars): Kill.
* tree-ssa-live.h (SSANORM_*): Moved into tree-outof-ssa.c.
(remove_ssa_form, register_partitions_for_vars): Kill declarations.
* tree-cfg.c (cleanup_tree_cfg): Return a value indicating if
anything was changed.
* tree-phinodes.c (add_phi_arg): Get the block for the PHI
from the PHI's annotation rather than the edge associated with
the new argument.
* tree-ssa-dom.c (redirection_edges): Kill.
(redirect_edges_and_update_ssa_graph): Kill.
(tree_ssa_dominator_optimize): Do not reset forwardable flag
for blocks anymore. Do not initialize redirection_edges.
Call thread_through_all_blocks. Simplify code for cleanup
of the CFG and iterating. No longer call cleanup_tree_cfg
outside the iteration loop.
(thread_across_edge): No longer mess with forwardable blocks.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85721 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(rewrite_ssa_into_ssa): Start iterating over SSA names at 1.
Release SSA names that have been re-renamed.
* tree-phinodes.c (make_phi_node): Set same TREE_TYPE as the
variable.
* tree-ssa-alias.c (init_alias_info): If aliases have been
computed before, clear existing alias information.
(create_name_tags): Do no fixup PT_ANYTHING pointers.
If the new name tag for a pointer is different than the one it
had before, mark the old tag for renaming.
(replace_may_alias): New function.
(group_aliases): Call it.
(setup_pointers_and_addressables): Always call get_tmt_for.
(maybe_create_global_var): Don't create .GLOBAL_VAR more than
once.
(set_pt_anything): New local function.
(set_pt_malloc): New local function.
(merge_pointed_to_info): Don't merge pointed-to variables from
the original pointer if the destination is pointing to an
unknown location.
(add_pointed_to_expr): Call set_pt_anything and set_pt_malloc.
(add_pointed_to_var): Do not add a variable to the points-to
set if the pointer is already pointing to anywhere.
(collect_points_to_info_r): If the defining statement is a PHI
node, only merge pointed-to information if the argument has
already been visited.
(get_tmt_for): Only create a new tag if the pointer didn't
have one already.
(dump_alias_info): Emit more information.
(dump_points_to_info_for): Likewise.
* tree-ssa-dom.c (redirect_edges_and_update_ssa_graph): Don't
try to get the annotation of an SSA_NAME.
* tree-ssa-operands.c (add_stmt_operand): Only check for empty
alias sets when checking is enabled.
* tree-ssa-pre.c (need_eh_cleanup): New local variable.
(eliminate): Mark basic blocks that will need
EH information cleaned up.
(init_pre): Split ENTRY_BLOCK->0 if block 0 has more than one
predecessor.
Initialize need_eh_cleanup.
(fini_pre): Call tree_purge_all_dead_eh_edges and
cleanup_tree_cfg if needed.
Free need_eh_cleanup.
* tree-ssa.c (verify_ssa_name): New function.
(verify_def): Call it.
Re-arrange to avoid printing too many error messages.
(verify_use): Likewise.
(verify_phi_args): Likewise.
(verify_flow_insensitive_alias_info): New function.
(verify_flow_sensitive_alias_info): New function.
(verify_alias_info): New function.
(verify_ssa): Call verify_alias_info.
Clear TREE_VISITED on all the SSA_NAMEs before scanning the
program.
Re-arrange to avoid printing too many error messages.
* tree-ssanames.c (make_ssa_name): Clear
SSA_NAME_IN_FREE_LIST.
(release_ssa_name): Never release a default definition.
(release_defs): New function.
* tree.h: Declare it.
* tree-ssa-dce.c (remove_dead_stmt): Call it.
* tree-ssa.c (walk_use_def_chains_1): Add new argument IS_DFS.
If true, do a depth-first search. Do a breadht-first search,
otherwise.
(walk_use_def_chains): Add new argument IS_DFS.
Update all users.
* tree-flow.h (walk_use_def_chains): Update prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85052 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tree-cfg.c (tree_make_forwarder_block): Use SET_PHI_RESULT.
* tree-flow-inline.h (get_use_op_ptr): Return a use_operand_p.
(get_use_from_ptr, get_def_from_ptr): New. Return operand pointers.
(get_def_op_ptr): Return a def_operand_p instead of a 'tree *'.
(get_v_may_def_result_ptr): Return a def_operand_p.
(get_v_may_def_op_ptr, get_vuse_op_ptr): Return a use_operand_p.
(get_v_must_def_op_ptr): Return a def_operand_p.
(get_phi_result_ptr): New. Return a pointer to the result of a PHI.
(get_phi_arg_def_ptr): New. Return a pointer to an argument of a PHI.
(phi_element_for_edge): Remove.
* tree-flow.h (propagate_value, replace_exp): Change prototype.
(propagate_tree_value): Add new prototype.
(phi_element_for_edge): Remove prototype.
* tree-into-ssa.c (mark_def_sites): Use new operand types.
(prepare_operand_for_rename): Split into two functions.
(prepare_use_operand_for_rename): Prepare use operands.
(prepare_def_operand_for_rename): Prepare def operands.
(rewrite_stmt): Use new operand types.
(rewrite_operand): Use new operand types, change parameter type.
* tree-outof-ssa.c (replace_variable): Split into two functions.
(replace_use_variable): Rewrite uses.
(replace_def_variable): Rewrite defs.
(rewrite_trees, rewrite_vars_out_of_ssa): Use new operand types.
* tree-phinodes.c (make_phi_node, resize_phi_node): Use new types.
(add_phi_arg, remove_phi_arg_num): Use new operand types.
* tree-ssa-ccp.c (substitute_and_fold): Use new operand types.
(ccp_fold, replace_uses_in): Use new operand types.
* tree-ssa-copy.c (replace_ssa_names): Rename to replace_ssa_names_ann
and no longer set the value, change parameter type.
(replace_exp_1): Use new operand types.
(propagate_value): Change parameter type, use new operand types.
(propagate_tree_value): Propagate_value without SSA operands.
(replace_exp, cprop_operand, cprop_into_stmt): Use new operand types.
(cprop_into_successor_phis): Use new operand types.
* tree-ssa-dom.c (thread_across_edge): Use new operand types.
(eliminate_redundant_computations): Use new operand types.
* tree-ssa-dse.c (fix_phi_uses): Use new operand_types.
(fix_stmt_v_may_defs): Use new operand_types.
* tree-ssa-live.c (create_ssa_var_map): Use new operand_types.
(build_tree_conflict_graph): Use new operand_types.
* tree-ssa-loop.c (duplicate_blocks): Use PHI_ARG_DEF_FROM_EDGE.
* tree-ssa-operands.c (struct freelist_d): Remove.
(check_optype_freelist, add_optype_freelist): Remove.
(allocate_def_optype, allocate_use_optype, allocate_v_may_def_optype,
allocate_vuse_optype, allocate_v_must_def_optype): Call ggc_alloc.
(free_uses, free_defs, free_vuses, free_v_may_defs, free_v_must_defs):
Call ggc_free instead of add_optype_freelist.
(init_ssa_operands, fini_ssa_operands): Remove free list code.
(finalize_ssa_defs, finalize_ssa_uses): Set new use/def operands.
* tree-ssa-operands.h (struct def_optype_d): Change underlying type.
(struct use_optype_d): Change underlying type.
(def_operand_p, use_operand_p): New types for pointers to operands.
(USE_OP, DEF_OP, V_MAY_DEF_RESULT, V_MAY_DEF_OP, VUSE_OP,
V_MUST_DEF_OP): Use new pointer type instead of dereferencing directly.
(USE_FROM_PTR, DEF_FROM_PTR): New macros to "dereference" operand
pointer types.
(SET_USE, SET_DEF): New macros to set operands from their pointer.
(SET_USE_OP, SET_DEF_OP, SET_V_MAY_DEF_RESULT, SET_V_MAY_DEF_OP,
SET_VUSE_OP, SET_V_MUST_DEF_OP): New SET routines for operands.
(PHI_RESULT_PTR, PHI_RESULT, SET_PHI_RESULT): Macros to manage the
PHI result as an operand.
(PHI_ARG_DEF_PTR, PHI_ARG_DEF, SET_PHI_ARG_DEF, PHI_ARG_DEF_FROM_EDGE,
PHI_ARG_DEF_PTR_FROM_EDGE): Macros to manage the PHI arguments.
* tree-ssa-pre.c (eliminate): Call propagate_tree_value.
* tree-tailcall.c (independent_of_stmt_p, propagate_through_phis): Use
PHI_ARG_DEF_FROM_EDGE.
* tree.h (PHI_RESULT): Renamed to PHI_RESULT_TREE.
(PHI_ARG_DEF): Renamed to PHI_ARG_DEF_TREE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83298 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
| |
* (tree-cfg.c, tree-dfa.c, tree-flow-inline.h, tree-into-ssa.c,
tree-outof-ssa.c, tree-phinodes.c, tree-pretty-print.c,
tree-ssa-alias.c, tree-ssa-ccp.c, tree-ssa-dom.c, tree-ssa-dse.c,
tree-ssa-live.c, tree-ssa-loop.c, tree-ssa-phiopt.c, tree-ssa-pre.c,
tree-ssa.c, tree-tailcall.c): Use PHI_CHAIN instead of TREE_CHAIN
when traversing a list of PHI_NODEs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83273 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
c-incpath.c, cgraphunit.c, ddg.c, defaults.h, dwarf2out.c,
expmed.c, flags.h, gcc.c, gensupport.c, gimplify.c, global.c,
passes.c, reg-stack.c, target.h, toplev.c, tree-alias-ander.c,
tree-alias-common.c, tree-cfg.c, tree-complex.c, tree-dfa.c,
tree-eh.c, tree-mudflap.c, tree-mudflap.h, tree-outof-ssa.c,
tree-phinodes.c, tree-pretty-print.c, tree-ssa-alias.c,
tree-ssa-ccp.c, tree-ssa-live.c, tree-ssa-live.h,
tree-ssa-pre.c, tree.h, value-prof.h, varasm.c: Fix comment
formatting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82463 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* flags.h (flag_delete_null_pointer_checks): Here.
* tree-flow.h (cprop_into_successor_phis): Add argument to prototype.
* tree-phinodes.c (resize_phi_node): Initialize PHI_ARG_NONZERO.
(add_phi_arg, remove_phi_arg_num): Similarly.
* tree-ssa-copy.c (cprop_into_successor_phis): Propagate nonzero
property into PHI nodes.
* tree-ssa-dom.c: Remove redundant inclusion of flags.h.
(record_equivalences_from_phis): If all PHI arguments are known to be
nonzero, then the result must be nonzero as well.
(cprop_into_phis): Pass nonzero_vars bitmap to cprop_into_successor_phis (record_equivalences_from_stmt): Check flag_delete_null_pointer_checks
appropriately. Walk the USE-DEF chains and propagate nonzero property
as appropriate.
* tree.h (PHI_ARG_NONZERO): Define.
(phi_arg_d): Add nonzero flag.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81968 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81764 138bc75d-0d04-0410-961f-82ee72b054a4
|