Ejemplo n.º 1
0
bool
scop_do_block (scop_p scop)
{
  bool strip_mined = false;
  bool interchanged = false;

  store_scattering (scop);

  strip_mined = lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop), 0);
  interchanged = scop_do_interchange (scop);

  /* If we don't interchange loops, the strip mine alone will not be
     profitable, and the transform is not a loop blocking: so revert
     the transform.  */
  if (!interchanged)
    {
      restore_scattering (scop);
      return false;
    }
  else if (strip_mined && interchanged
	   && dump_file && (dump_flags & TDF_DETAILS))
    fprintf (dump_file, "SCoP will be loop blocked.\n");

  return strip_mined || interchanged;
}
Ejemplo n.º 2
0
bool
scop_do_block (scop_p scop)
{
  store_scattering (scop);

  /* If we don't strip mine at least two loops, or not interchange
     loops, the strip mine alone will not be profitable, and the
     transform is not a loop blocking: so revert the transform.  */
  if (lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop), 0) < 2
      || scop_do_interchange (scop) == 0)
    {
      restore_scattering (scop);
      return false;
    }

  if (dump_file && (dump_flags & TDF_DETAILS))
    fprintf (dump_file, "SCoP will be loop blocked.\n");

  return true;
}
Ejemplo n.º 3
0
bool
scop_do_strip_mine (scop_p scop, int stride)
{
  return lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop), stride);
}