Preview

Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS)

Advanced search

Compile the Code Instrumentation Technique for Selective Debugging of Optimizing Transformations

https://doi.org/10.15514/ISPRAS-2015-27(6)-1

Abstract

The paper addresses the problem of an optimizing compiler debugging. A new method for compile-time instrumentation is presented as an efficient approach to improve reliability of optimizing transformations implemented in the compiler. The principal feature of the method is that it aims at debugging the transformations itself rather than debugging the tests, and therefore it allows correctness of the resulting code to be verified on any input data fed into the executed program, i.e. the proposed self-checking instrumentation is orthogonal to particular input data in that sense it is able to detect the bugs on arbitrary data flow the program exhibits during its invocation.

The method can be applied to a wide set of optimizing transormations. And the cases are known when it reveals faults in transformations while the non-instrumented test itself remains fully functional (and other somewhat similar but more limited instrumentations reveal no bugs, too). Among other its features are the compactness of the embedded dynamic checkers, the linearity of code bloat, and also no assumptions on any standard libraries availability is made (eg. no functions like exit(), abort() etc are used to terminate the program if any checker is triggered). It all ensures that the optimized code is influenced minimally so the original sequence of optimizing transormations implemented in the compiler remains applicable (if compared to non-instrumented code).

The described method has demonstrated successfully its usability for detecting and identifying volatile bugs in the optimizing compilers of the Elbrus microprocessor family when they were used for building software with asynchronous control flow. Moreover it allowed to increase the reliability of not only the compiler itself but also the software being compiled as well as it shown its use in complex testing of the microprocessor prototypes.

About the Author

D. A. Maksimenkov
PAO «MCST»,
Russian Federation
51 Leninsky, Moscow


References

1. Standart Perfomance Evaluation Corporation. The SPEC Benchmark Suites http://www.spec.org

2. Valgrind http://www.valgrind.org

3. AddressSanitizer (ASan) http://www.chromium.org/developers/testing/addresssanitizer

4. Maksimenkov D.A., Rogov R.Y. Primenenie metoda instrumentirovaniya testovyh program pri otladke optimiziruyushcih kompilyatorov [Application of instrumentation test program debugging optimizing compilers]. Voprosy radioelektroniki [Questions electronics], 2010, no. 3, pp. 50-61 (in Russian).

5. Standard for Binary Floating-Point Arithmetic IEEE-754. http://www.ieee.org

6. D.A. Lamb, Construction of a Peephole Optimizer. Software – Practice & Experience, 11/ 639-647 – 1981.

7. Michael Jind Pointer analysis: Haven't we solved this proplem yet http://www.cs.cornell.edu/courses/cs711/2005fa/papers/hind-paste01.pdf

8. Amer Divan, Kathryn S.McKinley, J.Eliot B.Moss. Type-Based Alias Analysis http://web.cs.ucla.edu/~palsberg/tba/papers/diwan-mckinley-moss-pldi98.pdf

9. Drozdov A.Y., Vladislavlev V.E. Mezhprocedurny analiz ukazatelej [Interprocedural analysis pointer]. Informacionnie tehnologii [Information technology], 2005. att No 2, pp 35-42 (in Russian).

10. Volkonsky V.Y. Optimiziruyuschie kompilyatory dly arhitektur s yavnim parallelizmom komand I apparatnoj podderzhkoj dvoichnoj sovmestimosti [Optimizing compilers for architectures with explicitly parallel instruction and hardware support for binary compatibility] Informacionnie tehnologii i vychislitelnie sistemy [Information technology and computer systems], 2004, no..3 (in Russian).

11. Galazin A.B., Stepanenkov A.M., Stupachenko E.V. Programmnaya predvaritelnaya podkachka koda dlya mikroprocessora Elbrus-3M [Spooling software code for the microprocessor Elbrus-3M]. Informacionnie tehnologii [Information technology], 2007, no. 11 (in Russian).


Review

For citations:


Maksimenkov D.A. Compile the Code Instrumentation Technique for Selective Debugging of Optimizing Transformations. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2015;27(6):7-20. (In Russ.) https://doi.org/10.15514/ISPRAS-2015-27(6)-1



Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.


ISSN 2079-8156 (Print)
ISSN 2220-6426 (Online)