diff options
author | razya <razya@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-31 08:09:49 +0000 |
---|---|---|
committer | razya <razya@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-31 08:09:49 +0000 |
commit | 4d6145f411bdc2b0dcafc890dfcc7642110c897d (patch) | |
tree | e0bc9d5e8ea524eed5012cc4e04fd91ec703771c /gcc/matrix-reorg.c | |
parent | a091367aded99e61c0b377476dfdb59243bf1f2f (diff) | |
download | gcc-4d6145f411bdc2b0dcafc890dfcc7642110c897d.tar.gz |
2007-07-31 Razya Ladelsky <razya@il.ibm.com>
* matrix-reorg.c (analyze_matrix_allocation_site): Avoid referring
to an unallocated space.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127082 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/matrix-reorg.c')
-rw-r--r-- | gcc/matrix-reorg.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/matrix-reorg.c b/gcc/matrix-reorg.c index 946690b280d..46fd6e25a59 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); |