Splitting Polyhedra to Generate More Efficient Code
Abstract
Code generation in the polyhedral model takes as input
a union of Z-polyhedra and produces code scanning all of
them. Modern code generation tools are heavily relying on
polyhedral operations to perform this task. However, these
operations are typically provided by general-purpose poly-
hedral libraries that are not specifically designed to address
the code generation problem. In particular, (unions of) poly-
hedra may be represented in various mathematically equiv-
alent ways which may have different properties with respect
to code generation. In this paper, we investigate this prob-
lem and try to find the best representation of polyhedra to
generate efficient code.
We present two contributions. First we demonstrate that
this problem has been largely under-estimated, showing sig-
nificant control overhead deviations when using different
representations of the same polyhedra. Second, we propose
an improvement to the main algorithm of the state-of-the-art
code generation tool CLooG. It generates code with fewer
tests in the inner loops, and aims to reduce control overhead
and to simplify vectorization for the compiler, at the cost of
a larger code size. It is based on a smart splitting of the
union of polyhedra while recursing on the dimensions. We
implemented our algorithm in CLooG/PolyLib, and com-
pared the performance and size of the generated code to the
CLooG/isl version.
Fichier principal
impact-17-splitting-polyhedra-to-generate-more-efficient-code.pdf (360.36 Ko)
Télécharger le fichier
Origin : Files produced by the author(s)
Loading...