Common compiler optimisations are invalid in the C11 memory model and what we can do about it - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Communication Dans Un Congrès Année : 2015

Common compiler optimisations are invalid in the C11 memory model and what we can do about it

Résumé

We show that the weak memory model introduced by the 2011 C and C++ standards does not permit many common source-to-source program transformations (such as expression linearisation and “roach motel” reorderings) that modern compilers perform and that are deemed to be correct. As such it cannot be used to define the semantics of intermediate languages of compilers, as, for instance, LLVM aimed to. We consider a number of possible local fixes, some strengthening and some weakening the model. We evaluate the proposed fixes by determining which program transformations are valid with respect to each of the patched models. We provide formal Coq proofs of their correctness or counterexamples as appropriate.
Fichier non déposé

Dates et versions

hal-01089047 , version 1 (01-12-2014)

Identifiants

  • HAL Id : hal-01089047 , version 1

Citer

Viktor Vafeiadis, Thibaut Balabonski, Soham Chakraborty, Robin Morisset, Francesco Zappa Nardelli. Common compiler optimisations are invalid in the C11 memory model and what we can do about it. POPL 2015 - 42nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Jan 2015, Mumbai, India. ⟨hal-01089047⟩
190 Consultations
0 Téléchargements

Partager

Gmail Facebook X LinkedIn More