Conference contribution
(Original article)

Compiler-Guided Identification of Critical Sections in Parallel Code

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

Event details
Event: International Conference on Compiler Construction
Event location: Rome, Italy
Start date of the event: 16/03/2013
End date of the event: 24/03/2013
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.

Focus Area of Individual Faculties

How to cite
APA: 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). Berlin Heidelberg: Springer-verlag.

MLA: 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.

BibTeX: Download
Share link
Last updated on 2017-02-27 at 01:46
PDF downloaded successfully