Abstract:
Compiler is the fundamental tool for software development, and its dependability is undoubtedly significant. As an effective and efficient means to assure the quality of compilers, automatic testing has attracted much attention from academic world and industry. Optimizations are indispensable functions of modern compilers, and in recent years, the advanced optimizations which are based on data dependence analysis have become important development issues of modern compilers. To automatically test these optimizations, a method of test program generation is proposed, which can automatically generate test programs according to specified features of test program’s data dependence. The authors have designed LoSpec language for specifying test programs, realized automatic test program generation by adopting a special program model for easily representing data dependence—process graph, as the intermediate model, and developed an automated test tool, LoTester. Compared with other existing methods, this method is more effective for advanced optimizations and combined optimizations, and has a higher degree of automation. As an automatic test tool, LoTester can be used to conduct abundant testing in early development phases of optimizing compilers, which is favorable for finding bugs earlier. So far LoTester has been applied in the development of EECC, an optimizing compiler oriented at multimedia applications, and has yielded good results.