Graph IRs for Impure Higher-Order Languages: Making Aggressive Optimizations Affordable with Precise Effect Dependencies
Graph IRs for Impure Higher-Order Languages: Making Aggressive Optimizations Affordable with Precise Effect Dependencies
复制标题
非纯高阶语言的图 IR:通过精确的效果依赖性使积极的优化变得经济实惠
DOI:
10.1145/3622813
复制
发表时间:
2023
影响因子:
--
通讯作者:
Rompf, Tiark
中科院分区:
文献类型:
--
作者:
Bračevac, Oliver;Wei, Guannan;Jia, Songlin;Abeysinghe, Supun;Jiang, Yuxuan;Bao, Yuyan;Rompf, Tiark
Graph-based intermediate representations (IRs) are widely used for powerful compiler optimizations, either interprocedurally in pure functional languages, or intraprocedurally in imperative languages. Yet so far, no suitable graph IR exists for aggressive global optimizations in languages with both effects and higher-order functions: aliasing and indirect control transfers make it difficult to maintain sufficiently granular dependency information for optimizations to be effective. To close this long-standing gap, we propose a novel typed graph IR combining a notion of reachability types with an expressive effect system to compute precise and granular effect dependencies at an affordable cost while supporting local reasoning and separate compilation. Our high-level graph IR imposes lexical structure to represent structured control flow and nesting, enabling aggressive and yet inexpensive code motion and other optimizations for impure higher-order programs. We formalize the new graph IR based on a λ-calculus with a reachability type-and-effect system along with a specification of various optimizations. We present performance case studies for tensor loop fusion, CUDA kernel fusion, symbolic execution of LLVM IR, and SQL query compilation in the Scala LMS compiler framework using the new graph IR. We observe significant speedups of up to 21x.
登录
查看更多内容
DOI:
--
发表时间:
1994
期刊:
ACM-SIGACT Symposium on Principles of Programming Languages
影响因子:
--
作者:
J. Hatcliff;O. Danvy
通讯作者:
O. Danvy
DOI:
--
发表时间:
2023
期刊:
Proc. ACM Program. Lang.
影响因子:
--
作者:
Guannan Wei;Oliver Bračevac;Songlin Jia;Yuyan Bao;Tiark Rompf
通讯作者:
Tiark Rompf
DOI:
--
发表时间:
2020
期刊:
Proc. ACM Program. Lang.
影响因子:
--
作者:
L. Parreaux
通讯作者:
L. Parreaux
DOI:
--
发表时间:
2002
期刊:
Journal of Functional and Logic Programming
影响因子:
--
作者:
O. Danvy;U. Schultz
通讯作者:
U. Schultz
DOI:
--
发表时间:
2004
期刊:
SIGP
影响因子:
--
作者:
O. Shivers
通讯作者:
O. Shivers