A cost-driven compilation framework for speculative parallelization of sequential programs

  • Authors:
  • Zhao-Hui Du;Chu-Cheow Lim;Xiao-Feng Li;Chen Yang;Qingyu Zhao;Tin-Fook Ngai

  • Affiliations:
  • Intel China Ltd., Beijing, China;Intel Corporation, Santa Clara, CA;Intel China Ltd., Beijing, China;Intel China Ltd., Beijing, China;Intel China Ltd., Beijing, China;Intel Corporation, Santa Clara, CA

  • Venue:
  • Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

The emerging hardware support for thread-level speculation opens new opportunities to parallelize sequential programs beyond the traditional limits. By speculating that many data dependences are unlikely during runtime, consecutive iterations of a sequential loop can be executed speculatively in parallel. Runtime parallelism is obtained when the speculation is correct. To take full advantage of this new execution model, a program needs to be programmed or compiled in such a way that it exhibits high degree of speculative thread-level parallelism. We propose a comprehensive cost-driven compilation framework to perform speculative parallelization. Based on a misspeculation cost model, the compiler aggressively transforms loops into optimal speculative parallel loops and selects only those loops whose speculative parallel execution is likely to improve program performance. The framework also supports and uses enabling techniques such as loop unrolling, software value prediction and dependence profiling to expose more speculative parallelism. The proposed framework was implemented on the ORC compiler. Our evaluation showed that the cost-driven speculative parallelization was effective. Our compiler was able to generate good speculative parallel loops in ten Spec2000Int benchmarks, which currently achieve an average 8% speedup. We anticipate an average 15.6% speedup when all enabling techniques are in place.