In Visual Studio 2019 version 16.10 Preview 2 we have continued to improve the C++ backend with new features, new and improved optimizations, build throughput improvements, and better security. Here is a brief list of improvements for you to review.
- Address Sanitizer
-
- Fixed false negative bugs, fixed false positive bugs, and improved debugger step-over fidelity of ASan-instrumented code.
- ARM64 support for /guard:ehcont
-
- The /guard:ehcont flag can be added to both compilation and linking of an executable to generate metadata that could be used by the OS to perform security checks at exception handling continuation points. Previously, this was only generated and supported for AMD64, but with 16.10 it is also possible to compile ARM64 executables with this metadata.
- Documentation for this switch: /guard:ehcont (Enable EH Continuation Metadata) | Microsoft Docs
- See Windows blog for Control-Flow Integrity (CFI) mitigations using ehcont: Developer Guidance for Hardware-enforced Stack Protection – Microsoft Tech Community
- OpenMP
-
- Made /openmp:llvm available on x86 and ARM64
- Bigger stack reserve for link.exe and mspdbsrv.exe
-
- Increased stack reserve for link.exe and mspdbsrv.exe (x86 and amd64 hosted only) from the default 1MB to 4MB, to accommodate recursive type merging at link time.
- Feedback: Unhandled Exception During Linking IN link.exe – Visual Studio Feedback
- Added flags to enable/disable the SSA peeps for amd64 and x86
-
- Added retail flags (-post-color-ssa-peeps, post-color-ssa-peeps-) to allow users to disable post-color ssa peeps and -pre-color-ssa-peeps and -pre-color-ssa-peeps- to enable them. This should allow users affected by an overly aggressive peep to work around their issue without having to completely disable the optimizer.
- Avoid PDB size overgrowth from incremental linking
- Debug mode performance improvements
-
- Removed unnecessary overhead due to runtime checks. This may increase performance of your code compiled in debug mode by up to 3x.
- Added additional peephole optimizations for ARM64
- Enabled volatile metadata by default when targeting x64 to improve emulation performance
Do you want to experience the new improvements of the C++ backend? Please download the latest Visual Studio 2019 and give it a try! Any feedback is welcome. We can be reached via the comments below, Developer Community, email (visualcpp@microsoft.com), and Twitter (@VisualC).
Excellent!!