Speculative Optimizations for Parallel Programs on Multicores

被引:1
|
作者
Nagarajan, Vijay [1 ]
Gupta, Rajiv [1 ]
机构
[1] Univ Calif Riverside, CSE Dept, Riverside, CA 92521 USA
关键词
D O I
10.1007/978-3-642-13374-9_22
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
The advent of multicores presents a promising opportunity for exploiting fine grained parallelism present in programs. Programs parallelized in the above fashion, typically involve threads that communicate via shared memory, and synchronize with each other frequently to ensure that shared memory dependences between different threads are correctly enforced. Such frequent synchronization operations, although required, can greatly affect program performance. In addition to forcing threads to wait for other threads and do no useful work, they also force the compiler to make conservative assumptions in generating code. We analyzed a set of parallel programs with fine grained barrier synchronizations, and observed that the synchronizations used by these programs enforce interprocessor dependences which arise relatively infrequently. Motivated by this observation, our approach consists of creating two versions of the section of code between consecutive synchronization operations; one version is a highly optimized version created under the optimistic assumption that no interprocessor dependences that are enforced by the synchronization operation will actually arise. The other version is unoptimized code created under the pessimistic assumption that interprocessor dependences will arise. At runtime, we first speculatively execute the optimistic code and if misspeculation occurs, the results of this version will be discarded and the non-speculative version will be executed. Since interprocessor dependences arise infrequently, misspeculation rate remains low. To detect misspeculation efficiently, we modify existing architectural support for data speculation and adapt it for multicores. We utilize this scheme to perform two speculative optimizations to improve parallel program performance. First, by speculatively executing past barrier synchronizations, we reduce time spent idling on barriers, translating into a 12% increase in performance. Second, by promoting shared variables to registers in the presence of synchronization, we reduce a significant amount of redundant loads, translating into an additional performance increase of 2.5%.
引用
收藏
页码:323 / 337
页数:15
相关论文
共 50 条
  • [1] Compiler Optimizations for Parallel Programs
    Doerfert, Johannes
    Finkel, Hal
    LANGUAGES AND COMPILERS FOR PARALLEL COMPUTING (LCPC 2018), 2019, 11882 : 112 - 119
  • [2] Programming and Timing Analysis of Parallel Programs on Multicores
    Yip, Eugene
    Roop, Partha S.
    Biglari-Abhari, Morteza
    Girault, Alain
    2013 13TH INTERNATIONAL CONFERENCE ON APPLICATION OF CONCURRENCY TO SYSTEM DESIGN (ACSD 2013), 2013, : 160 - 169
  • [3] Specifying and Executing Optimizations for Parallel Programs
    Mansky, William
    Griffith, Dennis
    Gunter, Elsa L.
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2014, (159): : 58 - 70
  • [4] Polyhedral Optimizations of Explicitly Parallel Programs
    Chatarasi, Prasanth
    Shirako, Jun
    Sarkar, Vivek
    2015 INTERNATIONAL CONFERENCE ON PARALLEL ARCHITECTURE AND COMPILATION (PACT), 2015, : 213 - 226
  • [5] Communication optimizations for parallel C programs
    Zhu, YC
    Hendren, LJ
    JOURNAL OF PARALLEL AND DISTRIBUTED COMPUTING, 1999, 58 (02) : 301 - 332
  • [6] Communication Optimizations for Parallel C Programs
    J. Parallel Distrib. Comput., 2 (301-332):
  • [7] Communication optimizations for parallel C programs
    Zhu, YC
    Hendren, LJ
    ACM SIGPLAN NOTICES, 1998, 33 (05) : 199 - 211
  • [8] Speculative Parallelization of Sequential Loops on Multicores
    Chen Tian
    Min Feng
    Vijay Nagarajan
    Rajiv Gupta
    International Journal of Parallel Programming, 2009, 37 : 508 - 535
  • [9] Symbolic performance prediction of speculative parallel programs
    Gautama, H
    van Gemund, AJC
    EURO-PAR 2003 PARALLEL PROCESSING, PROCEEDINGS, 2003, 2790 : 88 - 97
  • [10] Speculative Parallelization of Sequential Loops on Multicores
    Tian, Chen
    Feng, Min
    Nagarajan, Vijay
    Gupta, Rajiv
    INTERNATIONAL JOURNAL OF PARALLEL PROGRAMMING, 2009, 37 (05) : 508 - 535