A study of source-level compiler algorithms for automatic construction of pre-execution code
Authors:
Open Access
- 1 August 2004
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Computer Systems
- Vol. 22 (3) , 326-379
Abstract
Pre-execution is a promising latency tolerance technique that uses one or more helper threads running in spare hardware contexts ahead of the main computation to trigger long-latency memory operations early, hence absorbing their latency on behalf of the main computation. This article investigates several source-to-source C compilers for extracting pre-execution thread code automatically, thus relieving the programmer or hardware from this onerous task. We present an aggressive profile-driven compiler that employs three powerful algorithms for code extraction. First, program slicing removes non-critical code for computing cache-missing memory references. Second, prefetch conversion replaces blocking memory references with non-blocking prefetch instructions to minimize pre-execution thread stalls. Finally, speculative loop parallelization generates thread-level parallelism to tolerate the latency of blocking loads. In addition, we present four "reduced" compilers that employ less aggressive algorithms to simplify compiler implementation. Our reduced compilers rely on back-end code optimizations rather than program slicing to remove non-critical code, and use compile-time heuristics rather than profiling to approximate runtime information (e.g., cache-miss and loop-trip counts).We prototype our algorithms on the Stanford University Intermediate Format (SUIF) framework and a publicly available program slicer, called Unravel [Lyle and Wallace 1997]. Using our prototype, we undertake a performance evaluation of our compilers on a detailed architectural simulator of an 8-way out-of-order SMT processor with 4 hardware contexts, and 13 applications selected from the SPEC and Olden benchmark suites. Our most aggressive compiler improves the performance of 10 out of 13 applications, reducing execution time by 20.9%. Across all 13 applications, our aggressive compiler achieves a harmonic average speedup of 17.6%. For our reduced compilers, eliminating program slicing and relying on back-end optimizations degrades performance minimally, suggesting that effective pre-execution compilers can be built without program slicing. Furthermore, without cache-miss profiles, we still achieve good speedup, 15.5%, but without loop-trip count profiles, we achieve a speedup of only 7.7%. Finally, our results show compiler-based pre-execution can benefit multiprogrammed workloads. Simultaneously executing applications achieve higher throughput with pre-execution compared to no pre-execution. Due to contention for hardware contexts, however, time-slicing outperforms simultaneous execution in some cases where individual applications make heavy use of pre-execution threads.Keywords
This publication has 35 references indexed in Scilit:
- A Study of a Simultaneous Multithreaded Processor Implementation1999
- Tolerating latency in multiprocessors through compiler-inserted prefetchingACM Transactions on Computer Systems, 1998
- Continuous profiling1997
- The SimpleScalar tool set, version 2.0ACM SIGARCH Computer Architecture News, 1997
- Program Slicing1996
- Effective hardware-based data prefetching for high-performance processorsIEEE Transactions on Computers, 1995
- Supporting dynamic data structures on distributed-memory machinesACM Transactions on Programming Languages and Systems, 1995
- The program dependence graph and its use in optimizationACM Transactions on Programming Languages and Systems, 1987
- Advanced compiler optimizations for supercomputersCommunications of the ACM, 1986
- High-Speed Multiprocessors and Compilation TechniquesIEEE Transactions on Computers, 1980