{"id":25418,"date":"2020-01-28T15:00:08","date_gmt":"2020-01-28T15:00:08","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=25418"},"modified":"2024-09-10T07:56:09","modified_gmt":"2024-09-10T07:56:09","slug":"msvc-backend-updates-in-visual-studio-2019-versions-16-3-and-16-4","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/msvc-backend-updates-in-visual-studio-2019-versions-16-3-and-16-4\/","title":{"rendered":"MSVC Backend Updates in Visual Studio 2019 Versions 16.3 and 16.4"},"content":{"rendered":"<p>Versions 16.3 and 16.4 of Visual Studio 2019 brought many new improvements in code generation quality, build throughput, and security. If you still haven\u2019t downloaded your copy, here is a brief overview of what you\u2019ve been missing out on.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-25419\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/01\/word-image.gif\" alt=\"GIF of MSVC Build Insights\" width=\"881\" height=\"680\" \/><\/p>\n<p><em>Demonstration of C++ Build Insights, a new set of build analysis tools in Visual Studio 2019 version 16.4.<\/em><\/p>\n<h2><strong><span style=\"font-size: 18pt;\">Visual Studio 2019 version 16.3<\/span><\/strong><\/h2>\n<ul>\n<li>AVX-512 auto vectorizer support under the \/arch:AVX512 switch, enabling logical, arithmetic, memory, and reduction vector operations targeting the AVX-512 instruction set.<\/li>\n<li>Enhancements to the general inliner by estimating the values of both variables and memory. Enabled under \/Ob3.<\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/c-inliner-improvements-the-zipliner\/\">Improvements to inlining of small functions<\/a> for faster build times and smarter inlining.<\/li>\n<li>Partial ability to inline through indirect function calls<\/li>\n<li>Dataflow-driven alias package added to the SSA Optimizer, enabling more powerful SSA-based optimizations<\/li>\n<li>Improvements to the common sub-expression (CSE) optimization focused on eliminating more memory loads.<\/li>\n<li>Compile-time computation of spaceship operator comparisons on string literals.<\/li>\n<li>Automatic conversion of fma, fmal, fmaf, and std::fma to the intrinsic FMA implementation, when supported.<\/li>\n<li>Optimized code generation when returning register-sized structs by using bit manipulations on registers instead of memory operations.<\/li>\n<li>__iso_volatile_load<em>xx<\/em> and\u00a0__iso_volatile_store<em>xx<\/em> functions, which allow direct atomic read and write of aligned integer values.<\/li>\n<li>Intrinsic versions of most AVX-512 functions that were previously implemented as macros.<\/li>\n<li>Improvements to instruction selection for\u00a0mm_shuffle and _mm_setps intrinsics under \/arch:AVX2.<\/li>\n<li>Enabling of <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/making-cpp-exception-handling-smaller-x64\/\">FrameHandler4 (FH4)<\/a> by default for the AMD64 platform.<\/li>\n<\/ul>\n<h2><strong><span style=\"font-size: 18pt;\">Visual Studio 2019 version 16.4<\/span><\/strong><\/h2>\n<ul>\n<li>Support for <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/addresssanitizer-asan-for-windows-with-msvc\/\">AddressSanitizer (ASAN)<\/a>, allowing the detection of memory safety issues at runtime.<\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/introducing-c-build-insights\/\">C++ Build Insights<\/a>, a new collection of tools for understanding and improving build times.<\/li>\n<li>Significant improvements to code generation time by using up to 24 threads instead of 4, depending on available CPU cores.<\/li>\n<li>Further improvements to code generation time through better algorithms and data structures used by the compiler.<\/li>\n<li>Introduction of a new \/d2ReducedOptimizeHugeFunctions compiler option to improve the code generation time by omitting expensive optimizations for functions with more than 20,000 instructions. This threshold can be customized by using the \/d2ReducedOptimizeThreshold:# switch.<\/li>\n<li>Improvements to the AVX-512 auto vectorizer, supporting more instruction forms: variable width compares, int32 multiplication, int-to-fp floating point conversion. Available under \/arch:AVX512.<\/li>\n<li>Improved analysis of control flow to better determine when values are provably positive or negative.<\/li>\n<li>Enabling of the enhanced inliner introduced in 16.3 by default, without the use of \/Ob3.<\/li>\n<li>Intrinsic support for the ENQCMD and ENQCMDS instructions, which write commands to enqueue registers.<\/li>\n<li>Intrinsic support for the RDPKRU and WRPKRU instructions, which read and write the PKRU register available in some Intel processors.<\/li>\n<li>Intrinsic support for the VP2INTERSECTD and VP2INTERSECTQ instructions, which generate a pair of masks indicating which elements of one vector match elements of another vector.<\/li>\n<\/ul>\n<p>Do you want to benefit from all of these improvements? If so, download <a href=\"https:\/\/visualstudio.microsoft.com\/downloads\/\">the latest Visual Studio 2019<\/a> and tell us what you think! We can be reached via the comments below, via email at <a href=\"mailto:visualcpp@microsoft.com\">visualcpp@microsoft.com<\/a>, or via Twitter <a href=\"https:\/\/twitter.com\/visualc?lang=en\">(@VisualC<\/a>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Versions 16.3 and 16.4 of Visual Studio 2019 brought many new improvements in code generation quality, build throughput, and security. If you still haven\u2019t downloaded your copy, here is a brief overview of what you\u2019ve been missing out on. Demonstration of C++ Build Insights, a new set of build analysis tools in Visual Studio 2019 [&hellip;]<\/p>\n","protected":false},"author":6966,"featured_media":19546,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[270,3946,218],"tags":[],"class_list":["post-25418","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcement","category-backend","category-performance"],"acf":[],"blog_post_summary":"<p>Versions 16.3 and 16.4 of Visual Studio 2019 brought many new improvements in code generation quality, build throughput, and security. If you still haven\u2019t downloaded your copy, here is a brief overview of what you\u2019ve been missing out on. Demonstration of C++ Build Insights, a new set of build analysis tools in Visual Studio 2019 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/25418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/6966"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=25418"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/25418\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/19546"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=25418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=25418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=25418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}