[Bug rtl-optimization/68128] A huge regression in Parboil v2.5 OpenMP CUTCP test (2.5 times lower performance)

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 23 11:01:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68128

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
.omp_data_i = &PARM_NOALIAS.0+64
PARM_NOALIAS.0+64 = &NONLOCAL
PARM_NOALIAS.64+192 = &NONLOCAL
...
_35 = *.omp_data_i
pg_36 = _35 + UNKNOWN
pg_63 = pg_36

.omp_data_i_12(D), points-to vars: { D.1985 } (nonlocal)
pg_63 = { NONLOCAL }

and we end up with

  <bb 9>:
  # iftmp.0_7 = PHI <e_45(7), 0.0(8)>
  _47 = iftmp.0_7 + _46;
  *pg_63 = _47;
  i_49 = i_62 + 1;
  # PT = nonlocal
  pg_50 = pg_63 + 4;
  _51 = MEM[(struct .omp_data_s.1 &).omp_data_i_12(D) clique 1 base
1].gridspacing;
  dx_52 = _51 + dx_64;
  if (ib_28 >= i_49)
    goto <bb 7>;
  else
    goto <bb 6>;

where we consider the load of gridspacing to alias *pg_63.  That is because
of the not implemented ??? in

/* Mark "other" loads and stores as belonging to CLIQUE and with
   base zero.  */

static bool
visit_loadstore (gimple *, tree base, tree ref, void *clique_)
{
  unsigned short clique = (uintptr_t)clique_;
  if (TREE_CODE (base) == MEM_REF
      || TREE_CODE (base) == TARGET_MEM_REF)
    {
      tree ptr = TREE_OPERAND (base, 0);
      if (TREE_CODE (ptr) == SSA_NAME
          && ! SSA_NAME_IS_DEFAULT_DEF (ptr))
        {
          /* ???  We need to make sure 'ptr' doesn't include any of
             the restrict tags we added bases for in its points-to set.  */
          return false;
        }

which would need to look at ptr's points-to solution and intersect that
with a bitmap we'd need to form out of the restrict tags used for the
respective clique (we only use a single one at the moment, thus a
single bit test is enough if you consider properly pt_anything for ptr).

It's not a complicated fix I think so if you have time to play with it...


More information about the Gcc-bugs mailing list