# User-Directed Loop-Transformations in Clang

arXiv: https://arxiv.org/abs/1811.00624 · HTML: https://mlsanity.com/paper/1811.00624/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 1 Nov 2018.

## Built on by (most cited first, 3 of 3)

- [ytopt: Autotuning Scientific Applications for Energy Efficiency at Large Scales](https://mlsanity.com/paper/2303.16245/) (2023)
- [Customized Monte Carlo Tree Search for LLVM/Polly's Composable Loop Optimization Transformations](https://mlsanity.com/paper/2105.04555/) (2021)
- [Autotuning PolyBench Benchmarks with LLVM Clang/Polly Loop Optimization Pragmas Using Bayesian Optimization (extended version)](https://mlsanity.com/paper/2104.13242/) (2021)

## Abstract (arXiv)

Directives for the compiler such as pragmas can help programmers to separate an algorithm's semantics from its optimization. This keeps the code understandable and easier to optimize for different platforms. Simple transformations such as loop unrolling are already implemented in most mainstream compilers. We recently submitted a proposal to add generalized loop transformations to the OpenMP standard. We are also working on an implementation in LLVM/Clang/Polly to show its feasibility and usefulness. The current prototype allows applying patterns common to matrix-matrix multiplication optimizations.
