diff options
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. */ |