-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Adjust MSVC version range for ARM64 build performance regression #90731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Alexander Smarus (lxbndr) ChangesThis is follow up for #65215 Mentioned regression was fixed in MSVC 19.39 (VS 17.9.0), so it makes sense to not apply fix for that (and newer) compiler versions. Same as original change, this patch is narrowly scoped to not affect any other compiler. Full diff: https://github.com/llvm/llvm-project/pull/90731.diff 2 Files Affected:
diff --git a/clang/lib/CodeGen/CMakeLists.txt b/clang/lib/CodeGen/CMakeLists.txt
index 52216d93a302bb..760fc540f7fa8e 100644
--- a/clang/lib/CodeGen/CMakeLists.txt
+++ b/clang/lib/CodeGen/CMakeLists.txt
@@ -39,6 +39,7 @@ set(LLVM_LINK_COMPONENTS
# our goal is to disable the /Og flag while retaining the other optimizations from the /O1|/O2 set
if(MSVC AND NOT CMAKE_CXX_COMPILER_ID MATCHES Clang
AND MSVC_VERSION VERSION_GREATER_EQUAL 1932
+ AND MSVC_VERSION VERSION_LESS 1939
AND CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64")
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
diff --git a/clang/lib/Tooling/Inclusions/Stdlib/CMakeLists.txt b/clang/lib/Tooling/Inclusions/Stdlib/CMakeLists.txt
index ed323ab3528b10..4d01a0850a074b 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/CMakeLists.txt
+++ b/clang/lib/Tooling/Inclusions/Stdlib/CMakeLists.txt
@@ -4,6 +4,7 @@
# our goal is to disable the /Og flag while retaining the other optimizations from the /O1|/O2 set
if(MSVC AND NOT CMAKE_CXX_COMPILER_ID MATCHES Clang
AND MSVC_VERSION VERSION_GREATER_EQUAL 1932
+ AND MSVC_VERSION VERSION_LESS 1939
AND CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64")
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Looks CI failed due to MSVC "fatal error C1060: compiler is out of heap space" inside a flang source file.
I would try syncing upto main since I know flang has had quite of changes that overall reduce MSVC's memory usage at least anecdotally from my personal PRs that failed in similar files around the time this PR was made.
ff8c635
to
52fe3d3
Compare
Rebased on latest main. Let's see what CI say. |
Looks like CI is happy. Do you need someone to commit the change on your behalf or do you have commit access? |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/121/builds/120 Here is the relevant piece of the build log for the reference:
|
…m#90731) This is follow up for llvm#65215 Mentioned regression was fixed in MSVC 19.39 (VS 17.9.0), so it makes sense to not apply fix for that (and newer) compiler versions. Same as original change, this patch is narrowly scoped to not affect any other compiler.
This is follow up for #65215
Mentioned regression was fixed in MSVC 19.39 (VS 17.9.0), so it makes sense to not apply fix for that (and newer) compiler versions.
Same as original change, this patch is narrowly scoped to not affect any other compiler.