R Melts Brains -- An IR for First-Class Environments and Lazy Effectful Arguments
summary
An SSA-based intermediate language PIR IR models first-class environments, promises (makepromise/force) and closures explicitly so scope-resolution computes reaching stores and replaces loads with SSA defs, and an interprocedural pass infers where lazy arguments are evaluated enabling inlining. A lightweight stub environments mechanism lets calls assume non-reflective behavior and fall back if violated. Implementation (RIR/Irish) shows 12–65% closures lose real environments and 30–90% fewer environments are created at runtime.
AI-written summary · about
chapters (4)
related talks
18mGraph IRs for Impure Higher-Order Languages: Making Aggressive Optimizations Af...
20mMimIR: An Extensible and Type-Safe Intermediate Representation for the DSL Age
01h 05mSemantic Intermediate Representations for Sound Language Interoperability
48mCross-Domain Compilation: Exploiting Synergies Across the CS Community
06mLightning Talk: Keeping Up to LLVM IR: An Introduction to LLVM IR
22mDestabilizing Iris
20mCacheIR: The Benefits of a Structured Representation for Inline Caches
26mArchSem: Reusable Rigorous Semantics of Relaxed Architectures
