A Goto-Elimination Method And Its Implementation For The McCat C Compiler (1995)
| Venue: | In Proc. of the 5th Intl. Work |
| Citations: | 2 - 0 self |
BibTeX
@INPROCEEDINGS{Erosa95agoto-elimination,
author = {Ana Maria Erosa},
title = {A Goto-Elimination Method And Its Implementation For The McCat C Compiler},
booktitle = {In Proc. of the 5th Intl. Work},
year = {1995}
}
OpenURL
Abstract
In designing optimizing and parallelizing compilers, it is often simpler and more efficient to deal with programs that have structured control flow. Although most programmers naturally program in a structured fashion, there remain many important programs and benchmarks that include some number of goto statements, thus rendering the entire program unstructured. Such unstructured programs cannot be handled with compilers built with analyses and transformations for structured programs. In this thesis we present a straight-forward algorithm to structure C programs by eliminating all goto statements. The method works directly on a high-level abstract syntax tree (AST) representation of the program and could easily be integrated into any compiler that uses an AST-based intermediate representation. The actual algorithm proceeds by eliminating each goto by first applying a sequence of gotomovement transformations followed by the appropriate goto-elimination transformation. Our McCAT (McGill ...







