aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-loop-linear.c
AgeCommit message (Collapse)AuthorFilesLines
2004-09-16[multiple changes]Daniel Berlin1-42/+129
2004-09-16 Daniel Berlin <dberlin@dberlin.org> * cfgloop.h (duplicate_loop): Add prototype. * cfgloopmanip.c (duplicate_loop): Make non-static. * lambda-code.c (perfect_nestify): Factor out test whether we can handle this loop into separate function. Call it. (can_convert_to_perfect_nest): New function. (replace_uses_of_x_with_y): Add modify_stmt call. * tree-loop-linear.c (linear_transform_loops): Call rewrite_into_loop_closed_ssa and free_df. 2004-09-16 Daniel Berlin <dberlin@dberlin.org> * lambda-code.c (invariant_in_loop): is_gimple_min_invariant is loop invariant as well. (perfect_nestify): new function. (gcc_loop_to_lambda_loop): New parameters to track lower bounds, upper bounds, and steps. Set outerinductionvar properly. (gcc_loopnest_to_lambda_loopnest): Add loops and need_perfect parameters. Return NULL if we need a perfect loop and can't make one. (lambda_loopnest_to_gcc_loopnest): Correct algorithm. (not_interesting_stmt): New function. (phi_loop_edge_uses_def): Ditto. (stmt_uses_phi_result): Ditto. (stmt_is_bumper_for_loop): Ditto. (perfect_nest_p): Ditto. (nestify_update_pending_stmts): Ditto. (replace_uses_of_x_with_y): Ditto. (stmt_uses_op): Ditto. (perfect_nestify): Ditto. * lambda-mat.c (lambda_matrix_id_p): New function. * lambda-trans.c (lambda_trans_matrix_id_p): Ditto. * lambda.h: Update prototypes. * tree-loop-linear (linear_transform_loop): Use new perfect_nest_p. Detect and ignore identity transform. * tree-ssa-loop.c (pass_linear_transform): Use TODO_write_loop_closed. 2004-09-16 Sebastian Pop <pop@cri.ensmp.fr> * tree-loop-linear.c (gather_interchange_stats): Add more comments. Gather also strides of accessed data. Pass in the data references array. (try_interchange_loops): Add a new heuristic for handling the temporal locality. Pass in the data references array. (linear_transform_loops): Pass the data references array to try_interchange_loops. From-SVN: r87607
2004-09-08Makefile.in (tree-loop-linear.o): Added.Daniel Berlin1-0/+282
2004-09-08 Daniel Berlin <dberlin@dberlin.org> * Makefile.in (tree-loop-linear.o): Added. (OBJS-common): Add tree-loop-linear.o * common.opt: New flag, ftree-loop-linear. * timevar.def: New timevar, TV_TREE_LOOP_LINEAR. * tree-flow.h: Add prototype for linear_transform_loops. * tree-optimize.c: Add linear transform after vectorization. * tree-pass.h: Add struct pass_linear_transform. * tree-ssa-loop.c: Add pass_linear_transform. * tree-loop-linear.c: New file. * lambda-code.c: gcc_assertify. (gcc_loop_to_lambda_loop): Handle all exit tests. Handle case where we have (invariant >= induction var). (find_induction_var_from_exit_cond): Ditto. From-SVN: r87190