aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorTomas Bily <tbily@suse.cz>2008-12-03 14:35:13 +0100
committerTomas Bily <tomby@gcc.gnu.org>2008-12-03 14:35:13 +0100
commit3661e899786b93d537873fa8508255e1e44190c7 (patch)
treece8e0b8567348f3139f7c4c74dd94700b18f970f /gcc/tree-data-ref.c
parentf11d2f1e7e33588448f7b60ce752d5d355377cb1 (diff)
downloadgcc-3661e899786b93d537873fa8508255e1e44190c7.zip
gcc-3661e899786b93d537873fa8508255e1e44190c7.tar.gz
gcc-3661e899786b93d537873fa8508255e1e44190c7.tar.bz2
re PR middle-end/38250 (ICE with -O2 -ftree-loop-distribution)
PR middle-end/38250 * tree-loop-distribution.c (build_size_arg): New function. (generate_memset_zero): Checks if DR_STEP(de) is NULL. Reorganized generating of stmts. * testsuite/gcc.dg/tree-ssa/pr38250.c: New file. * tree-data-ref.c (dr_analyze_innermost): Returns bool. Indicate if analysis succeed. * tree-data-ref.h (dr_analyze_innermost): Returns bool. * tree-predcom.c (valid_initializer_p, find_looparound_phi): Uses new definition of dr_analyze_innermost. From-SVN: r142394
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 4f1a9fd..2715339 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -667,9 +667,9 @@ canonicalize_base_object_address (tree addr)
}
/* Analyzes the behavior of the memory reference DR in the innermost loop that
- contains it. */
+ contains it. Returns true if analysis succeed or false otherwise. */
-void
+bool
dr_analyze_innermost (struct data_reference *dr)
{
gimple stmt = DR_STMT (dr);
@@ -693,7 +693,7 @@ dr_analyze_innermost (struct data_reference *dr)
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "failed: bit offset alignment.\n");
- return;
+ return false;
}
base = build_fold_addr_expr (base);
@@ -701,7 +701,7 @@ dr_analyze_innermost (struct data_reference *dr)
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "failed: evolution of base is not affine.\n");
- return;
+ return false;
}
if (!poffset)
{
@@ -712,7 +712,7 @@ dr_analyze_innermost (struct data_reference *dr)
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "failed: evolution of offset is not affine.\n");
- return;
+ return false;
}
init = ssize_int (pbitpos / BITS_PER_UNIT);
@@ -735,6 +735,8 @@ dr_analyze_innermost (struct data_reference *dr)
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "success.\n");
+
+ return true;
}
/* Determines the base object and the list of indices of memory reference