A general compiler framework for speculative optimizations using data speculative code motion

Xiaoru Dai, Antonia Zhai, Wei Chung Hsu, Pen Chung Yew

Research output: Chapter in Book/Report/Conference proceedingConference contribution

17 Scopus citations

Abstract

Data speculative optimization refers to code transformations that allow load and store instructions to be moved across potentially dependent memory operations. Existing research work on data speculative optimizations has mainly focused on individual code transformation. The required speculative analysis that identifies data speculative optimization opportunities and the required recovery code generation that guarantees the correctness of their execution are handled separately for each optimization. This paper proposes a new compiler framework to facilitate the design and implementation of general data speculative optimizations such as dead store elimination, redundancy elimination, copy propagation, and code scheduling. This framework allows different data speculative optimizations to share the followings: (i) a speculative analysis mechanism to identify data speculative optimization opportunities by ignoring low probability data dependences from optimizations, and (ii) a recovery code generation mechanism to guarantee the correctness of the data speculative optimizations. The proposed recovery code generation is based on Data Speculative Code Motion (DSCM) that uses code motion to facilitate a desired transformation. Based on the position of the moved instruction, recovery code can be generated accordingly. The proposed framework greatly simplifies the task of incorporating data speculation into non-speculative optimizations by sharing the recovery code generation and the speculative analysis. We have implemented the proposed framework in the ORC 2.1 compiler and demonstrated its effectiveness on SPEC2000 benchmark programs.

Original languageEnglish (US)
Title of host publicationProceedings of the 2005 International Symposium on Code Generation and Optimization, CGO 2005
Pages280-290
Number of pages11
StatePublished - 2005

Publication series

NameProceedings of the 2005 International Symposium on Code Generation and Optimization, CGO 2005
Volume2005

Fingerprint

Dive into the research topics of 'A general compiler framework for speculative optimizations using data speculative code motion'. Together they form a unique fingerprint.

Cite this