This is the mail archive of the
mailing list for the GCC project.
[patch] PR 37950
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 12 Nov 2008 05:30:40 +0100
- Subject: [patch] PR 37950
consider a loop
for (i = 0; i < n; i++)
... = arr[i];
where memory_partition (arr) = MPT.1. When autoparallelization moves
the statement to the new function, we rescan its arguments, however
a reference to MPT.1 remains inside gimple_loaded_syms of the statement.
This leads to ice during the compilation of the new function.
The patch below ensures that when we are scanning the operands of the
statement in the context of the new function, we consider
memory_partition (arr) to be NULL as expected. Bootstrapped & regtested
* tree-flow-inline.h (memory_partition): Return NULL when aliases were
not computed for the current function.
*** tree-flow-inline.h (revision 141718)
--- tree-flow-inline.h (working copy)
*************** memory_partition (tree sym)
*** 644,649 ****
--- 644,655 ----
gcc_assert (!is_gimple_reg (sym));
+ /* Autoparallelization moves statements from the original function (which has
+ aliases computed) to the new one (which does not). When rebuilding
+ operands for the statement in the new function, we do not want to
+ record the memory partition tags of the original function. */
+ if (!gimple_aliases_computed_p (cfun))
+ return NULL_TREE;
tag = get_var_ann (sym)->mpt;
#if defined ENABLE_CHECKING