Why Languages Should Preserve Load-Store Order
summary
Argues programming-language memory models should ban load-store reordering and preserve load-before-store so induction and pointer-alias reasoning remain sound, cites concrete miscompilations from GCC/Clang that produce unexpected values like +1 and -255, shows ARM64 code where a store is moved before a load, and cites a 2018 paper that inserts fake dependencies with benchmark results averaging a wash and one case 6.3% slower while most changes are negligible.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 1:18Oldest Answer
- 2:44Three Reasons
- 4:05Compilers
- 6:35Dependencies
- 10:29Performance
- 18:30Fake dependencies
related talks
01h 11mProgramming language memory models: Problems, solutions, and directions
30mA Tale of Shared Memory Concurrency in Programming Languages
46m“My Little Optimizer: Undefined Behavior is Magic"
24mTowards Understanding the Costs of Avoiding Out-of-Thin-Air Results
22mReconciling High-level Optimizations and Low-level Code in LLVM
58mGarbage In, Garbage Out: Arguing about Undefined Behavior...
57mWhy Programming Languages Matter
01h 30mThe Past, Present and Future of Programming Languages
