Section: Software
Bee
Participants : Christophe Alias, Fabrice Baray, Alain Darte.
Bee is – to our knowledge – the only complete tool, from source to source,
able to contract arrays. It has been developed by Christophe Alias and represents
more than 7000 lines of code. It rewrites a kernel written in C to reduce the
size of arrays, bridging the gap between the theoretical framework described
in [16] and implemented in Cl@k, and effective program
transformations for array contraction. For that, a novel and precise lifetime
analysis for arrays has been designed and implemented.
After being determined by Cl@k, the allocations are then translated
back from the critical integer lattices into real code: the arrays are
remapped thanks to a linear (modular) allocation function ( ) that collapses array cells that
do not live at the same time.
Bee also provides a language of pragmas allowing to specify the kernel to be analyzed, the arrays to be contracted, and (optionally) the affine schedule of the kernel. The latter feature enlarges the application field of array contraction to parallel programs. For instance, it is possible to mark a loop to be software-pipelined (with an affine schedule), and to let Bee get an optimized array contraction. But the most important application is the ability to optimize communicating regular processes (CRP). Given a schedule for every process, Bee can compute an optimal size for the channels, together with their access function (the corresponding allocations). We currently use this feature in source-to-source transformations for high-level synthesis (see Section 3.3 ).
As many polyhedral tools, Bee makes an intensive use of the state-of-the-art libraries Pip (parameterized integer programming) and Polylib (polyhedra set operations). The input program is parsed thanks to Rose, a library developed by D. Quinlan at Lawrence Livermore National Labs (USA). Rose provides various features to manipulates ASTs and a unified C++ interface on EDG, an industrial C/C++ parser from Edison group. The robustness of the parser (used in Intel compilers) is another important feature that enlarges the application domain of Bee.