A simple graph-based intermediate representation

A simple graph-based intermediate representation
复制标题

一个简单的基于图的中间表示

DOI:
10.1145/202529.202534
复制
发表时间:
1995
期刊:
arXiv: Category Theory
影响因子:
--
通讯作者:
Michael H. Paleczny
Michael H. Paleczny
中科院分区:
--
文献类型:
--
作者:
C. Click;Michael H. Paleczny

文献摘要

被引文献

相似文献

我们提出了一个基于图的中间表示(IR)与简单的语义和低内存成本的C++实现。IR使用带有标记顶点和有序输入但无序输出的有向图。顶点用操作码标记,边缘未标记。我们用相同的顶点和边结构表示CFG和基本块。每个操作码都由一个C++类定义,该类封装了特定于操作码的数据和行为。我们使用继承来抽象常见的操作码行为,允许新的操作码可以很容易地从旧的定义。由此产生的IR简单、快速且易于使用。
We present a graph-based intermediate representation (IR) with simple semantics and a low-memory-cost C++ implementation. The IR uses a directed graph with labeled vertices and ordered inputs but unordered outputs. Vertices are labeled with opcodes, edges are unlabeled. We represent the CFG and basic blocks with the same vertex and edge structures. Each opcode is defined by a C++ class that encapsulates opcode-specific data and behavior. We use inheritance to abstract common opcode behavior, allowing new opcodes to be easily defined from old ones. The resulting IR is simple, fast and easy to use.