C++Now 2018 has ended
Back To Schedule
Friday, May 11 • 9:00am - 10:30am
Closing Keynote: Undefined Behavior and Compiler Optimizations

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
This talk is about the inner lives of compiler optimizations. First, I'll explain how undefined behavior (UB) is alive and well in compiler intermediate representations, where it can be exploited to give the optimizer the freedom to perform desirable transformations. Perhaps surprisingly, UB at this level doesn't have that much to do with UB in the original source code.

Second -- and closely related -- I'll talk about sequential memory models. C++ occupies a tricky design point: on one hand, it wants to be able to assume that a pointer originating in one block of memory cannot be used to refer to another block, but on the other hand any pointer can be turned into an integer, manipulated arbitrarily, and then turned back into a pointer. These conflicting demands have interesting implications for a compiler's optimization rules and some of the implications are still being figured out.

Finally, I'll speculate about the future of compiler optimizations: many optimizations will be formally verified and some will also be generated automatically. The result will be compilers that are less buggy and more effective at optimizing.

avatar for John Regehr

John Regehr

Professor, University of Utah
John Regehr is a professor of computer science at the University of Utah, USA. His research group creates tools for making software more efficient and correct. For example, one of his projects, Csmith, generates random C programs that have been used to find more than 500 previously unknown bugs in production-quality C compilers. Outside of work John likes to explore the mountains and deserts of Utah with his family... Read More →

Friday May 11, 2018 9:00am - 10:30am MDT
Paepcke Auditorium