Visualizing Compiler Passes with SecondPass

semanticscholar(2020)

引用 0|浏览1
暂无评分
摘要
A compiler from a high-level language down to an assembly-like language traditionally involves a sequence of compiler passes, each of which performs a specific transformation on an input program to produce an output program for the next pass. In an undergraduate compilers course, the goal is to understand why these passes are necessary and how each pass is constructed. One difficulty in the learning process is that the compiler pass implementation itself may be too abstract to gain an intuitive understanding of its purpose, while merely reading the source and target programs does not reveal much about how the pieces of the programs were transformed. In this paper, we present SecondPass, a multi-pass compiler visualization for UBC’s upper-year compilers course (CPSC 411) that aims to elucidate the connections between source and target program substructures and to provide an intuitive understanding of the kind of structural transformations that compilers do. Given a particular source program, it presents intermediate and final programs – the results of multiple stages of compilation – side by side, with interactive flows between related components of source and target programs. We limit the scope of this project to only two particular fundamental compiler passes: A-normalization and instruction selection, described in detail in Section 2. Furthermore, as this is primarily a pedagogical tool, it focuses on effective visualization of relatively small input programs, as opposed to existing visualizations which focus on large source code files or optimizing compiler passes.
更多
查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要