This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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
on i686.


	* tree-flow-inline.h (memory_partition): Return NULL when aliases were
	not computed for the current function.

Index: tree-flow-inline.h
*** tree-flow-inline.h	(revision 141718)
--- tree-flow-inline.h	(working copy)
*************** memory_partition (tree sym)
*** 644,649 ****
--- 644,655 ----
      return sym;
    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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]