Compiler-Guided Identification of Critical Sections in Parallel Code

Conference contribution
(Original article)

Publication Details

Author(s): Kempf S, Veldema R, Philippsen M
Editor(s): Ranjit Jhala, Koen De Bosschere
Title edited volumes: Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Publisher: Springer-verlag
Publishing place: Berlin Heidelberg
Publication year: 2013
Conference Proceedings Title: Compiler Construction, 22nd International Conference, CC 2013
Pages range: 204-223
ISBN: 978-3-642-37050-2
ISSN: 0302-9743
Language: English


There is a huge body of sequential legacy code that needs to be refactored for multicore processors. Especially for control code for embedded systems it is often easy to split the program into multiple threads. But it is difficult to identify critical sections to avoid data races as the legacy code hides its synchronization in a static schedule, priorities and interrupts. To ease refactoring, this paper presents a new static data-dependence analysis that identifies necessary critical sections in thread-parallel code that does not yet contain any synchronization between threads. A novel optimization pass then breaks up and shrinks the identified critical sections to maximize parallelism while preserving correctness. Our technique proved to be successful in refactoring sequential assembly-like legacy codes in an industry-sponsored project. But as refactoring projects are hard to evaluate quantitatively and as the domain specific low-level language is of limited interest, we use a standard benchmark suite for which the optimum, i.e., the minimal set of the necessary atomic block annotations is known. We removed the annotations and let the compiler attempt to rediscover them. For 5 out of 7 benchmarks, our compiler identified the same critical sections as the original programmers did by hand. For the other two benchmarks, the compiler found slightly larger (but also correct) critical sections. In all cases, the versions of the benchmarks that the compiler annotated achieved the original run-time performance. © 2013 Springer-Verlag.

FAU Authors / FAU Editors

Kempf, Stefan
Lehrstuhl für Informatik 2 (Programmiersysteme)
Philippsen, Michael Prof. Dr.
Lehrstuhl für Informatik 2 (Programmiersysteme)
Veldema, Ronald PD Dr.
Lehrstuhl für Informatik 2 (Programmiersysteme)

How to cite

Kempf, S., Veldema, R., & Philippsen, M. (2013). Compiler-Guided Identification of Critical Sections in Parallel Code. In Ranjit Jhala, Koen De Bosschere (Eds.), Compiler Construction, 22nd International Conference, CC 2013 (pp. 204-223). Rome, Italy, IT: Berlin Heidelberg: Springer-verlag.

Kempf, Stefan, Ronald Veldema, and Michael Philippsen. "Compiler-Guided Identification of Critical Sections in Parallel Code." Proceedings of the International Conference on Compiler Construction, Rome, Italy Ed. Ranjit Jhala, Koen De Bosschere, Berlin Heidelberg: Springer-verlag, 2013. 204-223.


Last updated on 2018-19-04 at 02:52