On fusing recursive traversals of K-d trees
- Samyam Rajbhandari ,
- Jinsung Kim ,
- Sriram Krishnamoorthy ,
- Louis-Noel Pouchet ,
- Fabrice Rastello ,
- Robert J. Harrison ,
- P. Sadayappan
CC 2016: Proceedings of the 25th International Conference on Compiler Construction |
Loop fusion is a key program transformation for data locality optimization that is implemented in production compilers. But optimizing compilers for imperative languages currently cannot ex- ploit fusion opportunities across a set of recursive tree traversal computations with producer-consumer relationships. In this paper, we develop a compile-time approach to dependence characterization and program transformation to enable fusion across recursively specified traversals over k-d trees. We present the FuseT source-to- source code transformation framework to automatically generate fused composite recursive operators from an input program containing a sequence of primitive recursive operators. We use our framework to implement fused operators for MADNESS, Multi-resolution Adaptive Numerical Environment for Scientific Simulation. We show that locality optimization through fusion can offer significant performance improvement.