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; }
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; }