Loading…
CppCon 2018 has ended
Back To Schedule
Thursday, September 27 • 15:50 - 16:20
Dealing with aliasing using contracts

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

Telling the compiler when aliasing can or cannot happen is an important problem to solve. Lots of the crucial compiler optimizations such as load and store elimination, and less crucial such as vectorization rely on alias analysis. I will showcase some examples where alias analysis is playing an important role to get decent performance. Unfortunately, there is no standard way in C++ to give hints to the compiler about aliasing. There is the C restrict keyword which is supported by some compilers but it has its own shortcomings. In this talk, I will show some of the past approaches to move restrict keyword to C++ and propose a new solution which is based on contracts. I will also show some basic tricks how to use type based alias analysis and value types to help the compiler reason about aliasing until the related new features being accepted into the language.

Speakers
avatar for Gábor Horváth

Gábor Horváth

Software Engineer, Microsoft
Gabor started a Ph.D. in 2016. He is a contributor to research projects related to static analysis since 2012. He is a clang contributor, participated in Google Summer of Code twice as a student and many times as a mentor, interned for Apple, Microsoft and Google. He taught C++ and... Read More →


Thursday September 27, 2018 15:50 - 16:20 PDT
Copper Mountain Theater (2nd Floor)
  • Optimization and Undefined Behavior
  • Level Intermediate, Advanced, Expert
  • Tags C++20