Workshop: LLVM-HPC2026: The Twelfth Workshop on the LLVM Compiler Infrastructure in HPC
Authors: Juan Salamanca (UNICAMP), Eduard Ayguadé (Barcelona Supercomputing Center), Alexandro Baldassin (Unesp), and Islene C. Garcia (UNICAMP)
Abstract: Hardware Transactional Memory (HTM) has long been proposed as an alternative to lock-based synchronization, yet no production-quality compiler support for HTM exists in OpenMP. Several OpenMP extensions have been proposed to expose HTM to programmers, but setbacks in commercial hardware — most notably the security-related disabling of Intel TSX — led much of the community to abandon the effort. In this paper, we show that HTM support can be implemented with modest engineering effort in Clang/LLVM, a widely used production compiler. We adopt a previously proposed OpenMP transaction construct with a single max_retries clause and semantics mirroring the existing critical construct. We detail non-trivial challenges encountered during its implementation in LLVM 23, including two previously unreported correctness pitfalls: one in the transactional fallback mechanism and another in statement emission along transaction control-flow paths. Evaluation on an Intel Xeon shows that OpenHTM outperforms the standard critical construct by up to 1.97×.
Back to LLVM-HPC2026: The Twelfth Workshop on the LLVM Compiler Infrastructure in HPC Archive Listing
Back to Full Workshop Archive Listing