Encouraging Compiler Optimization Practice for Undergraduate Students through Competition

Abstract

AI and other emerging applications demand domain-specific architectures which require compiler techniques such as back-end generation for different architectures and optimizations. However, traditional undergraduate compiler courses emphasize the front-end, while code generation and optimization are rarely involved. To motivate universities to have more industry-friendly compiler courses, we have designed a national compiler design competition for undergraduates to include compiler techniques beyond parsing. Moreover, we provided reliable, continuous cloud storage and an online evaluation platform for distributed competitors. In the 9-week Competition in 2020, each team (up to 4 students) was required to implement a compiler for a given SysY language and given target hardware (Raspberry Pi 4B). The performance was evaluated by executing code generated by the compiler on real hardware. Finally,21 of 72 teams successfully passed all functional test cases; 12 of 21 teams implemented optimizations showing significant speedup over gcc -O0; furthermore, compilers of the top 3 teams performed better than gcc -O2 on the given 10 performance test cases. Some advanced optimization techniques, such as multithreading and SIMD, were used by some teams. This paper summarizes the competition and further thoughts on compiler courses.

Publication
Proceedings of the 26th ACM Conference on Innovation and Technology in Computer Science Education V. 1
Wenguang Chen
Wenguang Chen
Professor
(教授)