Source Matching and Rewriting
Vinicius Couto, Luciano Zago, Herv\'e Yviquel, Guido Ara\'ujo

TL;DR
SMR is a user-friendly, source-code-based approach for matching and rewriting idioms in MLIR, enabling automatic code raising to accelerate programs without expert intervention.
Contribution
Introduces SMR, a two-phase automaton-based DAG-matching method for idiom detection and rewriting in MLIR that does not require specialized language knowledge.
Findings
Effectively matches idioms in Fortran and C programs.
Raises idioms as BLAS calls to enhance performance.
Operates without compiler expert intervention.
Abstract
A typical compiler flow relies on a uni-directional sequence of translation/optimization steps that lower the program abstract representation, making it hard to preserve higher-level program information across each transformation step. On the other hand, modern ISA extensions and hardware accelerators can benefit from the compiler's ability to detect and raise program idioms to acceleration instructions or optimized library calls. Although recent works based on Multi-Level IR (MLIR) have been proposed for code raising, they rely on specialized languages, compiler recompilation, or in-depth dialect knowledge. This paper presents Source Matching and Rewriting (SMR), a user-oriented source-code-based approach for MLIR idiom matching and rewriting that does not require a compiler expert's intervention. SMR uses a two-phase automaton-based DAG-matching algorithm inspired by early work on…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Software Testing and Debugging Techniques · Advanced Malware Detection Techniques
