diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-11-30 23:28:54 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2004-11-30 15:28:54 -0800 |
commit | c21accc5d9378aa5b20c868364d8025faa5b1ea5 (patch) | |
tree | d2efd28e0c610dd2f38592ae5db2d3ec38eac266 | |
parent | d7d05b864b4cd801d7b79af3fffa3c20a15f68e5 (diff) | |
download | gcc-c21accc5d9378aa5b20c868364d8025faa5b1ea5.zip gcc-c21accc5d9378aa5b20c868364d8025faa5b1ea5.tar.gz gcc-c21accc5d9378aa5b20c868364d8025faa5b1ea5.tar.bz2 |
tree-vectorizer.c (vect_analyze_data_refs): Reformat and avoid uninitialized variable.
2004-11-30 Nathan Sidwell <nathan@codesourcery.com>
* tree-vectorizer.c (vect_analyze_data_refs): Reformat and avoid
uninitialized variable.
From-SVN: r91543
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-vectorizer.c | 32 |
2 files changed, 25 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1478dd4..16dfb19 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-11-30 Nathan Sidwell <nathan@codesourcery.com> + + * tree-vectorizer.c (vect_analyze_data_refs): Reformat and avoid + uninitialized variable. + 2004-11-30 Eric Christopher <echristo@redhat.com> * fold-const.c (fold_widened_comparison): Make sure that we're diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index 0f49a32..2c7738b 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -4899,7 +4899,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo) int nbbs = loop->num_nodes; block_stmt_iterator si; int j; - struct data_reference *dr, *tmp_dr; + struct data_reference *dr; tree tag; tree address_base; bool base_aligned_p; @@ -5013,17 +5013,25 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo) switch (TREE_CODE (address_base)) { case ARRAY_REF: - tmp_dr = analyze_array (stmt, TREE_OPERAND (symbl, 0), - DR_IS_READ (tmp_dr)); - tag = vect_get_base_and_bit_offset (tmp_dr, DR_BASE_NAME (tmp_dr), - NULL_TREE, loop_vinfo, &offset, &base_aligned_p); - if (!tag) - { - if (vect_debug_stats (loop) || vect_debug_details (loop)) - fprintf (dump_file, "not vectorized: no memtag for ref."); - return false; - } - STMT_VINFO_MEMTAG (stmt_info) = tag; + { + struct data_reference *tmp_dr; + + tmp_dr = analyze_array (stmt, TREE_OPERAND (symbl, 0), + DR_IS_READ (dr)); + tag = vect_get_base_and_bit_offset + (tmp_dr, DR_BASE_NAME (tmp_dr), + NULL_TREE, loop_vinfo, &offset, &base_aligned_p); + if (!tag) + { + if (vect_debug_stats (loop) + || vect_debug_details (loop)) + fprintf (dump_file, + "not vectorized: no memtag for ref."); + return false; + } + STMT_VINFO_MEMTAG (stmt_info) = tag; + } + break; case VAR_DECL: |