diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-04 15:04:15 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-04 15:04:15 +0000 |
commit | 6198d968dbe721ee9fc231ad54e5d203c9846e5c (patch) | |
tree | 1745a46aaf5a6b03f3fbcde7185c2656be7d45bc /gcc/tree-data-ref.c | |
parent | 79a1581a1ff07bcb03955ffeda2ae349be4d2ef2 (diff) | |
download | gcc-6198d968dbe721ee9fc231ad54e5d203c9846e5c.tar.gz |
2012-06-04 Richard Guenther <rguenther@suse.de>
* tree-data-ref.c (stores_from_loop): Remove.
(stmt_with_adjacent_zero_store_dr_p): Likewise.
(stores_zero_from_loop): Likewise.
* tree-data-ref.h (stores_from_loop, stores_zero_from_loop,
stmt_with_adjacent_zero_store_dr_p, stride_of_unit_type_p): Remove.
(adjacent_store_dr_p): New function.
* tree-loop-distribution.c (generate_memset_builtin): Pass
the RDG, use the already available data-reference.
(generate_code_for_partition): Pass down RDG.
(classify_partition): Inline parts of the former
stmt_with_adjacent_zero_store_dr_p here and use adjacent_store_dr_p.
(ldist_gen): Remember if there was any detected builtin and
do less work if not and flag_tree_loop_distribution is not set.
(tree_loop_distribution): Inline and fuse stores_from_loop
and stores_zero_from_loop here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188186 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index bf1d859178b..274a336ed84 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -5174,88 +5174,6 @@ free_rdg (struct graph *rdg) free_graph (rdg); } -/* Initialize STMTS with all the statements of LOOP that contain a - store to memory. */ - -void -stores_from_loop (struct loop *loop, VEC (gimple, heap) **stmts) -{ - unsigned int i; - basic_block *bbs = get_loop_body_in_dom_order (loop); - - for (i = 0; i < loop->num_nodes; i++) - { - basic_block bb = bbs[i]; - gimple_stmt_iterator bsi; - - for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi)) - if (gimple_vdef (gsi_stmt (bsi))) - VEC_safe_push (gimple, heap, *stmts, gsi_stmt (bsi)); - } - - free (bbs); -} - -/* Returns true when the statement at STMT is of the form "A[i] = 0" - that contains a data reference on its LHS with a stride of the same - size as its unit type. */ - -bool -stmt_with_adjacent_zero_store_dr_p (gimple stmt) -{ - tree lhs, rhs; - bool res; - struct data_reference *dr; - - if (!stmt - || !gimple_vdef (stmt) - || !gimple_assign_single_p (stmt)) - return false; - - lhs = gimple_assign_lhs (stmt); - rhs = gimple_assign_rhs1 (stmt); - - /* If this is a bitfield store bail out. */ - if (TREE_CODE (lhs) == COMPONENT_REF - && DECL_BIT_FIELD (TREE_OPERAND (lhs, 1))) - return false; - - if (!(integer_zerop (rhs) || real_zerop (rhs))) - return false; - - dr = XCNEW (struct data_reference); - - DR_STMT (dr) = stmt; - DR_REF (dr) = lhs; - - res = dr_analyze_innermost (dr, loop_containing_stmt (stmt)) - && stride_of_unit_type_p (DR_STEP (dr), TREE_TYPE (lhs)); - - free_data_ref (dr); - return res; -} - -/* Initialize STMTS with all the statements of LOOP that contain a - store to memory of the form "A[i] = 0". */ - -void -stores_zero_from_loop (struct loop *loop, VEC (gimple, heap) **stmts) -{ - unsigned int i; - basic_block bb; - gimple_stmt_iterator si; - gimple stmt; - basic_block *bbs = get_loop_body_in_dom_order (loop); - - for (i = 0; i < loop->num_nodes; i++) - for (bb = bbs[i], si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si)) - if ((stmt = gsi_stmt (si)) - && stmt_with_adjacent_zero_store_dr_p (stmt)) - VEC_safe_push (gimple, heap, *stmts, gsi_stmt (si)); - - free (bbs); -} - /* Determines whether the statement from vertex V of the RDG has a definition used outside the loop that contains this statement. */ |