The optimization phase of a compiler is responsible for transforming an intermediate representation (IR) of a program into a more efficient form. Modern optimizers, such as that used in the GraalVM compiler, use an IR consisting of a sophisticated graph data structure that combines data flow and control flow into the one structure. As part of a wider project on the verification of optimization passes of GraalVM, this paper describes a semantics for its IR within Isabelle/HOL. The semantics consists of a big-step operational semantics for data nodes (which are represented in a graph-based static single assignment (SSA) form) and a small-step operational semantics for handling control flow including heap-based reads and writes, exceptions, and method calls. We have proved a suite of canonicalization optimizations and conditional elimination optimizations with respect to the semantics.
翻译:编译器的优化阶段是将程序的一个中间表示器(IR)转换成一个更有效率的形式。现代优化器,如GraalVM编译器中使用的优化器,使用由复杂的图表数据结构组成的IR,该结构将数据流和控制流合并到一个结构中。作为关于核查GraalVM优化通行证的更广泛项目的一部分,本文描述了伊莎贝尔/HOL内IR的语义。语义包括数据节点(以图形为基础的静态单项任务(SSA)形式)的大步操作语义和处理控制流的小型操作语义,包括基于厚的读数和写、例外和方法调用。我们已经证明在语义方面有一套精度优化和有条件消除优化。