cornell-zhang / heterocl

HeteroCL: A Multi-Paradigm Programming Infrastructure for Software-Defined Heterogeneous Computing
https://cornell-zhang.github.io/heterocl/
Apache License 2.0
322 stars 92 forks source link

Add a schedule/pass that pops up loops to make them perfect #78

Open seanlatias opened 5 years ago

seanlatias commented 5 years ago

We need to add a schedule that can analyze which loops are safe to be moved up in a loop nest. This will be useful and is needed for tiling.

Example: Original IR:

for (i, 0, 10)
  if (i > 5)
    for (j, 0, 10)
      #operations

After transform:

for (i, 0, 10)
  for (j, 0, 10)
    if (i > 5)
      #operations
seanlatias commented 5 years ago

At least we need to perform such operation after each split.