================
@@ -30,6 +30,15 @@ set(LLVM_LINK_COMPONENTS
   TransformUtils
   )
 
+# Workaround for MSVC ARM64 performance regression: disable all optimizations 
(/Od)
+# and then enable back all /O2 options except one.
+if(NOT CMAKE_BUILD_TYPE MATCHES Debug 
+    AND MSVC 
+    AND MSVC_VERSION VERSION_GREATER_EQUAL 1932
+    AND CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64")
+  set_source_files_properties(CGBuiltin.cpp PROPERTIES COMPILE_FLAGS "/Od /Gw 
/Oi /Oy /Gy /Ob2 /Ot /GF")
----------------
tru wrote:

You are setting these settings for all configurations and erasing the other 
flags set for these files. I don't think that's the right solution. I would 
rather you grab the current compile_flags and then substitute the optimization 
flags only.

https://github.com/llvm/llvm-project/pull/65215
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to