Fence placement for legacy Data-Race-Free programs via synchronization read detection

Andrew J McPherson, Vijay Nagarajan, Susmit Sarkar, Marcelo Cintra

Research output: Contribution to journalArticlepeer-review

1 Citation (Scopus)


Shared-memory programmers traditionally assumed Sequential Consistency (SC), but modern systems have relaxed memory consistency. Here, the trend in languages is towards Data-Race-Free (DRF) models, where, assuming annotated synchronizations and the program being well-synchronized by those synchronizations, the hardware and compiler guarantee SC. However, legacy programs lack annotations, so even well-synchronized (legacy DRF) programs aren’t recognized. For legacy DRF programs, we can significantly prune the set of memory orderings determined by automated fence placement, by automatically identifying synchronization reads. We prove our rules for identifying them conservative, implement them within LLVM, and observe a 30% average performance improvement over previous techniques.
Original languageEnglish
Article number46
Number of pages23
JournalACM Transactions on Architecture and Code Optimization (TACO)
Issue number4
Publication statusPublished - 7 Jan 2016


  • Fence placement
  • Relaxed memory models


Dive into the research topics of 'Fence placement for legacy Data-Race-Free programs via synchronization read detection'. Together they form a unique fingerprint.

Cite this