A new code transformation technique for nested loops

Ivan Šimeček1 and Pavel Tvrdík1

  1. Department of Computer Systems, Faculty of Information Technology
    Czech Technical University in Prague, 160 00, Prague, Czech Republic
    {xsimecek,pavel.tvrdik}@fit.cvut.cz

Abstract

For good performance of every computer program, good cache utilization is crucial. In numerical linear algebra libraries, good cache utilization is achieved by explicit loop restructuring (mainly loop blocking), but it requires a complicated memory pattern behavior analysis. In this paper, we describe a new source code transformation called dynamic loop reversal that can increase temporal and spatial locality. We also describe a formal method for predicting cache behavior and evaluate results of the model accuracy by the measurements on a cache monitor. The comparisons of the numbers of measured cache misses and the numbers of cache misses estimated by the model indicate that the model is relatively accurate and can be used in practice.

Key words

Source code optimization, loop transformations, model of cache behavior

Digital Object Identifier (DOI)

https://doi.org/10.2298/CSIS131126075S

Publication information

Volume 11, Issue 4 (October 2014)
Special Issue on Advances in Systems, Modeling, Languages and Agents
Year of Publication: 2014
ISSN: 2406-1018 (Online)
Publisher: ComSIS Consortium

Full text

DownloadAvailable in PDF
Portable Document Format

How to cite

Šimeček, I., Tvrdík, P.: A new code transformation technique for nested loops. Computer Science and Information Systems, Vol. 11, No. 4, 1381–1416. (2014), https://doi.org/10.2298/CSIS131126075S