A simple graph-based intermediate representation
A simple graph-based intermediate representation
复制标题
一个简单的基于图的中间表示
DOI:
10.1145/202529.202534
复制
发表时间:
1995
期刊:
影响因子:
--
通讯作者:
Michael H. Paleczny
中科院分区:
文献类型:
--
作者:
C. Click;Michael H. Paleczny
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.