Compiler triggered C Level error check


The KIPS Transactions:PartA, Vol. 18, No. 3, pp. 109-114, Jun. 2011
10.3745/KIPSTA.2011.18.3.109,   PDF Download:

Abstract

We describe a technique for automatically proving compiler optimizations sound, meaning that their transformations are always semantics-preserving. As is well known, IR (Intermediate Representation) optimization is an important step in a compiler backend. But unfortunately, it is difficult to detect and debug the IR optimization errors for compiler developers. So, we introduce a C level error check system for detecting the correctness of these IR transformation techniques. In our system, we first create an IR-to-C converter to translate IR to C code before and after each compiler optimization phase, respectively, since our technique is based on the Memory Comparison-based Clone(MeCC) detector which is a tool of detecting semantic equivalency in C level. MeCC accepts only C codes as its input and it uses a path-sensitive semantic-based static analyzer to estimate the memory states at exit point of each procedure, and compares memory states to determine whether the procedures are equal or not. But MeCC cannot guarantee two semantic-equivalency codes always have 100% similarity or two codes with different semantics does not get the result of 100% similarity. To increase the reliability of the results, we describe a technique which comprises how to generate C codes in IR-to-C transformation phase and how to send the optimization information to MeCC to avoid the occurrence of these unexpected problems. Our methodology is illustrated by three familiar optimizations, dead code elimination, instruction scheduling and common sub-expression elimination and our experimental results show that the C level error check system is highly reliable.


Statistics
Show / Hide Statistics

Statistics (Cumulative Counts from September 1st, 2017)
Multiple requests among the same browser session are counted as one view.
If you mouse over a chart, the values of data points will be shown.


Cite this article
[IEEE Style]
Z. W. Zheng, J. H. M. Youn, J. W. Lee, Y. H. Paek, "Compiler triggered C Level error check," The KIPS Transactions:PartA, vol. 18, no. 3, pp. 109-114, 2011. DOI: 10.3745/KIPSTA.2011.18.3.109.

[ACM Style]
Zhi Wen Zheng, Jong Hee M. Youn, Jong Won Lee, and Yun Heung Paek. 2011. Compiler triggered C Level error check. The KIPS Transactions:PartA, 18, 3, (2011), 109-114. DOI: 10.3745/KIPSTA.2011.18.3.109.