Author: bd1976bris Date: 2024-10-04T14:59:41+01:00 New Revision: d2051919bb42087ebde2a8bdcd5b2676ad16d8eb
URL: https://github.com/llvm/llvm-project/commit/d2051919bb42087ebde2a8bdcd5b2676ad16d8eb DIFF: https://github.com/llvm/llvm-project/commit/d2051919bb42087ebde2a8bdcd5b2676ad16d8eb.diff LOG: [MSVC] work-around for compile time issue 102513 (#110986) Disable optimizations when building clang/lib/AST/ByteCode/Interp.cpp with Microsoft's compiler as it has a bug that causes excessive build times. We do this only when NDEBUG is not defined on the assumption that building without asserts indicates that a user is strongly invested in runtime performance. Partially addresses: https://github.com/llvm/llvm-project/issues/102513. Once the bug is addressed in the Microsoft compiler this can be removed. Co-authored-by: dyung Added: Modified: clang/lib/AST/ByteCode/Interp.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp index fd9a256843a0ec..b3ba81f04ff1ff 100644 --- a/clang/lib/AST/ByteCode/Interp.cpp +++ b/clang/lib/AST/ByteCode/Interp.cpp @@ -1406,6 +1406,10 @@ bool handleFixedPointOverflow(InterpState &S, CodePtr OpPC, return S.noteUndefinedBehavior(); } +// https://github.com/llvm/llvm-project/issues/102513 +#if defined(_WIN32) && !defined(__clang__) && !defined(NDEBUG) +#pragma optimize("", off) +#endif bool Interpret(InterpState &S, APValue &Result) { // The current stack frame when we started Interpret(). // This is being used by the ops to determine wheter @@ -1430,6 +1434,10 @@ bool Interpret(InterpState &S, APValue &Result) { } } } +// https://github.com/llvm/llvm-project/issues/102513 +#if defined(_WIN32) && !defined(__clang__) && !defined(NDEBUG) +#pragma optimize("", on) +#endif } // namespace interp } // namespace clang _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits