Graph IRs for Impure Higher-Order Languages: Making Aggressive Optimizations Affordable with Precise Effect Dependencies
Oliver Bracevac, Guannan Wei, Songlin Jia, Supun Abeysinghe, Yuxuan Jiang, Yuyan Bao, Tiark Rompf
摘要
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 system to 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 𝜆-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 21𝑥.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 10 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- What's in the Box: Ergonomic and Expressive Capture Tracking over Generic Data Structures 引用了 Reachability types: tracking aliasing and separation in higher-order functional programs
- What's in the Box: Ergonomic and Expressive Capture Tracking over Generic Data Structures 引用了 Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic Programs
- Complete the Cycle: Reachability Types with Expressive Cyclic References 引用了 Reachability types: tracking aliasing and separation in higher-order functional programs
- Complete the Cycle: Reachability Types with Expressive Cyclic References 引用了 Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational Theory
- Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational Theory 引用了 Complete the Cycle: Reachability Types with Expressive Cyclic References
- Complete the Cycle: Reachability Types with Expressive Cyclic References 引用了 Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic Programs
- Flan: An Expressive and Efficient Datalog Compiler for Program Analysis 引用了 Compiling symbolic execution with staging and algebraic effects
- Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational Theory 引用了 Reachability types: tracking aliasing and separation in higher-order functional programs
- Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational Theory 引用了 Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic Programs
- Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic Programs 引用了 Reachability types: tracking aliasing and separation in higher-order functional programs
引用它的顶会 Paper10
- Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic ProgramsGuannan Wei, Oliver Bracevac, Songlin Jia, Yuyan Bao 等POPL 2024 · 12 次引用
- Flan: An Expressive and Efficient Datalog Compiler for Program AnalysisSupun Abeysinghe, Anxhelo Xhebraj, Tiark RompfPOPL 2024 · 9 次引用
- Fuzzing JavaScript Engines with a Graph-based IRHaoran Xu, Zhiyuan Jiang, Yongjun Wang, Shuhui Fan 等CCS 2024 · 8 次引用
- What's in the Box: Ergonomic and Expressive Capture Tracking over Generic Data StructuresYichen Xu, Oliver Bracevac, Cao Nguyen Pham, Martin OderskyOOPSLA 2025 · 4 次引用
- Complete the Cycle: Reachability Types with Expressive Cyclic ReferencesHaotian Deng, Siyuan He, Songlin Jia, Yuyan Bao 等OOPSLA 2025 · 3 次引用
它引用的 Paper4
- Reachability types: tracking aliasing and separation in higher-order functional programsYuyan Bao, Guannan Wei, Oliver Bracevac, Yuxuan Jiang 等OOPSLA 2021 · 19 次引用
- Compiling symbolic execution with staging and algebraic effectsGuannan Wei, Oliver Bracevac, Shangyin Tan, Tiark RompfOOPSLA 2020 · 12 次引用
- Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic ProgramsGuannan Wei, Oliver Bracevac, Songlin Jia, Yuyan Bao 等POPL 2024 · 12 次引用
- Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational TheoryYuyan Bao, Songlin Jia, Guannan Wei, Oliver Bracevac 等OOPSLA 2025 · 3 次引用
相关 Paper
- A separation logic for effect handlersPaulo Emílio de Vilhena, François PottierPOPL 2021 · 24 次引用
- Explicit Effects and Effect Constraints in ReMLMartin ElsmanPOPL 2024 · 4 次引用
- Modular Denotational Semantics for Effects with Guarded Interaction TreesDan Frumin, Amin Timany, Lars BirkedalPOPL 2024 · 13 次引用
- A Lightweight Type-and-Effect System for Invalidation Safety: Tracking Permanent and Temporary Invalidation with Constraint-Based Subtype InferenceCunyuan Gao, Lionel ParreauxOOPSLA 2025 · 4 次引用
- From Capabilities to Regions: Enabling Efficient Compilation of Lexical Effect HandlersMarius Müller, Philipp Schuster, Jonathan Lindegaard Starup, Klaus Ostermann 等OOPSLA 2023 · 7 次引用
