aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRazya Ladelsky <razya@il.ibm.com>2007-07-31 08:09:49 +0000
committerRazya Ladelsky <razya@gcc.gnu.org>2007-07-31 08:09:49 +0000
commit013e926646c2670c030d890125b0256da66fea26 (patch)
treee0bc9d5e8ea524eed5012cc4e04fd91ec703771c /gcc
parent06cb4f7988cff376aeafc230dea8e9a8e3e6c0e9 (diff)
downloadgcc-013e926646c2670c030d890125b0256da66fea26.zip
gcc-013e926646c2670c030d890125b0256da66fea26.tar.gz
gcc-013e926646c2670c030d890125b0256da66fea26.tar.bz2
matrix-reorg.c (analyze_matrix_allocation_site): Avoid referring to an unallocated space.
2007-07-31 Razya Ladelsky <razya@il.ibm.com> * matrix-reorg.c (analyze_matrix_allocation_site): Avoid referring to an unallocated space. From-SVN: r127082
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/matrix-reorg.c12
2 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8f7453b..ed544bd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2007-07-31 Razya Ladelsky <razya@il.ibm.com>
+
+ * matrix-reorg.c (analyze_matrix_allocation_site): Avoid referring
+ to an unallocated space.
+
2007-07-30 Jan Sjodin <jan.sjodin@amd.com>
* tree-data-ref.c
diff --git a/gcc/matrix-reorg.c b/gcc/matrix-reorg.c
index 946690b..46fd6e2 100644
--- a/gcc/matrix-reorg.c
+++ b/gcc/matrix-reorg.c
@@ -818,11 +818,15 @@ analyze_matrix_allocation_site (struct matrix_info *mi, tree stmt,
return;
}
}
- /* This is a call to malloc. Check to see if this is the first
- call in this indirection level; if so, mark it; if not, mark
- as escaping. */
+ /* This is a call to malloc of level 'level'.
+ mi->max_malloced_level-1 == level means that we've
+ seen a malloc statement of level 'level' before.
+ If the statement is not the same one that we've
+ seen before, then there's another malloc statement
+ for the same level, which means that we need to mark
+ it escaping. */
if (mi->malloc_for_level
- && mi->malloc_for_level[level]
+ && mi->max_malloced_level-1 == level
&& mi->malloc_for_level[level] != stmt)
{
mark_min_matrix_escape_level (mi, level, stmt);