From owner-svn-src-vendor@freebsd.org Fri Feb 15 20:48:57 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D30CA14E8B64; Fri, 15 Feb 2019 20:48:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CE2D842E0; Fri, 15 Feb 2019 20:48:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72E5323EB6; Fri, 15 Feb 2019 20:48:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1FKmuUF049673; Fri, 15 Feb 2019 20:48:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1FKmqwV049650; Fri, 15 Feb 2019 20:48:52 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201902152048.x1FKmqwV049650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 15 Feb 2019 20:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r344166 - in vendor/llvm/dist-release_80: . bindings/go/llvm cmake/modules docs include/llvm/BinaryFormat include/llvm/MC lib/Analysis lib/MC lib/MC/MCParser lib/Object lib/Support/Unix... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm/dist-release_80: . bindings/go/llvm cmake/modules docs include/llvm/BinaryFormat include/llvm/MC lib/Analysis lib/MC lib/MC/MCParser lib/Object lib/Support/Unix lib/Target/AArch64 lib/T... X-SVN-Commit-Revision: 344166 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7CE2D842E0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2019 20:48:57 -0000 Author: dim Date: Fri Feb 15 20:48:51 2019 New Revision: 344166 URL: https://svnweb.freebsd.org/changeset/base/344166 Log: Vendor import of llvm release_80 branch r354130: https://llvm.org/svn/llvm-project/llvm/branches/release_80@354130 Added: vendor/llvm/dist-release_80/test/CodeGen/AArch64/cmpxchg-lse-even-regs.ll vendor/llvm/dist-release_80/test/CodeGen/AArch64/seqpaircopy.mir vendor/llvm/dist-release_80/test/CodeGen/WebAssembly/main-three-args.ll vendor/llvm/dist-release_80/test/CodeGen/X86/inline-asm-default-clobbers.ll vendor/llvm/dist-release_80/test/CodeGen/X86/pr40529.ll vendor/llvm/dist-release_80/test/Instrumentation/MemorySanitizer/global_ctors_2to3.ll vendor/llvm/dist-release_80/test/MC/WebAssembly/import-module.ll Deleted: vendor/llvm/dist-release_80/test/MC/MachO/file-single.s Modified: vendor/llvm/dist-release_80/CMakeLists.txt vendor/llvm/dist-release_80/bindings/go/llvm/ir_test.go vendor/llvm/dist-release_80/cmake/modules/CheckCompilerVersion.cmake vendor/llvm/dist-release_80/cmake/modules/CrossCompile.cmake vendor/llvm/dist-release_80/docs/CMake.rst vendor/llvm/dist-release_80/docs/DeveloperPolicy.rst vendor/llvm/dist-release_80/docs/GettingStarted.rst vendor/llvm/dist-release_80/docs/LibFuzzer.rst vendor/llvm/dist-release_80/docs/ReleaseNotes.rst vendor/llvm/dist-release_80/include/llvm/BinaryFormat/Wasm.h vendor/llvm/dist-release_80/include/llvm/MC/MCSymbolWasm.h vendor/llvm/dist-release_80/lib/Analysis/TargetLibraryInfo.cpp vendor/llvm/dist-release_80/lib/MC/MCExpr.cpp vendor/llvm/dist-release_80/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist-release_80/lib/MC/WasmObjectWriter.cpp vendor/llvm/dist-release_80/lib/Object/WasmObjectFile.cpp vendor/llvm/dist-release_80/lib/Support/Unix/Threading.inc vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64InstrInfo.cpp vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64InstrInfo.h vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64RegisterInfo.td vendor/llvm/dist-release_80/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp vendor/llvm/dist-release_80/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm/dist-release_80/lib/Target/SystemZ/SystemZInstrInfo.cpp vendor/llvm/dist-release_80/lib/Target/SystemZ/SystemZInstrInfo.h vendor/llvm/dist-release_80/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp vendor/llvm/dist-release_80/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp vendor/llvm/dist-release_80/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.h vendor/llvm/dist-release_80/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp vendor/llvm/dist-release_80/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp vendor/llvm/dist-release_80/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist-release_80/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp vendor/llvm/dist-release_80/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h vendor/llvm/dist-release_80/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp vendor/llvm/dist-release_80/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h vendor/llvm/dist-release_80/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist-release_80/lib/Target/X86/X86InstrFPStack.td vendor/llvm/dist-release_80/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist-release_80/lib/Target/X86/X86RegisterInfo.cpp vendor/llvm/dist-release_80/lib/Target/X86/X86RegisterInfo.td vendor/llvm/dist-release_80/lib/Transforms/Instrumentation/MemorySanitizer.cpp vendor/llvm/dist-release_80/test/CodeGen/MIR/X86/memory-operands.mir vendor/llvm/dist-release_80/test/CodeGen/Mips/micromips-b-range.ll vendor/llvm/dist-release_80/test/CodeGen/SystemZ/memcmp-01.ll vendor/llvm/dist-release_80/test/CodeGen/SystemZ/strcmp-01.ll vendor/llvm/dist-release_80/test/CodeGen/WebAssembly/call.ll vendor/llvm/dist-release_80/test/CodeGen/WebAssembly/function-bitcasts-varargs.ll vendor/llvm/dist-release_80/test/CodeGen/WebAssembly/function-bitcasts.ll vendor/llvm/dist-release_80/test/CodeGen/WebAssembly/import-module.ll vendor/llvm/dist-release_80/test/CodeGen/WebAssembly/main-declaration.ll vendor/llvm/dist-release_80/test/CodeGen/WebAssembly/main-no-args.ll vendor/llvm/dist-release_80/test/CodeGen/WebAssembly/main-with-args.ll vendor/llvm/dist-release_80/test/CodeGen/X86/and-su.ll vendor/llvm/dist-release_80/test/CodeGen/X86/avx512-regcall-NoMask.ll vendor/llvm/dist-release_80/test/CodeGen/X86/fcmove.ll vendor/llvm/dist-release_80/test/CodeGen/X86/fmf-flags.ll vendor/llvm/dist-release_80/test/CodeGen/X86/fp-cvt.ll vendor/llvm/dist-release_80/test/CodeGen/X86/inline-asm-fpstack.ll vendor/llvm/dist-release_80/test/CodeGen/X86/ipra-reg-usage.ll vendor/llvm/dist-release_80/test/CodeGen/X86/pr13577.ll vendor/llvm/dist-release_80/test/CodeGen/X86/pr33349.ll vendor/llvm/dist-release_80/test/CodeGen/X86/pr34080.ll vendor/llvm/dist-release_80/test/CodeGen/X86/pr34177.ll vendor/llvm/dist-release_80/test/CodeGen/X86/scalar-fp-to-i64.ll vendor/llvm/dist-release_80/test/CodeGen/X86/select.ll vendor/llvm/dist-release_80/test/CodeGen/X86/sincos-opt.ll vendor/llvm/dist-release_80/test/CodeGen/X86/x87-schedule.ll vendor/llvm/dist-release_80/test/DebugInfo/Mips/eh_frame.ll vendor/llvm/dist-release_80/test/Instrumentation/MemorySanitizer/msan_basic.ll vendor/llvm/dist-release_80/test/Instrumentation/MemorySanitizer/msan_llvm_is_constant.ll vendor/llvm/dist-release_80/test/MC/Disassembler/X86/fp-stack.txt vendor/llvm/dist-release_80/test/MC/Disassembler/X86/x86-16.txt vendor/llvm/dist-release_80/test/MC/MachO/file.s vendor/llvm/dist-release_80/test/MC/WebAssembly/external-func-address.ll vendor/llvm/dist-release_80/test/MC/X86/PPRO-32.s vendor/llvm/dist-release_80/test/MC/X86/PPRO-64.s vendor/llvm/dist-release_80/test/MC/X86/X87-32.s vendor/llvm/dist-release_80/test/MC/X86/X87-64.s vendor/llvm/dist-release_80/test/MC/X86/intel-syntax-2.s vendor/llvm/dist-release_80/test/MC/X86/intel-syntax.s vendor/llvm/dist-release_80/test/MC/X86/x86-16.s vendor/llvm/dist-release_80/test/MC/X86/x86-32-coverage.s vendor/llvm/dist-release_80/test/MC/X86/x86-32.s vendor/llvm/dist-release_80/test/MC/X86/x86-64.s vendor/llvm/dist-release_80/test/Transforms/InstCombine/double-float-shrink-1.ll vendor/llvm/dist-release_80/test/Transforms/InstCombine/double-float-shrink-2.ll vendor/llvm/dist-release_80/test/Transforms/InstCombine/pow-1.ll vendor/llvm/dist-release_80/test/Transforms/InstCombine/win-math.ll vendor/llvm/dist-release_80/test/tools/llvm-mca/X86/Atom/resources-x87.s vendor/llvm/dist-release_80/test/tools/llvm-mca/X86/BdVer2/resources-x87.s vendor/llvm/dist-release_80/test/tools/llvm-mca/X86/Broadwell/resources-x87.s vendor/llvm/dist-release_80/test/tools/llvm-mca/X86/BtVer2/resources-x87.s vendor/llvm/dist-release_80/test/tools/llvm-mca/X86/Generic/resources-x87.s vendor/llvm/dist-release_80/test/tools/llvm-mca/X86/Haswell/resources-x87.s vendor/llvm/dist-release_80/test/tools/llvm-mca/X86/SLM/resources-x87.s vendor/llvm/dist-release_80/test/tools/llvm-mca/X86/SandyBridge/resources-x87.s vendor/llvm/dist-release_80/test/tools/llvm-mca/X86/SkylakeClient/resources-x87.s vendor/llvm/dist-release_80/test/tools/llvm-mca/X86/SkylakeServer/resources-x87.s vendor/llvm/dist-release_80/test/tools/llvm-mca/X86/Znver1/resources-x87.s vendor/llvm/dist-release_80/tools/yaml2obj/yaml2wasm.cpp vendor/llvm/dist-release_80/utils/TableGen/X86RecognizableInstr.cpp Modified: vendor/llvm/dist-release_80/CMakeLists.txt ============================================================================== --- vendor/llvm/dist-release_80/CMakeLists.txt Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/CMakeLists.txt Fri Feb 15 20:48:51 2019 (r344166) @@ -383,8 +383,11 @@ option(LLVM_ENABLE_EXPENSIVE_CHECKS "Enable expensive set(LLVM_ABI_BREAKING_CHECKS "WITH_ASSERTS" CACHE STRING "Enable abi-breaking checks. Can be WITH_ASSERTS, FORCE_ON or FORCE_OFF.") -option(LLVM_FORCE_USE_OLD_HOST_TOOLCHAIN +option(LLVM_FORCE_USE_OLD_TOOLCHAIN "Set to ON to force using an old, unsupported host toolchain." OFF) + +option(LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN + "Set to ON to only warn when using a toolchain which is about to be deprecated, instead of emitting an error." OFF) option(LLVM_USE_INTEL_JITEVENTS "Use Intel JIT API to inform Intel(R) VTune(TM) Amplifier XE 2011 about JIT code" Modified: vendor/llvm/dist-release_80/bindings/go/llvm/ir_test.go ============================================================================== --- vendor/llvm/dist-release_80/bindings/go/llvm/ir_test.go Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/bindings/go/llvm/ir_test.go Fri Feb 15 20:48:51 2019 (r344166) @@ -31,7 +31,7 @@ func testAttribute(t *testing.T, name string) { fn.AddFunctionAttr(attr) newattr := fn.GetEnumFunctionAttribute(kind) if attr != newattr { - t.Errorf("got attribute mask %d, want %d", newattr, attr) + t.Errorf("got attribute %p, want %p", newattr.C, attr.C) } text := mod.String() @@ -42,7 +42,7 @@ func testAttribute(t *testing.T, name string) { fn.RemoveEnumFunctionAttribute(kind) newattr = fn.GetEnumFunctionAttribute(kind) if !newattr.IsNil() { - t.Errorf("got attribute mask %d, want 0", newattr) + t.Errorf("got attribute %p, want 0", newattr.C) } } Modified: vendor/llvm/dist-release_80/cmake/modules/CheckCompilerVersion.cmake ============================================================================== --- vendor/llvm/dist-release_80/cmake/modules/CheckCompilerVersion.cmake Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/cmake/modules/CheckCompilerVersion.cmake Fri Feb 15 20:48:51 2019 (r344166) @@ -1,52 +1,94 @@ -# Check if the host compiler is new enough. LLVM requires at least GCC 4.8, -# MSVC 2015 (Update 3), or Clang 3.1. +# Check if the host compiler is new enough. +# These versions are updated based on the following policy: +# llvm.org/docs/DeveloperPolicy.html#toolchain include(CheckCXXSourceCompiles) -if(NOT DEFINED LLVM_COMPILER_CHECKED) - set(LLVM_COMPILER_CHECKED ON) +set(GCC_MIN 4.8) +set(GCC_SOFT_ERROR 5.1) +set(CLANG_MIN 3.1) +set(CLANG_SOFT_ERROR 3.5) +set(APPLECLANG_MIN 3.1) +set(APPLECLANG_SOFT_ERROR 6.0) +set(MSVC_MIN 19.00.24213.1) +set(MSVC_SOFT_ERROR 19.1) - if(NOT LLVM_FORCE_USE_OLD_TOOLCHAIN) - if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) - message(FATAL_ERROR "Host GCC version must be at least 4.8!") - endif() - elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1) - message(FATAL_ERROR "Host Clang version must be at least 3.1!") - endif() +# Map the above GCC versions to dates: https://gcc.gnu.org/develop.html#timeline +set(GCC_MIN_DATE 20130322) +set(GCC_SOFT_ERROR_DATE 20150422) - if (CMAKE_CXX_SIMULATE_ID MATCHES "MSVC") - if (CMAKE_CXX_SIMULATE_VERSION VERSION_LESS 19.0) - message(FATAL_ERROR "Host Clang must have at least -fms-compatibility-version=19.0") - endif() - set(CLANG_CL 1) - elseif(NOT LLVM_ENABLE_LIBCXX) - # Otherwise, test that we aren't using too old of a version of libstdc++ - # with the Clang compiler. This is tricky as there is no real way to - # check the version of libstdc++ directly. Instead we test for a known - # bug in libstdc++4.6 that is fixed in libstdc++4.7. - set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) - set(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++0x") - check_cxx_source_compiles(" -#include -std::atomic x(0.0f); -int main() { return (float)x; }" - LLVM_NO_OLD_LIBSTDCXX) - if(NOT LLVM_NO_OLD_LIBSTDCXX) - message(FATAL_ERROR "Host Clang must be able to find libstdc++4.8 or newer!") - endif() - set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) - set(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES}) + +if(DEFINED LLVM_COMPILER_CHECKED) + return() +endif() +set(LLVM_COMPILER_CHECKED ON) + +if(LLVM_FORCE_USE_OLD_TOOLCHAIN) + return() +endif() + +function(check_compiler_version NAME NICE_NAME MINIMUM_VERSION SOFT_ERROR_VERSION) + if(NOT CMAKE_CXX_COMPILER_ID STREQUAL NAME) + return() + endif() + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS MINIMUM_VERSION) + message(FATAL_ERROR "Host ${NICE_NAME} version must be at least ${MINIMUM_VERSION}, your version is ${CMAKE_CXX_COMPILER_VERSION}.") + elseif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS SOFT_ERROR_VERSION) + if(LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN) + message(WARNING "Host ${NICE_NAME} version should be at least ${SOFT_ERROR_VERSION} because LLVM will soon use new C++ features which your toolchain version doesn't support. Your version is ${CMAKE_CXX_COMPILER_VERSION}. Ignoring because you've set LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN, but very soon your toolchain won't be supported.") + else() + message(FATAL_ERROR "Host ${NICE_NAME} version should be at least ${SOFT_ERROR_VERSION} because LLVM will soon use new C++ features which your toolchain version doesn't support. Your version is ${CMAKE_CXX_COMPILER_VERSION}. You can temporarily opt out using LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN, but very soon your toolchain won't be supported.") + endif() + endif() +endfunction(check_compiler_version) + +check_compiler_version("GNU" "GCC" ${GCC_MIN} ${GCC_SOFT_ERROR}) +check_compiler_version("Clang" "Clang" ${CLANG_MIN} ${CLANG_SOFT_ERROR}) +check_compiler_version("AppleClang" "Apple Clang" ${APPLECLANG_MIN} ${APPLECLANG_SOFT_ERROR}) +check_compiler_version("MSVC" "Visual Studio" ${MSVC_MIN} ${MSVC_SOFT_ERROR}) + +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + if (CMAKE_CXX_SIMULATE_ID MATCHES "MSVC") + if (CMAKE_CXX_SIMULATE_VERSION VERSION_LESS MSVC_MIN) + message(FATAL_ERROR "Host Clang must have at least -fms-compatibility-version=${MSVC_MIN}, your version is ${CMAKE_CXX_COMPILER_VERSION}.") + endif() + set(CLANG_CL 1) + elseif(NOT LLVM_ENABLE_LIBCXX) + # Test that we aren't using too old of a version of libstdc++. + set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) + set(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++0x") + check_cxx_source_compiles(" +#include +#if defined(__GLIBCXX__) +#if __GLIBCXX__ < ${GCC_MIN_DATE} +#error Unsupported libstdc++ version +#endif +#endif +int main() { return 0; } +" + LLVM_LIBSTDCXX_MIN) + if(NOT LLVM_LIBSTDCXX_MIN) + message(FATAL_ERROR "libstdc++ version must be at least ${GCC_MIN}.") + endif() + check_cxx_source_compiles(" +#include +#if defined(__GLIBCXX__) +#if __GLIBCXX__ < ${GCC_SOFT_ERROR_DATE} +#error Unsupported libstdc++ version +#endif +#endif +int main() { return 0; } +" + LLVM_LIBSTDCXX_SOFT_ERROR) + if(NOT LLVM_LIBSTDCXX_SOFT_ERROR) + if(LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN) + message(WARNING "libstdc++ version should be at least ${GCC_SOFT_ERROR} because LLVM will soon use new C++ features which your toolchain version doesn't support. Ignoring because you've set LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN, but very soon your toolchain won't be supported.") + else() + message(FATAL_ERROR "libstdc++ version should be at least ${GCC_SOFT_ERROR} because LLVM will soon use new C++ features which your toolchain version doesn't support. You can temporarily opt out using LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN, but very soon your toolchain won't be supported.") endif() - elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0) - message(FATAL_ERROR "Host Visual Studio must be at least 2015") - elseif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.00.24213.1) - message(WARNING "Host Visual Studio should at least be 2015 Update 3 (MSVC 19.00.24213.1)" - " due to miscompiles from earlier versions") - endif() endif() + set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) + set(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES}) endif() endif() Modified: vendor/llvm/dist-release_80/cmake/modules/CrossCompile.cmake ============================================================================== --- vendor/llvm/dist-release_80/cmake/modules/CrossCompile.cmake Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/cmake/modules/CrossCompile.cmake Fri Feb 15 20:48:51 2019 (r344166) @@ -52,6 +52,7 @@ function(llvm_create_cross_target_internal target_name -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${experimental_targets_to_build_arg}" -DLLVM_DEFAULT_TARGET_TRIPLE="${TARGET_TRIPLE}" -DLLVM_TARGET_ARCH="${LLVM_TARGET_ARCH}" + -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN="${LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN}" ${build_type_flags} ${linker_flag} ${external_clang_dir} WORKING_DIRECTORY ${LLVM_${target_name}_BUILD} DEPENDS CREATE_LLVM_${target_name} Modified: vendor/llvm/dist-release_80/docs/CMake.rst ============================================================================== --- vendor/llvm/dist-release_80/docs/CMake.rst Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/docs/CMake.rst Fri Feb 15 20:48:51 2019 (r344166) @@ -573,6 +573,15 @@ LLVM-specific variables options, which are passed to the CCACHE_MAXSIZE and CCACHE_DIR environment variables, respectively. +**LLVM_FORCE_USE_OLD_TOOLCHAIN**:BOOL + If enabled, the compiler and standard library versions won't be checked. LLVM + may not compile at all, or might fail at runtime due to known bugs in these + toolchains. + +**LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN**:BOOL + If enabled, the compiler version check will only warn when using a toolchain + which is about to be deprecated, instead of emitting an error. + CMake Caches ============ Modified: vendor/llvm/dist-release_80/docs/DeveloperPolicy.rst ============================================================================== --- vendor/llvm/dist-release_80/docs/DeveloperPolicy.rst Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/docs/DeveloperPolicy.rst Fri Feb 15 20:48:51 2019 (r344166) @@ -22,7 +22,7 @@ This policy is also designed to accomplish the followi #. Make life as simple and easy for contributors as possible. -#. Keep the tip of tree as stable as possible. +#. Keep the top of tree as stable as possible. #. Establish awareness of the project's :ref:`copyright, license, and patent policies ` with contributors to the project. @@ -637,6 +637,47 @@ To **continue** as a supported and official target: In essences, these rules are necessary for targets to gain and retain their status, but also markers to define bit-rot, and will be used to clean up the tree from unmaintained targets. + +.. _toolchain: + +Updating Toolchain Requirements +------------------------------- + +We intend to require newer toolchains as time goes by. This means LLVM's +codebase can use newer versions of C++ as they get standardized. Requiring newer +toolchains to build LLVM can be painful for those building LLVM; therefore, it +will only be done through the following process: + + * Generally, try to support LLVM and GCC versions from the last 3 years at a + minimum. This time-based guideline is not strict: we may support much older + compilers, or decide to support fewer versions. + + * An RFC is sent to the `llvm-dev mailing list `_ + + - Detail upsides of the version increase (e.g. which newer C++ language or + library features LLVM should use; avoid miscompiles in particular compiler + versions, etc). + - Detail downsides on important platforms (e.g. Ubuntu LTS status). + + * Once the RFC reaches consensus, update the CMake toolchain version checks as + well as the :doc:`getting started` guide. We want to + soft-error when developers compile LLVM. We say "soft-error" because the + error can be turned into a warning using a CMake flag. This is an important + step: LLVM still doesn't have code which requires the new toolchains, but it + soon will. If you compile LLVM but don't read the mailing list, we should + tell you! + + * Ensure that at least one LLVM release has had this soft-error. Not all + developers compile LLVM top-of-tree. These release-bound developers should + also be told about upcoming changes. + + * Turn the soft-error into a hard-error after said LLVM release has branched. + + * Update the :doc:`coding standards` to allow the new + features we've explicitly approved in the RFC. + + * Start using the new features in LLVM's codebase. + .. _copyright-license-patents: Modified: vendor/llvm/dist-release_80/docs/GettingStarted.rst ============================================================================== --- vendor/llvm/dist-release_80/docs/GettingStarted.rst Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/docs/GettingStarted.rst Fri Feb 15 20:48:51 2019 (r344166) @@ -170,7 +170,7 @@ uses the package and provides other details. Package Version Notes =========================================================== ============ ========================================== `GNU Make `_ 3.79, 3.79.1 Makefile/build processor -`GCC `_ >=4.8.0 C/C++ compiler\ :sup:`1` +`GCC `_ >=5.1.0 C/C++ compiler\ :sup:`1` `python `_ >=2.7 Automated test suite\ :sup:`2` `zlib `_ >=1.2.3.4 Compression library\ :sup:`3` =========================================================== ============ ========================================== @@ -220,15 +220,25 @@ Host C++ Toolchain, both Compiler and Standard Library ------------------------------------------------------ LLVM is very demanding of the host C++ compiler, and as such tends to expose -bugs in the compiler. We are also planning to follow improvements and -developments in the C++ language and library reasonably closely. As such, we -require a modern host C++ toolchain, both compiler and standard library, in -order to build LLVM. +bugs in the compiler. We also attempt to follow improvements and developments in +the C++ language and library reasonably closely. As such, we require a modern +host C++ toolchain, both compiler and standard library, in order to build LLVM. -For the most popular host toolchains we check for specific minimum versions in -our build systems: +LLVM is written using the subset of C++ documented in :doc:`coding +standards`. To enforce this language version, we check the most +popular host toolchains for specific minimum versions in our build systems: +* Clang 3.5 +* Apple Clang 6.0 +* GCC 5.1 +* Visual Studio 2017 + +The below versions currently soft-error as we transition to the new compiler +versions listed above. The LLVM codebase is currently known to compile correctly +with the following compilers, though this will change in the near future: + * Clang 3.1 +* Apple Clang 3.1 * GCC 4.8 * Visual Studio 2015 (Update 3) @@ -282,33 +292,36 @@ The first step is to get a recent GCC toolchain instal distribution on which users have struggled with the version requirements is Ubuntu Precise, 12.04 LTS. For this distribution, one easy option is to install the `toolchain testing PPA`_ and use it to install a modern GCC. There is -a really nice discussions of this on the `ask ubuntu stack exchange`_. However, -not all users can use PPAs and there are many other distributions, so it may be -necessary (or just useful, if you're here you *are* doing compiler development -after all) to build and install GCC from source. It is also quite easy to do -these days. +a really nice discussions of this on the `ask ubuntu stack exchange`_ and a +`github gist`_ with updated commands. However, not all users can use PPAs and +there are many other distributions, so it may be necessary (or just useful, if +you're here you *are* doing compiler development after all) to build and install +GCC from source. It is also quite easy to do these days. .. _toolchain testing PPA: https://launchpad.net/~ubuntu-toolchain-r/+archive/test .. _ask ubuntu stack exchange: - http://askubuntu.com/questions/271388/how-to-install-gcc-4-8-in-ubuntu-12-04-from-the-terminal + https://askubuntu.com/questions/466651/how-do-i-use-the-latest-gcc-on-ubuntu/581497#58149 +.. _github gist: + https://gist.github.com/application2000/73fd6f4bf1be6600a2cf9f56315a2d91 -Easy steps for installing GCC 4.8.2: +Easy steps for installing GCC 5.1.0: .. code-block:: console - % wget https://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2 - % wget https://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2.sig + % gcc_version=5.1.0 + % wget https://ftp.gnu.org/gnu/gcc/gcc-${gcc_version}/gcc-${gcc_version}.tar.bz2 + % wget https://ftp.gnu.org/gnu/gcc/gcc-${gcc_version}/gcc-${gcc_version}.tar.bz2.sig % wget https://ftp.gnu.org/gnu/gnu-keyring.gpg - % signature_invalid=`gpg --verify --no-default-keyring --keyring ./gnu-keyring.gpg gcc-4.8.2.tar.bz2.sig` + % signature_invalid=`gpg --verify --no-default-keyring --keyring ./gnu-keyring.gpg gcc-${gcc_version}.tar.bz2.sig` % if [ $signature_invalid ]; then echo "Invalid signature" ; exit 1 ; fi - % tar -xvjf gcc-4.8.2.tar.bz2 - % cd gcc-4.8.2 + % tar -xvjf gcc-${gcc_version}.tar.bz2 + % cd gcc-${gcc_version} % ./contrib/download_prerequisites % cd .. - % mkdir gcc-4.8.2-build - % cd gcc-4.8.2-build - % $PWD/../gcc-4.8.2/configure --prefix=$HOME/toolchains --enable-languages=c,c++ + % mkdir gcc-${gcc_version}-build + % cd gcc-${gcc_version}-build + % $PWD/../gcc-${gcc_version}/configure --prefix=$HOME/toolchains --enable-languages=c,c++ % make -j$(nproc) % make install @@ -316,7 +329,7 @@ For more details, check out the excellent `GCC wiki en of this information from. .. _GCC wiki entry: - http://gcc.gnu.org/wiki/InstallingGCC + https://gcc.gnu.org/wiki/InstallingGCC Once you have a GCC toolchain, configure your build of LLVM to use the new toolchain for your host compiler and C++ standard library. Because the new @@ -336,7 +349,7 @@ If you fail to set rpath, most LLVM binaries will fail from the loader similar to ``libstdc++.so.6: version `GLIBCXX_3.4.20' not found``. This means you need to tweak the -rpath linker flag. -When you build Clang, you will need to give *it* access to modern C++11 +When you build Clang, you will need to give *it* access to modern C++ standard library in order to use it as your new host in part of a bootstrap. There are two easy ways to do this, either build (and install) libc++ along with Clang and then use it with the ``-stdlib=libc++`` compile and link flag, Modified: vendor/llvm/dist-release_80/docs/LibFuzzer.rst ============================================================================== --- vendor/llvm/dist-release_80/docs/LibFuzzer.rst Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/docs/LibFuzzer.rst Fri Feb 15 20:48:51 2019 (r344166) @@ -645,10 +645,20 @@ coverage set of the process (since the fuzzer is in-pr using more external dependencies we will slow down the fuzzer while the main reason for it to exist is extreme speed. -Q. What about Windows then? The fuzzer contains code that does not build on Windows. +Q. Does libFuzzer Support Windows? ------------------------------------------------------------------------------------ -Volunteers are welcome. +Yes, libFuzzer now supports Windows. Initial support was added in r341082. +You can download a build of Clang for Windows +that has libFuzzer from +`LLVM Snapshot Builds `_. + +Using libFuzzer on Windows without ASAN is unsupported. Building fuzzers with the +``/MD`` (dynamic runtime library) compile option is unsupported. Support for these +may be added in the future. Linking fuzzers with the ``/INCREMENTAL`` link option +(or the ``/DEBUG`` option which implies it) is also unsupported. + +Send any questions or comments to the mailing list: libfuzzer(#)googlegroups.com Q. When libFuzzer is not a good solution for a problem? --------------------------------------------------------- Modified: vendor/llvm/dist-release_80/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist-release_80/docs/ReleaseNotes.rst Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/docs/ReleaseNotes.rst Fri Feb 15 20:48:51 2019 (r344166) @@ -40,6 +40,22 @@ Non-comprehensive list of changes in this release functionality, or simply have a lot to talk about), see the `NOTE` below for adding a new subsection. +* As `discussed on the mailing list + `_, + building LLVM will soon require more recent toolchains as follows: + + ============= ==== + Clang 3.5 + Apple Clang 6.0 + GCC 5.1 + Visual Studio 2017 + ============= ==== + + A new CMake check when configuring LLVM provides a soft-error if your + toolchain will become unsupported soon. You can opt out of the soft-error by + setting the ``LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN`` CMake variable to + ``ON``. + * The **llvm-cov** tool can now export lcov trace files using the `-format=lcov` option of the `export` command. @@ -82,7 +98,7 @@ Changes to the ARM Backend Changes to the Hexagon Target --------------------------- +----------------------------- * Added support for Hexagon/HVX V66 ISA. @@ -155,6 +171,21 @@ Changes to the DAG infrastructure External Open Source Projects Using LLVM 8 ========================================== + +LDC - the LLVM-based D compiler +------------------------------- + +`D `_ is a language with C-like syntax and static typing. It +pragmatically combines efficiency, control, and modeling power, with safety and +programmer productivity. D supports powerful concepts like Compile-Time Function +Execution (CTFE) and Template Meta-Programming, provides an innovative approach +to concurrency and offers many classical paradigms. + +`LDC `_ uses the frontend from the reference compiler +combined with LLVM as backend to produce efficient native code. LDC targets +x86/x86_64 systems like Linux, OS X, FreeBSD and Windows and also Linux on ARM +and PowerPC (32/64 bit). Ports to other architectures like AArch64 and MIPS64 +are underway. Zig Programming Language ------------------------ Modified: vendor/llvm/dist-release_80/include/llvm/BinaryFormat/Wasm.h ============================================================================== --- vendor/llvm/dist-release_80/include/llvm/BinaryFormat/Wasm.h Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/include/llvm/BinaryFormat/Wasm.h Fri Feb 15 20:48:51 2019 (r344166) @@ -165,7 +165,8 @@ struct WasmSymbolInfo { StringRef Name; uint8_t Kind; uint32_t Flags; - StringRef Module; // For undefined symbols the module name of the import + StringRef ImportModule; // For undefined symbols the module of the import + StringRef ImportName; // For undefined symbols the name of the import union { // For function or global symbols, the index in function or global index // space. @@ -284,6 +285,7 @@ const unsigned WASM_SYMBOL_BINDING_LOCAL = 0x2; const unsigned WASM_SYMBOL_VISIBILITY_DEFAULT = 0x0; const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN = 0x4; const unsigned WASM_SYMBOL_UNDEFINED = 0x10; +const unsigned WASM_SYMBOL_EXPLICIT_NAME = 0x40; #define WASM_RELOC(name, value) name = value, Modified: vendor/llvm/dist-release_80/include/llvm/MC/MCSymbolWasm.h ============================================================================== --- vendor/llvm/dist-release_80/include/llvm/MC/MCSymbolWasm.h Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/include/llvm/MC/MCSymbolWasm.h Fri Feb 15 20:48:51 2019 (r344166) @@ -19,7 +19,8 @@ class MCSymbolWasm : public MCSymbol { bool IsWeak = false; bool IsHidden = false; bool IsComdat = false; - std::string ModuleName; + Optional ImportModule; + Optional ImportName; wasm::WasmSignature *Signature = nullptr; Optional GlobalType; Optional EventType; @@ -32,7 +33,7 @@ class MCSymbolWasm : public MCSymbol { // Use a module name of "env" for now, for compatibility with existing tools. // This is temporary, and may change, as the ABI is not yet stable. MCSymbolWasm(const StringMapEntry *Name, bool isTemporary) - : MCSymbol(SymbolKindWasm, Name, isTemporary), ModuleName("env") {} + : MCSymbol(SymbolKindWasm, Name, isTemporary) {} static bool classof(const MCSymbol *S) { return S->isWasm(); } const MCExpr *getSize() const { return SymbolSize; } @@ -55,8 +56,21 @@ class MCSymbolWasm : public MCSymbol { bool isComdat() const { return IsComdat; } void setComdat(bool isComdat) { IsComdat = isComdat; } - const StringRef getModuleName() const { return ModuleName; } - void setModuleName(StringRef Name) { ModuleName = Name; } + const StringRef getImportModule() const { + if (ImportModule.hasValue()) { + return ImportModule.getValue(); + } + return "env"; + } + void setImportModule(StringRef Name) { ImportModule = Name; } + + const StringRef getImportName() const { + if (ImportName.hasValue()) { + return ImportName.getValue(); + } + return getName(); + } + void setImportName(StringRef Name) { ImportName = Name; } const wasm::WasmSignature *getSignature() const { return Signature; } void setSignature(wasm::WasmSignature *Sig) { Signature = Sig; } Modified: vendor/llvm/dist-release_80/lib/Analysis/TargetLibraryInfo.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Analysis/TargetLibraryInfo.cpp Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/lib/Analysis/TargetLibraryInfo.cpp Fri Feb 15 20:48:51 2019 (r344166) @@ -161,25 +161,66 @@ static void initialize(TargetLibraryInfoImpl &TLI, con } if (T.isOSWindows() && !T.isOSCygMing()) { - // Win32 does not support long double + // XXX: The earliest documentation available at the moment is for VS2015/VC19: + // https://docs.microsoft.com/en-us/cpp/c-runtime-library/floating-point-support?view=vs-2015 + // XXX: In order to use an MSVCRT older than VC19, + // the specific library version must be explicit in the target triple, + // e.g., x86_64-pc-windows-msvc18. + bool hasPartialC99 = true; + if (T.isKnownWindowsMSVCEnvironment()) { + unsigned Major, Minor, Micro; + T.getEnvironmentVersion(Major, Minor, Micro); + hasPartialC99 = (Major == 0 || Major >= 19); + } + + // Latest targets support C89 math functions, in part. + bool isARM = (T.getArch() == Triple::aarch64 || + T.getArch() == Triple::arm); + bool hasPartialFloat = (isARM || + T.getArch() == Triple::x86_64); + + // Win32 does not support float C89 math functions, in general. + if (!hasPartialFloat) { + TLI.setUnavailable(LibFunc_acosf); + TLI.setUnavailable(LibFunc_asinf); + TLI.setUnavailable(LibFunc_atan2f); + TLI.setUnavailable(LibFunc_atanf); + TLI.setUnavailable(LibFunc_ceilf); + TLI.setUnavailable(LibFunc_cosf); + TLI.setUnavailable(LibFunc_coshf); + TLI.setUnavailable(LibFunc_expf); + TLI.setUnavailable(LibFunc_floorf); + TLI.setUnavailable(LibFunc_fmodf); + TLI.setUnavailable(LibFunc_log10f); + TLI.setUnavailable(LibFunc_logf); + TLI.setUnavailable(LibFunc_modff); + TLI.setUnavailable(LibFunc_powf); + TLI.setUnavailable(LibFunc_sinf); + TLI.setUnavailable(LibFunc_sinhf); + TLI.setUnavailable(LibFunc_sqrtf); + TLI.setUnavailable(LibFunc_tanf); + TLI.setUnavailable(LibFunc_tanhf); + } + if (!isARM) + TLI.setUnavailable(LibFunc_fabsf); + TLI.setUnavailable(LibFunc_frexpf); + TLI.setUnavailable(LibFunc_ldexpf); + + // Win32 does not support long double C89 math functions. TLI.setUnavailable(LibFunc_acosl); TLI.setUnavailable(LibFunc_asinl); - TLI.setUnavailable(LibFunc_atanl); TLI.setUnavailable(LibFunc_atan2l); + TLI.setUnavailable(LibFunc_atanl); TLI.setUnavailable(LibFunc_ceill); - TLI.setUnavailable(LibFunc_copysignl); TLI.setUnavailable(LibFunc_cosl); TLI.setUnavailable(LibFunc_coshl); TLI.setUnavailable(LibFunc_expl); - TLI.setUnavailable(LibFunc_fabsf); // Win32 and Win64 both lack fabsf TLI.setUnavailable(LibFunc_fabsl); TLI.setUnavailable(LibFunc_floorl); - TLI.setUnavailable(LibFunc_fmaxl); - TLI.setUnavailable(LibFunc_fminl); TLI.setUnavailable(LibFunc_fmodl); TLI.setUnavailable(LibFunc_frexpl); - TLI.setUnavailable(LibFunc_ldexpf); TLI.setUnavailable(LibFunc_ldexpl); + TLI.setUnavailable(LibFunc_log10l); TLI.setUnavailable(LibFunc_logl); TLI.setUnavailable(LibFunc_modfl); TLI.setUnavailable(LibFunc_powl); @@ -189,81 +230,66 @@ static void initialize(TargetLibraryInfoImpl &TLI, con TLI.setUnavailable(LibFunc_tanl); TLI.setUnavailable(LibFunc_tanhl); - // Win32 only has C89 math - TLI.setUnavailable(LibFunc_acosh); - TLI.setUnavailable(LibFunc_acoshf); + // Win32 does not fully support C99 math functions. + if (!hasPartialC99) { + TLI.setUnavailable(LibFunc_acosh); + TLI.setUnavailable(LibFunc_acoshf); + TLI.setUnavailable(LibFunc_asinh); + TLI.setUnavailable(LibFunc_asinhf); + TLI.setUnavailable(LibFunc_atanh); + TLI.setUnavailable(LibFunc_atanhf); + TLI.setAvailableWithName(LibFunc_cabs, "_cabs"); + TLI.setUnavailable(LibFunc_cabsf); + TLI.setUnavailable(LibFunc_cbrt); + TLI.setUnavailable(LibFunc_cbrtf); + TLI.setAvailableWithName(LibFunc_copysign, "_copysign"); + TLI.setAvailableWithName(LibFunc_copysignf, "_copysignf"); + TLI.setUnavailable(LibFunc_exp2); + TLI.setUnavailable(LibFunc_exp2f); + TLI.setUnavailable(LibFunc_expm1); + TLI.setUnavailable(LibFunc_expm1f); + TLI.setUnavailable(LibFunc_fmax); + TLI.setUnavailable(LibFunc_fmaxf); + TLI.setUnavailable(LibFunc_fmin); + TLI.setUnavailable(LibFunc_fminf); + TLI.setUnavailable(LibFunc_log1p); + TLI.setUnavailable(LibFunc_log1pf); + TLI.setUnavailable(LibFunc_log2); + TLI.setUnavailable(LibFunc_log2f); + TLI.setAvailableWithName(LibFunc_logb, "_logb"); + if (hasPartialFloat) + TLI.setAvailableWithName(LibFunc_logbf, "_logbf"); + else + TLI.setUnavailable(LibFunc_logbf); + TLI.setUnavailable(LibFunc_rint); + TLI.setUnavailable(LibFunc_rintf); + TLI.setUnavailable(LibFunc_round); + TLI.setUnavailable(LibFunc_roundf); + TLI.setUnavailable(LibFunc_trunc); + TLI.setUnavailable(LibFunc_truncf); + } + + // Win32 does not support long double C99 math functions. TLI.setUnavailable(LibFunc_acoshl); - TLI.setUnavailable(LibFunc_asinh); - TLI.setUnavailable(LibFunc_asinhf); TLI.setUnavailable(LibFunc_asinhl); - TLI.setUnavailable(LibFunc_atanh); - TLI.setUnavailable(LibFunc_atanhf); TLI.setUnavailable(LibFunc_atanhl); - TLI.setUnavailable(LibFunc_cabs); - TLI.setUnavailable(LibFunc_cabsf); TLI.setUnavailable(LibFunc_cabsl); - TLI.setUnavailable(LibFunc_cbrt); - TLI.setUnavailable(LibFunc_cbrtf); TLI.setUnavailable(LibFunc_cbrtl); - TLI.setUnavailable(LibFunc_exp2); - TLI.setUnavailable(LibFunc_exp2f); + TLI.setUnavailable(LibFunc_copysignl); TLI.setUnavailable(LibFunc_exp2l); - TLI.setUnavailable(LibFunc_expm1); - TLI.setUnavailable(LibFunc_expm1f); TLI.setUnavailable(LibFunc_expm1l); - TLI.setUnavailable(LibFunc_log2); - TLI.setUnavailable(LibFunc_log2f); - TLI.setUnavailable(LibFunc_log2l); - TLI.setUnavailable(LibFunc_log1p); - TLI.setUnavailable(LibFunc_log1pf); + TLI.setUnavailable(LibFunc_fmaxl); + TLI.setUnavailable(LibFunc_fminl); TLI.setUnavailable(LibFunc_log1pl); - TLI.setUnavailable(LibFunc_logb); - TLI.setUnavailable(LibFunc_logbf); + TLI.setUnavailable(LibFunc_log2l); TLI.setUnavailable(LibFunc_logbl); - TLI.setUnavailable(LibFunc_nearbyint); - TLI.setUnavailable(LibFunc_nearbyintf); TLI.setUnavailable(LibFunc_nearbyintl); - TLI.setUnavailable(LibFunc_rint); - TLI.setUnavailable(LibFunc_rintf); TLI.setUnavailable(LibFunc_rintl); - TLI.setUnavailable(LibFunc_round); - TLI.setUnavailable(LibFunc_roundf); TLI.setUnavailable(LibFunc_roundl); - TLI.setUnavailable(LibFunc_trunc); - TLI.setUnavailable(LibFunc_truncf); TLI.setUnavailable(LibFunc_truncl); - // Win32 provides some C99 math with mangled names - TLI.setAvailableWithName(LibFunc_copysign, "_copysign"); - - if (T.getArch() == Triple::x86) { - // Win32 on x86 implements single-precision math functions as macros - TLI.setUnavailable(LibFunc_acosf); - TLI.setUnavailable(LibFunc_asinf); - TLI.setUnavailable(LibFunc_atanf); - TLI.setUnavailable(LibFunc_atan2f); - TLI.setUnavailable(LibFunc_ceilf); - TLI.setUnavailable(LibFunc_copysignf); - TLI.setUnavailable(LibFunc_cosf); - TLI.setUnavailable(LibFunc_coshf); - TLI.setUnavailable(LibFunc_expf); - TLI.setUnavailable(LibFunc_floorf); - TLI.setUnavailable(LibFunc_fminf); - TLI.setUnavailable(LibFunc_fmaxf); - TLI.setUnavailable(LibFunc_fmodf); - TLI.setUnavailable(LibFunc_logf); - TLI.setUnavailable(LibFunc_log10f); - TLI.setUnavailable(LibFunc_modff); - TLI.setUnavailable(LibFunc_powf); - TLI.setUnavailable(LibFunc_sinf); - TLI.setUnavailable(LibFunc_sinhf); - TLI.setUnavailable(LibFunc_sqrtf); - TLI.setUnavailable(LibFunc_tanf); - TLI.setUnavailable(LibFunc_tanhf); - } - - // Win32 does *not* provide these functions, but they are - // generally available on POSIX-compliant systems: + // Win32 does not support these functions, but + // they are generally available on POSIX-compliant systems. TLI.setUnavailable(LibFunc_access); TLI.setUnavailable(LibFunc_bcmp); TLI.setUnavailable(LibFunc_bcopy); @@ -318,12 +344,6 @@ static void initialize(TargetLibraryInfoImpl &TLI, con TLI.setUnavailable(LibFunc_utime); TLI.setUnavailable(LibFunc_utimes); TLI.setUnavailable(LibFunc_write); - - // Win32 does *not* provide provide these functions, but they are - // specified by C99: - TLI.setUnavailable(LibFunc_atoll); - TLI.setUnavailable(LibFunc_frexpf); - TLI.setUnavailable(LibFunc_llabs); } switch (T.getOS()) { Modified: vendor/llvm/dist-release_80/lib/MC/MCExpr.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/MC/MCExpr.cpp Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/lib/MC/MCExpr.cpp Fri Feb 15 20:48:51 2019 (r344166) @@ -559,6 +559,11 @@ static void AttemptToFoldSymbolOffsetDifference( if (Asm->isThumbFunc(&SA)) Addend |= 1; + // If symbol is labeled as micromips, we set low-bit to ensure + // correct offset in .gcc_except_table + if (Asm->getBackend().isMicroMips(&SA)) + Addend |= 1; + // Clear the symbol expr pointers to indicate we have folded these // operands. A = B = nullptr; Modified: vendor/llvm/dist-release_80/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/MC/MCParser/AsmParser.cpp Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/lib/MC/MCParser/AsmParser.cpp Fri Feb 15 20:48:51 2019 (r344166) @@ -3364,10 +3364,11 @@ bool AsmParser::parseDirectiveFile(SMLoc DirectiveLoc) } if (FileNumber == -1) { - if (!getContext().getAsmInfo()->hasSingleParameterDotFile()) - return Error(DirectiveLoc, - "target does not support '.file' without a number"); - getStreamer().EmitFileDirective(Filename); + // Ignore the directive if there is no number and the target doesn't support + // numberless .file directives. This allows some portability of assembler + // between different object file formats. + if (getContext().getAsmInfo()->hasSingleParameterDotFile()) + getStreamer().EmitFileDirective(Filename); } else { // In case there is a -g option as well as debug info from directive .file, // we turn off the -g option, directly use the existing debug info instead. Modified: vendor/llvm/dist-release_80/lib/MC/WasmObjectWriter.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/MC/WasmObjectWriter.cpp Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/lib/MC/WasmObjectWriter.cpp Fri Feb 15 20:48:51 2019 (r344166) @@ -982,7 +982,8 @@ void WasmObjectWriter::writeLinkingMetaDataSection( case wasm::WASM_SYMBOL_TYPE_GLOBAL: case wasm::WASM_SYMBOL_TYPE_EVENT: encodeULEB128(Sym.ElementIndex, W.OS); - if ((Sym.Flags & wasm::WASM_SYMBOL_UNDEFINED) == 0) + if ((Sym.Flags & wasm::WASM_SYMBOL_UNDEFINED) == 0 || + (Sym.Flags & wasm::WASM_SYMBOL_EXPLICIT_NAME) != 0) writeString(Sym.Name); break; case wasm::WASM_SYMBOL_TYPE_DATA: @@ -1162,8 +1163,8 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &As MCSymbolWasm *MemorySym = cast(Ctx.getOrCreateSymbol("__linear_memory")); wasm::WasmImport MemImport; - MemImport.Module = MemorySym->getModuleName(); - MemImport.Field = MemorySym->getName(); + MemImport.Module = MemorySym->getImportModule(); + MemImport.Field = MemorySym->getImportName(); MemImport.Kind = wasm::WASM_EXTERNAL_MEMORY; Imports.push_back(MemImport); @@ -1173,8 +1174,8 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &As MCSymbolWasm *TableSym = cast(Ctx.getOrCreateSymbol("__indirect_function_table")); wasm::WasmImport TableImport; - TableImport.Module = TableSym->getModuleName(); - TableImport.Field = TableSym->getName(); + TableImport.Module = TableSym->getImportModule(); + TableImport.Field = TableSym->getImportName(); TableImport.Kind = wasm::WASM_EXTERNAL_TABLE; TableImport.Table.ElemType = wasm::WASM_TYPE_FUNCREF; Imports.push_back(TableImport); @@ -1200,8 +1201,8 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &As if (!WS.isDefined() && !WS.isComdat()) { if (WS.isFunction()) { wasm::WasmImport Import; - Import.Module = WS.getModuleName(); - Import.Field = WS.getName(); + Import.Module = WS.getImportModule(); + Import.Field = WS.getImportName(); Import.Kind = wasm::WASM_EXTERNAL_FUNCTION; Import.SigIndex = getFunctionType(WS); Imports.push_back(Import); @@ -1211,8 +1212,8 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &As report_fatal_error("undefined global symbol cannot be weak"); wasm::WasmImport Import; - Import.Module = WS.getModuleName(); - Import.Field = WS.getName(); + Import.Module = WS.getImportModule(); + Import.Field = WS.getImportName(); Import.Kind = wasm::WASM_EXTERNAL_GLOBAL; Import.Global = WS.getGlobalType(); Imports.push_back(Import); @@ -1222,8 +1223,8 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &As report_fatal_error("undefined event symbol cannot be weak"); wasm::WasmImport Import; - Import.Module = WS.getModuleName(); - Import.Field = WS.getName(); + Import.Module = WS.getImportModule(); + Import.Field = WS.getImportName(); Import.Kind = wasm::WASM_EXTERNAL_EVENT; Import.Event.Attribute = wasm::WASM_EVENT_ATTRIBUTE_EXCEPTION; Import.Event.SigIndex = getEventType(WS); @@ -1448,6 +1449,8 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &As Flags |= wasm::WASM_SYMBOL_BINDING_LOCAL; if (WS.isUndefined()) Flags |= wasm::WASM_SYMBOL_UNDEFINED; + if (WS.getName() != WS.getImportName()) + Flags |= wasm::WASM_SYMBOL_EXPLICIT_NAME; wasm::WasmSymbolInfo Info; Info.Name = WS.getName(); Modified: vendor/llvm/dist-release_80/lib/Object/WasmObjectFile.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Object/WasmObjectFile.cpp Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/lib/Object/WasmObjectFile.cpp Fri Feb 15 20:48:51 2019 (r344166) @@ -505,9 +505,13 @@ Error WasmObjectFile::parseLinkingSectionSymtab(ReadCo Function.SymbolName = Info.Name; } else { wasm::WasmImport &Import = *ImportedFunctions[Info.ElementIndex]; + if ((Info.Flags & wasm::WASM_SYMBOL_EXPLICIT_NAME) != 0) + Info.Name = readString(Ctx); + else + Info.Name = Import.Field; Signature = &Signatures[Import.SigIndex]; - Info.Name = Import.Field; - Info.Module = Import.Module; + Info.ImportName = Import.Field; + Info.ImportModule = Import.Module; } break; @@ -530,8 +534,13 @@ Error WasmObjectFile::parseLinkingSectionSymtab(ReadCo Global.SymbolName = Info.Name; } else { wasm::WasmImport &Import = *ImportedGlobals[Info.ElementIndex]; - Info.Name = Import.Field; + if ((Info.Flags & wasm::WASM_SYMBOL_EXPLICIT_NAME) != 0) + Info.Name = readString(Ctx); + else + Info.Name = Import.Field; GlobalType = &Import.Global; + Info.ImportName = Import.Field; + Info.ImportModule = Import.Module; } break; @@ -585,9 +594,14 @@ Error WasmObjectFile::parseLinkingSectionSymtab(ReadCo } else { wasm::WasmImport &Import = *ImportedEvents[Info.ElementIndex]; + if ((Info.Flags & wasm::WASM_SYMBOL_EXPLICIT_NAME) != 0) + Info.Name = readString(Ctx); + else + Info.Name = Import.Field; EventType = &Import.Event; Signature = &Signatures[EventType->SigIndex]; - Info.Name = Import.Field; + Info.ImportName = Import.Field; + Info.ImportModule = Import.Module; } break; } Modified: vendor/llvm/dist-release_80/lib/Support/Unix/Threading.inc ============================================================================== --- vendor/llvm/dist-release_80/lib/Support/Unix/Threading.inc Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/lib/Support/Unix/Threading.inc Fri Feb 15 20:48:51 2019 (r344166) @@ -203,6 +203,12 @@ void llvm::get_thread_name(SmallVectorImpl &Name ::pthread_getname_np(::pthread_self(), buf, len); Name.append(buf, buf + strlen(buf)); +#elif defined(__OpenBSD__) + constexpr uint32_t len = get_max_thread_name_length_impl(); + char buf[len]; + ::pthread_get_name_np(::pthread_self(), buf, len); + + Name.append(buf, buf + strlen(buf)); #elif defined(__linux__) #if HAVE_PTHREAD_GETNAME_NP constexpr uint32_t len = get_max_thread_name_length_impl(); Modified: vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64InstrInfo.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64InstrInfo.cpp Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64InstrInfo.cpp Fri Feb 15 20:48:51 2019 (r344166) @@ -2292,6 +2292,31 @@ void AArch64InstrInfo::copyPhysRegTuple(MachineBasicBl } } +void AArch64InstrInfo::copyGPRRegTuple(MachineBasicBlock &MBB, + MachineBasicBlock::iterator I, + DebugLoc DL, unsigned DestReg, + unsigned SrcReg, bool KillSrc, + unsigned Opcode, unsigned ZeroReg, + llvm::ArrayRef Indices) const { + const TargetRegisterInfo *TRI = &getRegisterInfo(); + unsigned NumRegs = Indices.size(); + +#ifndef NDEBUG + uint16_t DestEncoding = TRI->getEncodingValue(DestReg); + uint16_t SrcEncoding = TRI->getEncodingValue(SrcReg); + assert(DestEncoding % NumRegs == 0 && SrcEncoding % NumRegs == 0 && + "GPR reg sequences should not be able to overlap"); +#endif + + for (unsigned SubReg = 0; SubReg != NumRegs; ++SubReg) { + const MachineInstrBuilder MIB = BuildMI(MBB, I, DL, get(Opcode)); + AddSubReg(MIB, DestReg, Indices[SubReg], RegState::Define, TRI); + MIB.addReg(ZeroReg); + AddSubReg(MIB, SrcReg, Indices[SubReg], getKillRegState(KillSrc), TRI); + MIB.addImm(0); + } +} + void AArch64InstrInfo::copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, unsigned DestReg, @@ -2428,6 +2453,22 @@ void AArch64InstrInfo::copyPhysReg(MachineBasicBlock & static const unsigned Indices[] = {AArch64::qsub0, AArch64::qsub1}; copyPhysRegTuple(MBB, I, DL, DestReg, SrcReg, KillSrc, AArch64::ORRv16i8, Indices); + return; + } + + if (AArch64::XSeqPairsClassRegClass.contains(DestReg) && + AArch64::XSeqPairsClassRegClass.contains(SrcReg)) { + static const unsigned Indices[] = {AArch64::sube64, AArch64::subo64}; + copyGPRRegTuple(MBB, I, DL, DestReg, SrcReg, KillSrc, AArch64::ORRXrs, + AArch64::XZR, Indices); + return; + } + + if (AArch64::WSeqPairsClassRegClass.contains(DestReg) && + AArch64::WSeqPairsClassRegClass.contains(SrcReg)) { + static const unsigned Indices[] = {AArch64::sube32, AArch64::subo32}; + copyGPRRegTuple(MBB, I, DL, DestReg, SrcReg, KillSrc, AArch64::ORRWrs, + AArch64::WZR, Indices); return; } Modified: vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64InstrInfo.h ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64InstrInfo.h Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64InstrInfo.h Fri Feb 15 20:48:51 2019 (r344166) @@ -122,6 +122,10 @@ class AArch64InstrInfo final : public AArch64GenInstrI const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, bool KillSrc, unsigned Opcode, llvm::ArrayRef Indices) const; + void copyGPRRegTuple(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, + DebugLoc DL, unsigned DestReg, unsigned SrcReg, + bool KillSrc, unsigned Opcode, unsigned ZeroReg, + llvm::ArrayRef Indices) const; void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const override; Modified: vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64RegisterInfo.td ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64RegisterInfo.td Fri Feb 15 20:46:03 2019 (r344165) +++ vendor/llvm/dist-release_80/lib/Target/AArch64/AArch64RegisterInfo.td Fri Feb 15 20:48:51 2019 (r344166) @@ -649,10 +649,12 @@ def FPR128Op : RegisterOperand // ARMv8.1a atomic CASP register operands -def WSeqPairs : RegisterTuples<[sube32, subo32], - [(rotl GPR32, 0), (rotl GPR32, 1)]>; -def XSeqPairs : RegisterTuples<[sube64, subo64], - [(rotl GPR64, 0), (rotl GPR64, 1)]>; +def WSeqPairs : RegisterTuples<[sube32, subo32], + [(decimate (rotl GPR32, 0), 2), + (decimate (rotl GPR32, 1), 2)]>; +def XSeqPairs : RegisterTuples<[sube64, subo64], + [(decimate (rotl GPR64, 0), 2), + (decimate (rotl GPR64, 1), 2)]>; def WSeqPairsClass : RegisterClass<"AArch64", [untyped], 32, (add WSeqPairs)>{ Modified: vendor/llvm/dist-release_80/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp ============================================================================== --- vendor/llvm/dist-release_80/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp Fri Feb 15 20:46:03 2019 (r344165) *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***