[llvm-branch-commits] [llvm] e77317a - test-release.sh: Remove test-suite from LLVM_ENABLE_PROJECTS
Author: Diana Picus Date: 2022-02-10T09:31:38+01:00 New Revision: e77317a786b0c6d4489de0e6679128baf363498e URL: https://github.com/llvm/llvm-project/commit/e77317a786b0c6d4489de0e6679128baf363498e DIFF: https://github.com/llvm/llvm-project/commit/e77317a786b0c6d4489de0e6679128baf363498e.diff LOG: test-release.sh: Remove test-suite from LLVM_ENABLE_PROJECTS I think this was just being ignored before, but now it crashes because we're checking if the projects that we're trying to enable are valid. There is no test-suite project (it's a separate repo with separate handling), so we should never try to enable it. Differential Revision: https://reviews.llvm.org/D119322 Added: Modified: llvm/utils/release/test-release.sh Removed: diff --git a/llvm/utils/release/test-release.sh b/llvm/utils/release/test-release.sh index d6fb5a972e633..41c3f3af14221 100755 --- a/llvm/utils/release/test-release.sh +++ b/llvm/utils/release/test-release.sh @@ -249,11 +249,6 @@ if [ $do_libs = "yes" ]; then runtimes="$runtimes libunwind" fi fi -case $do_test_suite in - yes|export-only) -projects="$projects test-suite" -;; -esac if [ $do_openmp = "yes" ]; then projects="$projects openmp" fi ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] 2ead82c - [clang] [MinGW] Default to DWARF 4
Author: Martin Storsjö Date: 2022-02-10T11:24:46+02:00 New Revision: 2ead82c6f972c8372f761b40fcfd7f533b632db5 URL: https://github.com/llvm/llvm-project/commit/2ead82c6f972c8372f761b40fcfd7f533b632db5 DIFF: https://github.com/llvm/llvm-project/commit/2ead82c6f972c8372f761b40fcfd7f533b632db5.diff LOG: [clang] [MinGW] Default to DWARF 4 Neither LLDB nor GDB seem to work with DWARF 5 debug information on Windows right now. This applies the same change as in 9c6272861032f511a23784ce0c5cc8f6ac2f625b (Default to DWARFv4 on Windows) to the MinGW driver too. Differential Revision: https://reviews.llvm.org/D119326 (cherry picked from commit 6cf64b2d2858dc93c3ec93438bdaca2807847e9b) Added: Modified: clang/lib/Driver/ToolChains/MinGW.h clang/test/CodeGen/dwarf-version.c Removed: diff --git a/clang/lib/Driver/ToolChains/MinGW.h b/clang/lib/Driver/ToolChains/MinGW.h index c3de19b977246..c9553b4f46520 100644 --- a/clang/lib/Driver/ToolChains/MinGW.h +++ b/clang/lib/Driver/ToolChains/MinGW.h @@ -90,6 +90,8 @@ class LLVM_LIBRARY_VISIBILITY MinGW : public ToolChain { void printVerboseInfo(raw_ostream &OS) const override; + unsigned GetDefaultDwarfVersion() const override { return 4; } + protected: Tool *getTool(Action::ActionClass AC) const override; Tool *buildLinker() const override; diff --git a/clang/test/CodeGen/dwarf-version.c b/clang/test/CodeGen/dwarf-version.c index 47025e241d13c..0a6fa4768026d 100644 --- a/clang/test/CodeGen/dwarf-version.c +++ b/clang/test/CodeGen/dwarf-version.c @@ -32,6 +32,11 @@ // Explicitly request both. // RUN: %clang -target i686-pc-windows-msvc -gdwarf -gcodeview -S -emit-llvm -o - %s \ // RUN: | FileCheck %s --check-prefixes=VER4,CODEVIEW + +// Check what version of dwarf is used for MinGW targets. +// RUN: %clang -target i686-pc-windows-gnu -g -S -emit-llvm -o - %s | \ +// RUN: FileCheck %s --check-prefixes=VER4 + // RUN: %clang -target powerpc-ibm-aix-xcoff -g -S -emit-llvm -o - %s | \ // RUN: FileCheck %s --check-prefix=VER3 // RUN: %clang -target powerpc-ibm-aix-xcoff -gdwarf-2 -S -emit-llvm -o - %s | \ ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [libcxx] 97fdb3a - Update all LLVM documentation mentioning runtimes in LLVM_ENABLE_PROJECTS
Author: Louis Dionne Date: 2022-02-10T15:05:49-05:00 New Revision: 97fdb3a48aa849750378f01d4bcd0dc89c71b747 URL: https://github.com/llvm/llvm-project/commit/97fdb3a48aa849750378f01d4bcd0dc89c71b747 DIFF: https://github.com/llvm/llvm-project/commit/97fdb3a48aa849750378f01d4bcd0dc89c71b747.diff LOG: Update all LLVM documentation mentioning runtimes in LLVM_ENABLE_PROJECTS We are moving away from building the runtimes with LLVM_ENABLE_PROJECTS, however the documentation was largely outdated. This commit updates all the documentation I could find to use LLVM_ENABLE_RUNTIMES instead of LLVM_ENABLE_PROJECTS for building runtimes. Note that in the near future, libcxx, libcxxabi and libunwind will stop supporting being built with LLVM_ENABLE_PROJECTS altogether. I don't know what the plans are for other runtimes like libc, openmp and compiler-rt, so I didn't make any changes to the documentation that would imply something for those projects. Once this lands, I will also cherry-pick this on the release/14.x branch to make sure that LLVM's documentation is up-to-date and reflects what we intend to support in the future. Differential Revision: https://reviews.llvm.org/D119351 (cherry picked from commit 4ae83bb2b1e27628f6bd14d746aef964ed776d52) Added: Modified: README.md bolt/docs/OptimizingClang.md clang/docs/DataFlowSanitizer.rst clang/docs/Toolchain.rst compiler-rt/www/index.html flang/README.md libcxx/docs/BuildingLibcxx.rst libunwind/docs/BuildingLibunwind.rst llvm/docs/BuildingADistribution.rst llvm/docs/CMake.rst llvm/docs/GettingStarted.rst Removed: diff --git a/README.md b/README.md index 303721f8a4dac..f79f4fc2ae0b5 100644 --- a/README.md +++ b/README.md @@ -63,17 +63,25 @@ This is an example work-flow and configuration to get and build the LLVM source: Some common options: -* ``-DLLVM_ENABLE_PROJECTS='...'`` --- semicolon-separated list of the LLVM - sub-projects you'd like to additionally build. Can include any of: clang, - clang-tools-extra, compiler-rt,cross-project-tests, flang, libc, libclc, - libcxx, libcxxabi, libunwind, lld, lldb, mlir, openmp, polly, or pstl. +* ``-DLLVM_ENABLE_PROJECTS='...'`` and ``-DLLVM_ENABLE_RUNTIMES='...'`` --- + semicolon-separated list of the LLVM sub-projects and runtimes you'd like to + additionally build. ``LLVM_ENABLE_PROJECTS`` can include any of: clang, + clang-tools-extra, cross-project-tests, flang, libc, libclc, lld, lldb, + mlir, openmp, polly, or pstl. ``LLVM_ENABLE_RUNTIMES`` can include any of + libcxx, libcxxabi, libunwind, compiler-rt, libc or openmp. Some runtime + projects can be specified either in ``LLVM_ENABLE_PROJECTS`` or in + ``LLVM_ENABLE_RUNTIMES``. For example, to build LLVM, Clang, libcxx, and libcxxabi, use - ``-DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi"``. + ``-DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi"``. * ``-DCMAKE_INSTALL_PREFIX=directory`` --- Specify for *directory* the full path name of where you want the LLVM tools and libraries to be installed - (default ``/usr/local``). + (default ``/usr/local``). Be careful if you install runtime libraries: if + your system uses those provided by LLVM (like libc++ or libc++abi), you + must not overwrite your system's copy of those libraries, since that + could render your system unusable. In general, using something like + ``/usr`` is not advised, but ``/usr/local`` is fine. * ``-DCMAKE_BUILD_TYPE=type`` --- Valid options for *type* are Debug, Release, RelWithDebInfo, and MinSizeRel. Default is Debug. diff --git a/bolt/docs/OptimizingClang.md b/bolt/docs/OptimizingClang.md index 5d727d9417819..e66201b31d6d4 100644 --- a/bolt/docs/OptimizingClang.md +++ b/bolt/docs/OptimizingClang.md @@ -41,7 +41,7 @@ Collecting accurate profile requires running `perf` on a hardware that implements taken branch sampling (`-b/-j` flag). For that reason, it may not be possible to collect the accurate profile in a virtualized environment, e.g. in the cloud. We do support regular sampling profiles, but the performance -improvements are expected to be more modest. +improvements are expected to be more modest. ```bash $ mkdir ${TOPLEV}/stage3 @@ -211,7 +211,8 @@ $ cd ${TOPLEV}/stage1 $ cmake -G Ninja ${TOPLEV}/llvm-project/llvm -DLLVM_TARGETS_TO_BUILD=X86 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_ASM_COMPILER=gcc \ - -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt" \ + -DLLVM_ENABLE_PROJECTS="clang;lld" \ + -DLLVM_ENABLE_RUNTIMES="compiler-rt" \ -DCOMPILER_RT_BUILD_SANITIZERS=OFF -DCOMPILER
[llvm-branch-commits] [libcxx] 5410d0a - [libcxx] Silence -Wformat-nonliteral warnings in the Windows support code
Author: Martin Storsjö Date: 2022-02-10T22:47:19+02:00 New Revision: 5410d0ac67ad0d64b973eab0f5bc106d75639790 URL: https://github.com/llvm/llvm-project/commit/5410d0ac67ad0d64b973eab0f5bc106d75639790 DIFF: https://github.com/llvm/llvm-project/commit/5410d0ac67ad0d64b973eab0f5bc106d75639790.diff LOG: [libcxx] Silence -Wformat-nonliteral warnings in the Windows support code This brings the mingw build back to zero build warnings as it was at some earlier time. Differential Revision: https://reviews.llvm.org/D119134 (cherry picked from commit 8cffea061afc556332a86fbf80ef5613db994974) Added: Modified: libcxx/src/support/win32/locale_win32.cpp libcxx/src/support/win32/support.cpp Removed: diff --git a/libcxx/src/support/win32/locale_win32.cpp b/libcxx/src/support/win32/locale_win32.cpp index f10916875d42f..43e5c9a57227f 100644 --- a/libcxx/src/support/win32/locale_win32.cpp +++ b/libcxx/src/support/win32/locale_win32.cpp @@ -97,7 +97,10 @@ int snprintf_l(char *ret, size_t n, locale_t loc, const char *format, ...) ret, n, format, loc, ap); #else __libcpp_locale_guard __current(loc); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wformat-nonliteral" int result = vsnprintf( ret, n, format, ap ); +#pragma clang diagnostic pop #endif va_end(ap); return result; diff --git a/libcxx/src/support/win32/support.cpp b/libcxx/src/support/win32/support.cpp index 115d975bbf9a6..6d4b371f3dc20 100644 --- a/libcxx/src/support/win32/support.cpp +++ b/libcxx/src/support/win32/support.cpp @@ -23,7 +23,10 @@ int __libcpp_vasprintf( char **sptr, const char *__restrict format, va_list ap ) // Query the count required. va_list ap_copy; va_copy(ap_copy, ap); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wformat-nonliteral" int count = vsnprintf( NULL, 0, format, ap_copy ); +#pragma clang diagnostic pop va_end(ap_copy); if (count < 0) return count; @@ -33,7 +36,10 @@ int __libcpp_vasprintf( char **sptr, const char *__restrict format, va_list ap ) return -1; // If we haven't used exactly what was required, something is wrong. // Maybe bug in vsnprintf. Report the error and return. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wformat-nonliteral" if (vsnprintf(p, buffer_size, format, ap) != count) { +#pragma clang diagnostic pop free(p); return -1; } ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] 71e4987 - Revert "[SLP]Alternate vectorization for cmp instructions."
Author: Benjamin Kramer Date: 2022-02-11T00:51:05+03:00 New Revision: 71e4987ae6643255474917cc4d95c2d42b4b165c URL: https://github.com/llvm/llvm-project/commit/71e4987ae6643255474917cc4d95c2d42b4b165c DIFF: https://github.com/llvm/llvm-project/commit/71e4987ae6643255474917cc4d95c2d42b4b165c.diff LOG: Revert "[SLP]Alternate vectorization for cmp instructions." This reverts commit 83620bd2ad867f706c699d0f2b8be10e43d9f3d7. It's causing miscompilations, see review comments at https://reviews.llvm.org/D115955 (cherry picked from commit 0c3d22a5926dd7d6fd28682683abd9d476f8e78b) Added: Modified: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp llvm/test/Transforms/PhaseOrdering/X86/vector-reductions-logical.ll llvm/test/Transforms/SLPVectorizer/X86/cmp_commute-inseltpoison.ll llvm/test/Transforms/SLPVectorizer/X86/cmp_commute.ll llvm/test/Transforms/SLPVectorizer/X86/reduction-logical.ll Removed: diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 15b349f53fd9..25bf69729c70 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -471,36 +471,17 @@ static bool isValidForAlternation(unsigned Opcode) { return true; } -static InstructionsState getSameOpcode(ArrayRef VL, - unsigned BaseIndex = 0); - -/// Checks if the provided operands of 2 cmp instructions are compatible, i.e. -/// compatible instructions or constants, or just some other regular values. -static bool areCompatibleCmpOps(Value *BaseOp0, Value *BaseOp1, Value *Op0, -Value *Op1) { - return (isConstant(BaseOp0) && isConstant(Op0)) || - (isConstant(BaseOp1) && isConstant(Op1)) || - (!isa(BaseOp0) && !isa(Op0) && - !isa(BaseOp1) && !isa(Op1)) || - getSameOpcode({BaseOp0, Op0}).getOpcode() || - getSameOpcode({BaseOp1, Op1}).getOpcode(); -} - /// \returns analysis of the Instructions in \p VL described in /// InstructionsState, the Opcode that we suppose the whole list /// could be vectorized even if its structure is diverse. static InstructionsState getSameOpcode(ArrayRef VL, - unsigned BaseIndex) { + unsigned BaseIndex = 0) { // Make sure these are all Instructions. if (llvm::any_of(VL, [](Value *V) { return !isa(V); })) return InstructionsState(VL[BaseIndex], nullptr, nullptr); bool IsCastOp = isa(VL[BaseIndex]); bool IsBinOp = isa(VL[BaseIndex]); - bool IsCmpOp = isa(VL[BaseIndex]); - CmpInst::Predicate BasePred = - IsCmpOp ? cast(VL[BaseIndex])->getPredicate() - : CmpInst::BAD_ICMP_PREDICATE; unsigned Opcode = cast(VL[BaseIndex])->getOpcode(); unsigned AltOpcode = Opcode; unsigned AltIndex = BaseIndex; @@ -533,57 +514,6 @@ static InstructionsState getSameOpcode(ArrayRef VL, continue; } } -} else if (IsCmpOp && isa(VL[Cnt])) { - auto *BaseInst = cast(VL[BaseIndex]); - auto *Inst = cast(VL[Cnt]); - Type *Ty0 = BaseInst->getOperand(0)->getType(); - Type *Ty1 = Inst->getOperand(0)->getType(); - if (Ty0 == Ty1) { -Value *BaseOp0 = BaseInst->getOperand(0); -Value *BaseOp1 = BaseInst->getOperand(1); -Value *Op0 = Inst->getOperand(0); -Value *Op1 = Inst->getOperand(1); -CmpInst::Predicate CurrentPred = -cast(VL[Cnt])->getPredicate(); -CmpInst::Predicate SwappedCurrentPred = -CmpInst::getSwappedPredicate(CurrentPred); -// Check for compatible operands. If the corresponding operands are not -// compatible - need to perform alternate vectorization. -if (InstOpcode == Opcode) { - if (BasePred == CurrentPred && - areCompatibleCmpOps(BaseOp0, BaseOp1, Op0, Op1)) -continue; - if (BasePred == SwappedCurrentPred && - areCompatibleCmpOps(BaseOp0, BaseOp1, Op1, Op0)) -continue; - if (E == 2 && - (BasePred == CurrentPred || BasePred == SwappedCurrentPred)) -continue; - auto *AltInst = cast(VL[AltIndex]); - CmpInst::Predicate AltPred = AltInst->getPredicate(); - Value *AltOp0 = AltInst->getOperand(0); - Value *AltOp1 = AltInst->getOperand(1); - // Check if operands are compatible with alternate operands. - if (AltPred == CurrentPred && - areCompatibleCmpOps(AltOp0, AltOp1, Op0, Op1)) -continue; - if (AltPred == SwappedCurrentPred && - areCompatibleCmpOps(AltOp0, AltOp1, Op1, Op0)) -continue; -} -if (BaseIndex == AltIndex) { - assert(isValidForAlternation(Opcode) && - isValidForAlter
[llvm-branch-commits] [compiler-rt] 1772de7 - [compiler-rt] Fix endianness in get_sock_peer_name test
Author: Michał Górny Date: 2022-02-10T15:46:04-08:00 New Revision: 1772de7212e9d2ea0711028709a5833ea7769173 URL: https://github.com/llvm/llvm-project/commit/1772de7212e9d2ea0711028709a5833ea7769173 DIFF: https://github.com/llvm/llvm-project/commit/1772de7212e9d2ea0711028709a5833ea7769173.diff LOG: [compiler-rt] Fix endianness in get_sock_peer_name test Fix passing the port and IP address with the wrong endianness in get_sock_peer_name() that causes the connect() to fail inside without an outgoing network interface (it's trying to connect to 1.0.0.127 instead of 127.0.0.1). Differential Revision: https://reviews.llvm.org/D119461 (cherry picked from commit c65fb0cdf26296ae83d23260337d1231d0249020) Added: Modified: compiler-rt/test/sanitizer_common/TestCases/Linux/get_sock_peer_name.cpp Removed: diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/get_sock_peer_name.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/get_sock_peer_name.cpp index d4e6189d61703..04ac7a1072459 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Linux/get_sock_peer_name.cpp +++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/get_sock_peer_name.cpp @@ -17,10 +17,10 @@ int main() { const sockaddr_in sin = { .sin_family = AF_INET, - .sin_port = 1234, + .sin_port = htons(1234), .sin_addr = { - .s_addr = INADDR_LOOPBACK, + .s_addr = htonl(INADDR_LOOPBACK), }, }; assert(connect(fd, reinterpret_cast(&sin), sizeof(sin)) == ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [compiler-rt] 917c47b - Reapply [sanitizers] Avoid macro clash in SignalContext::WriteFlag (NFC)
Author: Nikita Popov Date: 2022-02-10T15:46:26-08:00 New Revision: 917c47b3bf0dfc45a2a5ba12c1397d647ecf4017 URL: https://github.com/llvm/llvm-project/commit/917c47b3bf0dfc45a2a5ba12c1397d647ecf4017 DIFF: https://github.com/llvm/llvm-project/commit/917c47b3bf0dfc45a2a5ba12c1397d647ecf4017.diff LOG: Reapply [sanitizers] Avoid macro clash in SignalContext::WriteFlag (NFC) D116208 may cause a macro clash on older versions of linux, where fs.h defines a READ macro. This is resolved by switching to a more typical casing style for non-macro symbols. Reapplying with changes to the symbol names in various platform specific code, which I missed previously. Differential Revision: https://reviews.llvm.org/D118783 (cherry picked from commit 36cae4299d3225bb32d20dc525f017034ea3c3c1) Added: Modified: compiler-rt/lib/asan/asan_errors.h compiler-rt/lib/sanitizer_common/sanitizer_common.h compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp compiler-rt/lib/sanitizer_common/sanitizer_win.cpp Removed: diff --git a/compiler-rt/lib/asan/asan_errors.h b/compiler-rt/lib/asan/asan_errors.h index a7fda2fd9f5d6..af6d1f295eb29 100644 --- a/compiler-rt/lib/asan/asan_errors.h +++ b/compiler-rt/lib/asan/asan_errors.h @@ -53,9 +53,9 @@ struct ErrorDeadlySignal : ErrorBase { scariness.Scare(10, "null-deref"); } else if (signal.addr == signal.pc) { scariness.Scare(60, "wild-jump"); -} else if (signal.write_flag == SignalContext::WRITE) { +} else if (signal.write_flag == SignalContext::Write) { scariness.Scare(30, "wild-addr-write"); -} else if (signal.write_flag == SignalContext::READ) { +} else if (signal.write_flag == SignalContext::Read) { scariness.Scare(20, "wild-addr-read"); } else { scariness.Scare(25, "wild-addr"); diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common.h b/compiler-rt/lib/sanitizer_common/sanitizer_common.h index 139d5a046..3302590c67719 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common.h @@ -956,7 +956,7 @@ struct SignalContext { uptr sp; uptr bp; bool is_memory_access; - enum WriteFlag { UNKNOWN, READ, WRITE } write_flag; + enum WriteFlag { Unknown, Read, Write } write_flag; // In some cases the kernel cannot provide the true faulting address; `addr` // will be zero then. This field allows to distinguish between these cases diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp index 29ff7c0417291..2e4d57d87f58e 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp @@ -1825,7 +1825,7 @@ SignalContext::WriteFlag SignalContext::GetWriteFlag() const { #else uptr err = ucontext->uc_mcontext.gregs[REG_ERR]; #endif // SANITIZER_FREEBSD - return err & PF_WRITE ? WRITE : READ; + return err & PF_WRITE ? Write : Read; #elif defined(__mips__) uint32_t *exception_source; uint32_t faulty_instruction; @@ -1848,7 +1848,7 @@ SignalContext::WriteFlag SignalContext::GetWriteFlag() const { case 0x2a: // swl case 0x2e: // swr #endif - return SignalContext::WRITE; + return SignalContext::Write; case 0x20: // lb case 0x24: // lbu @@ -1863,27 +1863,27 @@ SignalContext::WriteFlag SignalContext::GetWriteFlag() const { case 0x22: // lwl case 0x26: // lwr #endif - return SignalContext::READ; + return SignalContext::Read; #if __mips_isa_rev == 6 case 0x3b: // pcrel op_code = (faulty_instruction >> 19) & 0x3; switch (op_code) { case 0x1: // lwpc case 0x2: // lwupc - return SignalContext::READ; + return SignalContext::Read; } #endif } - return SignalContext::UNKNOWN; + return SignalContext::Unknown; #elif defined(__arm__) static const uptr FSR_WRITE = 1U << 11; uptr fsr = ucontext->uc_mcontext.error_code; - return fsr & FSR_WRITE ? WRITE : READ; + return fsr & FSR_WRITE ? Write : Read; #elif defined(__aarch64__) static const u64 ESR_ELx_WNR = 1U << 6; u64 esr; - if (!Aarch64GetESR(ucontext, &esr)) return UNKNOWN; - return esr & ESR_ELx_WNR ? WRITE : READ; + if (!Aarch64GetESR(ucontext, &esr)) return Unknown; + return esr & ESR_ELx_WNR ? Write : Read; #elif defined(__sparc__) // Decode the instruction to determine the access type. // From OpenSolaris $SRC/uts/sun4/os/trap.c (get_accesstype). @@ -1899,7 +1899,7 @@ SignalContext::WriteFlag SignalContext::GetWriteFlag() const { #endif #endif u32 instr = *(u32 *)pc; - return (instr >> 21) & 1 ? WRITE: READ; + return (instr >> 21) & 1 ? Write: Read; #elif defined(__riscv
[llvm-branch-commits] [clang] 0024f66 - [clang-cl] Bump default -fms-compatibility-version to 19.20
Author: Muhammad Omair Javaid Date: 2022-02-11T09:23:05+05:00 New Revision: 0024f665446068af7dc24162f432c89f4e91b2a7 URL: https://github.com/llvm/llvm-project/commit/0024f665446068af7dc24162f432c89f4e91b2a7 DIFF: https://github.com/llvm/llvm-project/commit/0024f665446068af7dc24162f432c89f4e91b2a7.diff LOG: [clang-cl] Bump default -fms-compatibility-version to 19.20 clang-cl MSVC required version is 19.20 now. Update the default -fms-compatibility-version to 19.20. Differential Revision: https://reviews.llvm.org/D114639 Added: Modified: clang/lib/Driver/ToolChains/MSVC.cpp clang/test/Driver/cl-options.c Removed: diff --git a/clang/lib/Driver/ToolChains/MSVC.cpp b/clang/lib/Driver/ToolChains/MSVC.cpp index 18cef288f018a..9f4751167ac12 100644 --- a/clang/lib/Driver/ToolChains/MSVC.cpp +++ b/clang/lib/Driver/ToolChains/MSVC.cpp @@ -1393,8 +1393,8 @@ VersionTuple MSVCToolChain::computeMSVCVersion(const Driver *D, if (MSVT.empty() && Args.hasFlag(options::OPT_fms_extensions, options::OPT_fno_ms_extensions, IsWindowsMSVC)) { -// -fms-compatibility-version=19.14 is default, aka 2017, 15.7 -MSVT = VersionTuple(19, 14); +// -fms-compatibility-version=19.20 is default, aka 2019, 16.x +MSVT = VersionTuple(19, 20); } return MSVT; } diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index 733e733de738e..8d240e6e6e5c6 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -757,7 +757,7 @@ // Validate that the default triple is used when run an empty tools dir is specified // RUN: %clang_cl -vctoolsdir "" -### -- %s 2>&1 | FileCheck %s --check-prefix VCTOOLSDIR -// VCTOOLSDIR: "-triple" "{{[a-zA-Z0-9_-]*}}-pc-windows-msvc19.14.0" +// VCTOOLSDIR: "-triple" "{{[a-zA-Z0-9_-]*}}-pc-windows-msvc19.20.0" // Validate that built-in include paths are based on the supplied path // RUN: %clang_cl --target=aarch64-pc-windows-msvc -vctoolsdir "/fake" -winsdkdir "/foo" -winsdkversion 10.0.12345.0 -### -- %s 2>&1 | FileCheck %s --check-prefix FAKEDIR ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] 4c33252 - Set LLVM_FORCE_USE_OLD_TOOLCHAIN to disable VS2019 checks
Author: Muhammad Omair Javaid Date: 2022-02-11T09:23:05+05:00 New Revision: 4c33252b7d9ad1b52c7faa66fafeb816ab53f964 URL: https://github.com/llvm/llvm-project/commit/4c33252b7d9ad1b52c7faa66fafeb816ab53f964 DIFF: https://github.com/llvm/llvm-project/commit/4c33252b7d9ad1b52c7faa66fafeb816ab53f964.diff LOG: Set LLVM_FORCE_USE_OLD_TOOLCHAIN to disable VS2019 checks VS2019 version 1920 in now the default and get tested in llvm/include/llvm/Support/Compiler.h. This patch propagates LLVM_FORCE_USE_OLD_TOOLCHAIN macro to disable testing for VS2019. Differential Revision: https://reviews.llvm.org/D114639 Added: Modified: llvm/include/llvm/Config/llvm-config.h.cmake llvm/include/llvm/Support/Compiler.h Removed: diff --git a/llvm/include/llvm/Config/llvm-config.h.cmake b/llvm/include/llvm/Config/llvm-config.h.cmake index 839a1c7c1984f..e8a8c20c7c7ad 100644 --- a/llvm/include/llvm/Config/llvm-config.h.cmake +++ b/llvm/include/llvm/Config/llvm-config.h.cmake @@ -109,4 +109,7 @@ /* Define if building LLVM with BUILD_SHARED_LIBS */ #cmakedefine LLVM_BUILD_SHARED_LIBS +/* Define if building LLVM with LLVM_FORCE_USE_OLD_TOOLCHAIN_LIBS */ +#cmakedefine LLVM_FORCE_USE_OLD_TOOLCHAIN $(LLVM_FORCE_USE_OLD_TOOLCHAIN) + #endif diff --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h index f3317049524f3..80b2dfaec4273 100644 --- a/llvm/include/llvm/Support/Compiler.h +++ b/llvm/include/llvm/Support/Compiler.h @@ -90,9 +90,11 @@ #define LLVM_MSC_PREREQ(version) (_MSC_VER >= (version)) // We require at least VS 2019. +#if !defined(LLVM_FORCE_USE_OLD_TOOLCHAIN) #if !LLVM_MSC_PREREQ(1920) #error LLVM requires at least VS 2019. #endif +#endif #else #define LLVM_MSC_PREREQ(version) 0 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits