Graph IRs for Impure Higher-Order Languages

被引:0
|
作者
Bracevac, Oliver [1 ,2 ]
Wei, Guannan [1 ]
Jia, Songlin [1 ]
Abeysinghe, Supun [1 ]
Jiang, Yuxuan [1 ]
Bao, Yuyan [3 ]
Rompf, Tiark [1 ]
机构
[1] Purdue Univ, W Lafayette, IN 47907 USA
[2] Galois Inc, Portland, OR 97204 USA
[3] Augusta Univ, Augusta, GA USA
来源
关键词
intermediate representations; higher-order languages; effects; compilers; CODE MOTION; PROGRAMS; INFERENCE;
D O I
10.1145/3622813
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 to track aliasing with an expressive effect systemto compute precise and granular effect dependencies, 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, instruction selection, and other optimizations for impure higher-order programs. We formalize the new graph IR based on a lambda-calculus with a reachability type-and-effect system along with a specification of various optimizations. We present performance case studies for CUDA tensor 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.
引用
收藏
页数:31
相关论文
共 50 条
  • [41] Higher-order fluctuations in dense random graph models
    Kaur, Gursharn
    Rollin, Adrian
    [J]. ELECTRONIC JOURNAL OF PROBABILITY, 2021, 26
  • [42] PLANARITY-ENFORCING HIGHER-ORDER GRAPH CUT
    Weibel, Thomas
    Daul, Christian
    Wolf, Didier
    Roesch, Ronald
    [J]. 2011 18TH IEEE INTERNATIONAL CONFERENCE ON IMAGE PROCESSING (ICIP), 2011, : 41 - 44
  • [43] Higher-Order Clique Reduction in Binary Graph Cut
    Ishikawa, Hiroshi
    [J]. CVPR: 2009 IEEE CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION, VOLS 1-4, 2009, : 2985 - 2992
  • [44] Higher-order Clustering and Pooling for Graph Neural Networks
    Duval, Alexandre
    Malliaros, Fragkiskos
    [J]. PROCEEDINGS OF THE 31ST ACM INTERNATIONAL CONFERENCE ON INFORMATION AND KNOWLEDGE MANAGEMENT, CIKM 2022, 2022, : 426 - 435
  • [45] Higher-Order Graph Convolutional Embedding for Temporal Networks
    Mo, Xian
    Pang, Jun
    Liu, Zhiming
    [J]. WEB INFORMATION SYSTEMS ENGINEERING, WISE 2020, PT I, 2020, 12342 : 3 - 15
  • [46] Local Expansion and Optimization for Higher-Order Graph Clustering
    Ma, Wenhong
    Cai, Lijun
    He, Tingqin
    Chen, Lei
    Cao, Zehong
    Li, Renfa
    [J]. IEEE INTERNET OF THINGS JOURNAL, 2019, 6 (05) : 8702 - 8713
  • [47] Sorted HiLog: Sorts in higher-order logic data languages
    Chen, WD
    Kifer, M
    [J]. DATABASE THEORY - ICDT '95, 1995, 893 : 252 - 265
  • [48] Type error slicing in implicitly typed higher-order languages
    Haack, C
    Wells, JB
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, 2003, 2618 : 284 - 301
  • [49] A congruence theorem for structured operational semantics of higher-order languages
    Bernstein, KL
    [J]. THIRTEENTH ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, PROCEEDINGS, 1998, : 153 - 164
  • [50] Type error slicing in implicitly typed higher-order languages
    Haack, C
    Wells, JB
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 2004, 50 (1-3) : 189 - 224