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 条
  • [21] A Probabilistic pointer analysis for speculative optimizations
    Da Silva, Jeff
    Steffan, J. Gregory
    ACM SIGPLAN NOTICES, 2006, 41 (11) : 416 - 425
  • [22] Correctness of Speculative Optimizations with Dynamic Deoptimization
    Fluckiger, Olivier
    Scherer, Gabriel
    Yee, Ming-Ho
    Goel, Aviral
    Ahmed, Amal
    Vitek, Jan
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2 (POPL):
  • [23] Advanced communication optimizations for data-parallel programs -: (Poster paper)
    Agrawal, G
    HIGH-PERFORMANCE COMPUTING AND NETWORKING, PROCEEDINGS, 1999, 1593 : 1139 - 1142
  • [24] Structure-driven Optimizations for Amorphous Data-parallel Programs
    Mendez-Lojo, Mario
    Nguyen, Donald
    Prountzos, Dimitrios
    Sui, Xin
    Hassaan, M. Amber
    Kulkarni, Milind
    Burtscher, Martin
    Pingali, Keshav
    ACM SIGPLAN NOTICES, 2010, 45 (05) : 3 - 14
  • [25] Structure-driven Optimizations for Amorphous Data-parallel Programs
    Mendez-Lojo, Mario
    Nguyen, Donald
    Prountzos, Dimitrios
    Sui, Xin
    Hassaan, M. Amber
    Kulkarni, Milind
    Burtscher, Martin
    Pingali, Keshav
    PPOPP 2010: PROCEEDINGS OF THE 2010 ACM SIGPLAN SYMPOSIUM ON PRINCIPLES AND PRACTICE OF PARALLEL PROGRAMMING, 2010, : 3 - 14
  • [26] Runtime compositions and optimizations of parallel Java']JavaBean programs on clustering environments
    Chen, CW
    Chen, CK
    Lee, JK
    PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED PROCESSING TECHNIQUES AND APPLICATIONS, VOLS I-V, 2000, : 1919 - 1924
  • [27] Performance-Energy Optimizations for Shared Vector Accelerators in Multicores
    Beldianu, Spiridon F.
    Ziavras, Sotirios G.
    IEEE TRANSACTIONS ON COMPUTERS, 2015, 64 (03) : 805 - 817
  • [28] General compiler framework for speculative optimizations using data speculative code motion
    Dai, XR
    Zhai, A
    Hsu, WC
    Yew, PC
    CGO 2005: INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION, 2005, : 280 - 290
  • [29] Combining fusion optimizations and piecewise execution of nested data-parallel programs
    Pfannenstiel, W
    PARALLEL AND DISTRIBUTED PROCESSING, PROCEEDINGS, 2000, 1800 : 324 - 331
  • [30] Parallel Objects for Multicores: A Glimpse at the Parallel Language ENCORE
    Brandauer, Stephan
    Castegren, Elias
    Clarke, Dave
    Fernandez-Reyes, Kiko
    Johnsen, Einar Broch
    Pun, Ka I.
    Tarifa, S. Lizeth Tapia
    Wrigstad, Tobias
    Yang, Albert Mingkun
    FORMAL METHODS FOR MULTICORE PROGRAMMING, SFM 2015, 2015, 9104 : 1 - 56