A Framework for Enhancing Data Reuse via Associative Reordering
The freedom to reorder computations involving associative operators has been widely recognized and exploited in designing parallel algorithms and to a more limited extent in optimizing compilers. In this paper, the authors develop a novel framework utilizing the associativity and commutativity of operations in regular loop computations to enhance register reuse. Stencils represent a particular class of important computations where the optimization framework can be applied to enhance performance. They show how stencil operations can be implemented to better exploit register reuse and reduce load/stores.