Mis-speculation-Driven Compiler Framework for Aggressive Loop Automatic Parallelization

Jin Lin,Xinmin Tian,John Ng
DOI: https://doi.org/10.1109/IPDPSW.2013.165
2013-01-01
Abstract:Large real world applications with irregular control-flow and/or data-flow pose challenges on the progressive improvement of state-of-the-art optimizing compilers. These irregular control-flow and data-flow are often not compile-time analyzable, and had inhibited important loop optimizations such as parallelization and vectorization. Conventional compiler techniques on parallelizing loops with such irregular control-flow and/or data-flow have mainly focused on eliminating the loop carried control-flow or data-flow dependencies. The issue to effectively enable both control and data speculation for different loop optimizations remains open. This paper proposes a new unified compiler framework which takes both control and data speculation into account to enable more aggressive loop optimizations including loop parallelization, loop vectorization, loop fusion and loop distribution through mis-speculation-driven loop splitting. Our main ideas are: i) unifying control and data speculation in the compiler framework to enable more loop optimizations; ii) performing lazy inspection code generation based on speculation guards to enable later compiler analyses and optimizations without requiring any change to accommodate the speculative information; iii) driving loop splitting using the unified mis-speculation information generated by the inspection code to enable more loops being parallelized. The proposed techniques and framework have been implemented in Intel's product compiler. Our experimental results show that the new techniques yield significant performance gains from 35% to 62% on some SPEC CPU2006 benchmarks.
What problem does this paper attempt to address?