Abstract | ||
---|---|---|
Compilers provide many architecture-agnostic, high-level optimizations trading off peak performance for code size. High-level optimizations typically cannot precisely reason about their impact, as they are applied before the final shape of the generated machine code can be determined. However, they still need a way to estimate their transformation’s impact on the performance of a compilation unit. Therefore, compilers typically resort to modelling these estimations as trade-off functions that heuristically guide optimization decisions. Compilers such as Graal implement many such handcrafted heuristic trade-off functions, which are tuned for one particular high-level optimization. Heuristic trade-off functions base their reasoning on limited knowledge of the compilation unit, often causing transformations that heavily increase code size or even decrease performance. To address this problem, we propose a cost model for Graal’s high-level intermediate representation that models relative operation latencies and operation sizes in order to be used in trade-off functions of compiler optimizations. We implemented the cost model in Graal and used it in two code-duplication-based optimizations. This allowed us to perform a more fine-grained code size trade-off in existing compiler optimizations, reducing the code size increase of our optimizations by up to 50% compared to not using the proposed cost model in these optimizations, without sacrificing performance. Our evaluation demonstrates that the cost model allows optimizations to perform fine-grained code size and performance trade-offs outperforming hard-coded heuristics.
|
Year | DOI | Venue |
---|---|---|
2018 | 10.1145/3281287.3281290 | SPLASH '18: Conference on Systems, Programming, Languages, and Applications: Software for Humanity
Boston
MA
USA
November, 2018 |
Keywords | Field | DocType |
Intermediate Representation, Cost Model, Performance Estimation, Just-In-Time Compilation | Heuristic,Programming language,Computer science,Optimizing compiler,Compiler,Heuristics,Machine code,Intermediate language,Just-in-time compilation,Translation unit (programming) | Conference |
ISBN | Citations | PageRank |
978-1-4503-6071-5 | 0 | 0.34 |
References | Authors | |
21 | 5 |
Name | Order | Citations | PageRank |
---|---|---|---|
David Leopoldseder | 1 | 6 | 1.83 |
Lukas Stadler | 2 | 295 | 17.19 |
Manuel Rigger | 3 | 26 | 5.86 |
Thomas Würthinger | 4 | 396 | 25.63 |
Hanspeter Mössenböck | 5 | 781 | 88.17 |