The XFOR generator

XFORGEN is a software tool that generates equivalent XFOR loops from the resulting OpenScop file generated by automatic loop optimizers. As automatic locality optimizer, we consider Pluto which is the most well-known source-to-source polyhedral compiler. It shows that XFOR loops can also play the role of  a Polyhedral Intermediate Representation of loop transformations. They exhibit the applied transformations as grain and offset values, thus helping in understanding the transformations and allowing to modify/improve the automatically generated solution.

XFORGEN can also be used to automatically optimize XFOR programs using Pluto. Thanks to our extension of the loop parser
Clan, any XFOR program is translated in OpenScop format to serve as input to Pluto.

Here is an example with kernel 2mm of the
Polybench benchmark suite. Pluto's solution (below on the left) has been generated using the following command:

polycc 2mm.c --tile --intratileopt --maxfuse --smartfuse --noprevector

XFORGEN's equivalent XFOR syntax (below on the right) has been generated using the following command:

xforgen 2mm.c -pluto