From owner-svn-src-stable@freebsd.org Tue Dec 26 14:44:07 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1586BE935B2; Tue, 26 Dec 2017 14:44:07 +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 mx1.freebsd.org (Postfix) with ESMTPS id 92E9D77E3E; Tue, 26 Dec 2017 14:44:06 +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 vBQEi5St030033; Tue, 26 Dec 2017 14:44:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBQEi3ob030006; Tue, 26 Dec 2017 14:44:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712261444.vBQEi3ob030006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 26 Dec 2017 14:44:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327204 - in stable/11: . contrib/libc++/include contrib/llvm/include/llvm/Analysis contrib/llvm/include/llvm/CodeGen contrib/llvm/include/llvm/IR contrib/llvm/include/llvm/Support cont... X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable/11: . contrib/libc++/include contrib/llvm/include/llvm/Analysis contrib/llvm/include/llvm/CodeGen contrib/llvm/include/llvm/IR contrib/llvm/include/llvm/Support contrib/llvm/lib/AsmParser co... X-SVN-Commit-Revision: 327204 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Dec 2017 14:44:07 -0000 Author: dim Date: Tue Dec 26 14:44:02 2017 New Revision: 327204 URL: https://svnweb.freebsd.org/changeset/base/327204 Log: MFC r326496: Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the upstream release_50 branch. This corresponds to 5.0.1 rc2. MFC r326831: Pull in r315334 from upstream lld trunk (by Rafael Espindola): Don't create a dummy __tls_get_addr. We just don't need one with the current setup. We only error on undefined references that are used by some relocation. If we managed to relax all uses of __tls_get_addr, no relocation uses it and we don't produce an error. This is less code and fixes the case were we fail to relax. Before we would produce a broken output, but now we produce an error. Pull in r320390 from upstream lld trunk (by Rafael Espindola): Create reserved symbols early so they can be versioned. This fixes pr35570. We were creating these symbols after parsing version scripts, so they could not be versioned. We cannot move the version script parsing later because we need it for lto. One option is to move both addReservedSymbols and createSyntheticSections earlier. The disadvantage is that some sections created by createSyntheticSections replace other input sections. For example, gdb index replaces .debug_gnu_pubnames, so it wants to run after gc sections so that it can set S->Live to false. What this patch does instead is to move just the ElfHeader creation early. Pull in r320412 from upstream lld trunk (by Rafael Espindola): Handle symbols pointing to output sections. Now that gc sections runs after linker defined symbols are added it can see symbols that point to an OutputSection. Should fix a bot failure. Pull in r320431 from upstream lld trunk (by Peter Collingbourne): ELF: Do not follow relocation edges to output sections during GC. This fixes an assertion error introduced by r320390. Differential Revision: https://reviews.llvm.org/D41095 Together these fix handling of reserved symbols, in particular _end, which is needed to make brk(2) and sbrk(2) work correctly. This unbreaks the emacs ports on amd64, and also appears to unbreak most of world on i386. Differential Revision: https://reviews.freebsd.org/D13466 MFC r326879 (by emaste): lld: Simplify a boolean expression by De Morgan's laws. Cherry-pick lld r315653 by Rui Ueyama: I don't really understand what exactly this expression means, but at least I can mechanically transform it. Obtained from: LLVM r315653 MFC r326897 (by emaste): lld: Slightly simplify code and add comment. Cherry-pick lld r315658 by Rui Ueyama: This is not a mechanical transformation. Even though I believe this patch is correct, I'm not 100% sure if lld with this patch behaves exactly the same way as before on all edge cases. At least all tests still pass. I'm submitting this patch because it took almost a day to understand this function, and I don't want to lose it. This fixes jemalloc assertion failures observed at startup with i386 binaries and an lld-linked libc.so. Reviewed by: dim Obtained from: LLVM r315658 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13503 MFC r326909: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 5.0.1 release (upstream r320880). Relnotes: yes MFC r326957 (by emaste): lld: Don't write preemptible symbol values to the .got. It is not necessary and matches what bfd and gold do. This was a regression from [LLVM] r315658. Obtained from: LLVM r321023 by Rafael EspĂ­ndola Modified: stable/11/ObsoleteFiles.inc stable/11/contrib/libc++/include/algorithm stable/11/contrib/libc++/include/deque stable/11/contrib/libc++/include/functional stable/11/contrib/libc++/include/list stable/11/contrib/libc++/include/string stable/11/contrib/libc++/include/type_traits stable/11/contrib/libc++/include/vector stable/11/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h stable/11/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h stable/11/contrib/llvm/include/llvm/IR/AutoUpgrade.h stable/11/contrib/llvm/include/llvm/Support/FormatVariadic.h stable/11/contrib/llvm/lib/AsmParser/LLParser.cpp stable/11/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp stable/11/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp stable/11/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp stable/11/contrib/llvm/lib/CodeGen/MachineVerifier.cpp stable/11/contrib/llvm/lib/IR/AutoUpgrade.cpp stable/11/contrib/llvm/lib/IR/ConstantFold.cpp stable/11/contrib/llvm/lib/Linker/IRMover.cpp stable/11/contrib/llvm/lib/Linker/LinkModules.cpp stable/11/contrib/llvm/lib/Support/Host.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp stable/11/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td stable/11/contrib/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMCallLowering.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td stable/11/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp stable/11/contrib/llvm/lib/Target/ARM/ARMSubtarget.h stable/11/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp stable/11/contrib/llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp stable/11/contrib/llvm/lib/Target/AVR/AVRISelLowering.cpp stable/11/contrib/llvm/lib/Target/AVR/AVRISelLowering.h stable/11/contrib/llvm/lib/Target/AVR/AVRInstrInfo.cpp stable/11/contrib/llvm/lib/Target/AVR/AVRInstrInfo.h stable/11/contrib/llvm/lib/Target/AVR/AVRInstrInfo.td stable/11/contrib/llvm/lib/Target/AVR/AVRRegisterInfo.cpp stable/11/contrib/llvm/lib/Target/AVR/AVRTargetMachine.cpp stable/11/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.cpp stable/11/contrib/llvm/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.h stable/11/contrib/llvm/lib/Target/BPF/BPFISelLowering.cpp stable/11/contrib/llvm/lib/Target/BPF/BPFInstrInfo.td stable/11/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp stable/11/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp stable/11/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp stable/11/contrib/llvm/lib/Target/Mips/MicroMipsDSPInstrInfo.td stable/11/contrib/llvm/lib/Target/Mips/MipsDSPInstrInfo.td stable/11/contrib/llvm/lib/Target/Mips/MipsFrameLowering.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsMTInstrFormats.td stable/11/contrib/llvm/lib/Target/Mips/MipsMTInstrInfo.td stable/11/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp stable/11/contrib/llvm/lib/Target/Mips/MipsSchedule.td stable/11/contrib/llvm/lib/Target/Mips/MipsScheduleGeneric.td stable/11/contrib/llvm/lib/Target/Mips/MipsTargetStreamer.h stable/11/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp stable/11/contrib/llvm/lib/Transforms/Scalar/NewGVN.cpp stable/11/contrib/llvm/tools/clang/include/clang/Basic/Attr.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/AttrDocs.td stable/11/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def stable/11/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td stable/11/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Targets.cpp stable/11/contrib/llvm/tools/clang/lib/Basic/Version.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.h stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp stable/11/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/BareMetal.cpp stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/BareMetal.h stable/11/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp stable/11/contrib/llvm/tools/clang/lib/Format/Format.cpp stable/11/contrib/llvm/tools/clang/lib/Headers/avx512fintrin.h stable/11/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp stable/11/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp stable/11/contrib/llvm/tools/lld/ELF/Driver.cpp stable/11/contrib/llvm/tools/lld/ELF/MarkLive.cpp stable/11/contrib/llvm/tools/lld/ELF/Relocations.cpp stable/11/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp stable/11/contrib/llvm/tools/lld/ELF/SyntheticSections.h stable/11/contrib/llvm/tools/lld/ELF/Writer.cpp stable/11/contrib/llvm/tools/lld/ELF/Writer.h stable/11/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler.h stable/11/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp stable/11/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp stable/11/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86.cpp stable/11/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp stable/11/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp stable/11/contrib/llvm/tools/lldb/source/Expression/IRExecutionUnit.cpp stable/11/etc/mtree/BSD.debug.dist stable/11/etc/mtree/BSD.usr.dist stable/11/lib/clang/headers/Makefile stable/11/lib/clang/include/clang/Basic/Version.inc stable/11/lib/clang/include/clang/Config/config.h stable/11/lib/clang/include/lld/Config/Version.inc stable/11/lib/clang/include/llvm/Config/config.h stable/11/lib/clang/include/llvm/Config/llvm-config.h stable/11/lib/clang/include/llvm/Support/VCSRevision.h stable/11/lib/libclang_rt/Makefile.inc stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/ObsoleteFiles.inc Tue Dec 26 14:44:02 2017 (r327204) @@ -38,6 +38,123 @@ # xargs -n1 | sort | uniq -d; # done +# 20171226: new clang import which bumps version from 5.0.0 to 5.0.1. +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/esan_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/lsan_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/msan_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/tsan_interface.h +OLD_FILES+=usr/lib/clang/5.0.0/include/sanitizer/tsan_interface_atomic.h +OLD_DIRS+=usr/lib/clang/5.0.0/include/sanitizer +OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_builtin_vars.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_cmath.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_complex_builtins.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_intrinsics.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_math_forward_declares.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__clang_cuda_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__stddef_max_align_t.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__wmmintrin_aes.h +OLD_FILES+=usr/lib/clang/5.0.0/include/__wmmintrin_pclmul.h +OLD_FILES+=usr/lib/clang/5.0.0/include/adxintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/altivec.h +OLD_FILES+=usr/lib/clang/5.0.0/include/ammintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/arm_acle.h +OLD_FILES+=usr/lib/clang/5.0.0/include/arm_neon.h +OLD_FILES+=usr/lib/clang/5.0.0/include/armintr.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx2intrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512bwintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512cdintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512dqintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512erintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512fintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512ifmaintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512ifmavlintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512pfintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vbmiintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vbmivlintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vlbwintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vlcdintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vldqintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vlintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avx512vpopcntdqintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/avxintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/bmi2intrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/bmiintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/clflushoptintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/clzerointrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/cpuid.h +OLD_FILES+=usr/lib/clang/5.0.0/include/emmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/f16cintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/fma4intrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/fmaintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/fxsrintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/htmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/htmxlintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/ia32intrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/immintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/lwpintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/lzcntintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/mm3dnow.h +OLD_FILES+=usr/lib/clang/5.0.0/include/mm_malloc.h +OLD_FILES+=usr/lib/clang/5.0.0/include/mmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/module.modulemap +OLD_FILES+=usr/lib/clang/5.0.0/include/msa.h +OLD_FILES+=usr/lib/clang/5.0.0/include/mwaitxintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/nmmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/opencl-c.h +OLD_FILES+=usr/lib/clang/5.0.0/include/pkuintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/pmmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/popcntintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/prfchwintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/rdseedintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/rtmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/s390intrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/shaintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/smmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/tbmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/tmmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/vadefs.h +OLD_FILES+=usr/lib/clang/5.0.0/include/vecintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/wmmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/x86intrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xmmintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xopintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xsavecintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xsaveintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xsaveoptintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xsavesintrin.h +OLD_FILES+=usr/lib/clang/5.0.0/include/xtestintrin.h +OLD_DIRS+=usr/lib/clang/5.0.0/include +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan-x86_64.so +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-armhf.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/5.0.0/lib/freebsd +OLD_DIRS+=usr/lib/clang/5.0.0/lib +OLD_DIRS+=usr/lib/clang/5.0.0 # 20171204: Move fdformat man page from volume 1 to volume 8. OLD_FILES+=usr/share/man/man1/fdformat.1.gz # 20170926: new clang import which bumps version from 4.0.0 to 5.0.0. Modified: stable/11/contrib/libc++/include/algorithm ============================================================================== --- stable/11/contrib/libc++/include/algorithm Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/libc++/include/algorithm Tue Dec 26 14:44:02 2017 (r327204) @@ -3013,6 +3013,7 @@ template _UIntType __independent_bits_engine<_Engine, _UIntType>::__eval(true_type) { + const size_t _WRt = numeric_limits::digits; result_type _Sp = 0; for (size_t __k = 0; __k < __n0_; ++__k) { @@ -3021,7 +3022,7 @@ __independent_bits_engine<_Engine, _UIntType>::__eval( { __u = __e_() - _Engine::min(); } while (__u >= __y0_); - if (__w0_ < _WDt) + if (__w0_ < _WRt) _Sp <<= __w0_; else _Sp = 0; @@ -3034,7 +3035,7 @@ __independent_bits_engine<_Engine, _UIntType>::__eval( { __u = __e_() - _Engine::min(); } while (__u >= __y1_); - if (__w0_ < _WDt - 1) + if (__w0_ < _WRt - 1) _Sp <<= __w0_ + 1; else _Sp = 0; Modified: stable/11/contrib/libc++/include/deque ============================================================================== --- stable/11/contrib/libc++/include/deque Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/libc++/include/deque Tue Dec 26 14:44:02 2017 (r327204) @@ -1356,7 +1356,6 @@ class _LIBCPP_TEMPLATE_VIS deque (public) iterator insert(const_iterator __p, initializer_list __il) {return insert(__p, __il.begin(), __il.end());} #endif // _LIBCPP_CXX03_LANG - iterator insert(const_iterator __p, const value_type& __v); iterator insert(const_iterator __p, size_type __n, const value_type& __v); template @@ -2224,7 +2223,11 @@ deque<_Tp, _Allocator>::__append(_InpIter __f, _InpIte !__is_forward_iterator<_InpIter>::value>::type*) { for (; __f != __l; ++__f) +#ifdef _LIBCPP_CXX03_LANG push_back(*__f); +#else + emplace_back(*__f); +#endif } template Modified: stable/11/contrib/libc++/include/functional ============================================================================== --- stable/11/contrib/libc++/include/functional Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/libc++/include/functional Tue Dec 26 14:44:02 2017 (r327204) @@ -1597,9 +1597,11 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)> return reinterpret_cast<__base*>(p); } - template ::value && - __invokable<_Fp&, _ArgTypes...>::value> - struct __callable; + template , function>::value>, + __invokable<_Fp&, _ArgTypes...> + >::value> + struct __callable; template struct __callable<_Fp, true> { @@ -1612,6 +1614,9 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)> { static const bool value = false; }; + + template + using _EnableIfCallable = typename enable_if<__callable<_Fp>::value>::type; public: typedef _Rp result_type; @@ -1622,9 +1627,7 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)> function(nullptr_t) _NOEXCEPT : __f_(0) {} function(const function&); function(function&&) _NOEXCEPT; - template::value && !is_same<_Fp, function>::value - >::type> + template> function(_Fp); #if _LIBCPP_STD_VER <= 14 @@ -1638,21 +1641,15 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)> function(allocator_arg_t, const _Alloc&, const function&); template function(allocator_arg_t, const _Alloc&, function&&); - template::value>::type> + template> function(allocator_arg_t, const _Alloc& __a, _Fp __f); #endif function& operator=(const function&); function& operator=(function&&) _NOEXCEPT; function& operator=(nullptr_t) _NOEXCEPT; - template - typename enable_if - < - __callable::type>::value && - !is_same::type, function>::value, - function& - >::type - operator=(_Fp&&); + template> + function& operator=(_Fp&&); ~function(); @@ -1854,13 +1851,8 @@ function<_Rp(_ArgTypes...)>::operator=(nullptr_t) _NOE } template -template -typename enable_if -< - function<_Rp(_ArgTypes...)>::template __callable::type>::value && - !is_same::type, function<_Rp(_ArgTypes...)>>::value, - function<_Rp(_ArgTypes...)>& ->::type +template +function<_Rp(_ArgTypes...)>& function<_Rp(_ArgTypes...)>::operator=(_Fp&& __f) { function(_VSTD::forward<_Fp>(__f)).swap(*this); Modified: stable/11/contrib/libc++/include/list ============================================================================== --- stable/11/contrib/libc++/include/list Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/libc++/include/list Tue Dec 26 14:44:02 2017 (r327204) @@ -992,6 +992,15 @@ class _LIBCPP_TEMPLATE_VIS list (public) void push_front(const value_type& __x); void push_back(const value_type& __x); +#ifndef _LIBCPP_CXX03_LANG + template + _LIBCPP_INLINE_VISIBILITY + void __emplace_back(_Arg&& __arg) { emplace_back(_VSTD::forward<_Arg>(__arg)); } +#else + _LIBCPP_INLINE_VISIBILITY + void __emplace_back(value_type const& __arg) { push_back(__arg); } +#endif + iterator insert(const_iterator __p, const value_type& __x); iterator insert(const_iterator __p, size_type __n, const value_type& __x); template @@ -1189,7 +1198,7 @@ list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l, __get_db()->__insert_c(this); #endif for (; __f != __l; ++__f) - push_back(*__f); + __emplace_back(*__f); } template @@ -1202,7 +1211,7 @@ list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l, co __get_db()->__insert_c(this); #endif for (; __f != __l; ++__f) - push_back(*__f); + __emplace_back(*__f); } template Modified: stable/11/contrib/libc++/include/string ============================================================================== --- stable/11/contrib/libc++/include/string Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/libc++/include/string Tue Dec 26 14:44:02 2017 (r327204) @@ -259,7 +259,7 @@ class basic_string (public) size_type find(value_type c, size_type pos = 0) const noexcept; size_type rfind(const basic_string& str, size_type pos = npos) const noexcept; - size_type ffind(basic_string_view sv, size_type pos = 0) const noexcept; + size_type rfind(basic_string_view sv, size_type pos = npos) const noexcept; size_type rfind(const value_type* s, size_type pos, size_type n) const noexcept; size_type rfind(const value_type* s, size_type pos = npos) const noexcept; size_type rfind(value_type c, size_type pos = npos) const noexcept; @@ -271,7 +271,7 @@ class basic_string (public) size_type find_first_of(value_type c, size_type pos = 0) const noexcept; size_type find_last_of(const basic_string& str, size_type pos = npos) const noexcept; - size_type find_last_of(basic_string_view sv, size_type pos = 0) const noexcept; + size_type find_last_of(basic_string_view sv, size_type pos = npos) const noexcept; size_type find_last_of(const value_type* s, size_type pos, size_type n) const noexcept; size_type find_last_of(const value_type* s, size_type pos = npos) const noexcept; size_type find_last_of(value_type c, size_type pos = npos) const noexcept; @@ -283,7 +283,7 @@ class basic_string (public) size_type find_first_not_of(value_type c, size_type pos = 0) const noexcept; size_type find_last_not_of(const basic_string& str, size_type pos = npos) const noexcept; - size_type find_last_not_of(basic_string_view sv, size_type pos = 0) const noexcept; + size_type find_last_not_of(basic_string_view sv, size_type pos = npos) const noexcept; size_type find_last_not_of(const value_type* s, size_type pos, size_type n) const noexcept; size_type find_last_not_of(const value_type* s, size_type pos = npos) const noexcept; size_type find_last_not_of(value_type c, size_type pos = npos) const noexcept; @@ -1147,7 +1147,7 @@ class _LIBCPP_TEMPLATE_VIS basic_string (public) _LIBCPP_INLINE_VISIBILITY size_type rfind(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY - size_type rfind(__self_view __sv, size_type __pos = 0) const _NOEXCEPT; + size_type rfind(__self_view __sv, size_type __pos = npos) const _NOEXCEPT; size_type rfind(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY size_type rfind(const value_type* __s, size_type __pos = npos) const _NOEXCEPT; @@ -1166,7 +1166,7 @@ class _LIBCPP_TEMPLATE_VIS basic_string (public) _LIBCPP_INLINE_VISIBILITY size_type find_last_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY - size_type find_last_of(__self_view __sv, size_type __pos = 0) const _NOEXCEPT; + size_type find_last_of(__self_view __sv, size_type __pos = npos) const _NOEXCEPT; size_type find_last_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY size_type find_last_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT; @@ -1186,7 +1186,7 @@ class _LIBCPP_TEMPLATE_VIS basic_string (public) _LIBCPP_INLINE_VISIBILITY size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY - size_type find_last_not_of(__self_view __sv, size_type __pos = 0) const _NOEXCEPT; + size_type find_last_not_of(__self_view __sv, size_type __pos = npos) const _NOEXCEPT; size_type find_last_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY size_type find_last_not_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT; Modified: stable/11/contrib/libc++/include/type_traits ============================================================================== --- stable/11/contrib/libc++/include/type_traits Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/libc++/include/type_traits Tue Dec 26 14:44:02 2017 (r327204) @@ -4339,8 +4339,8 @@ struct __invokable_r using _Result = decltype( _VSTD::__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...)); - static const bool value = - conditional< + using type = + typename conditional< !is_same<_Result, __nat>::value, typename conditional< is_void<_Ret>::value, @@ -4348,7 +4348,8 @@ struct __invokable_r is_convertible<_Result, _Ret> >::type, false_type - >::type::value; + >::type; + static const bool value = type::value; }; template Modified: stable/11/contrib/libc++/include/vector ============================================================================== --- stable/11/contrib/libc++/include/vector Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/libc++/include/vector Tue Dec 26 14:44:02 2017 (r327204) @@ -674,6 +674,17 @@ class _LIBCPP_TEMPLATE_VIS vector (public) const value_type* data() const _NOEXCEPT {return _VSTD::__to_raw_pointer(this->__begin_);} +#ifdef _LIBCPP_CXX03_LANG + _LIBCPP_INLINE_VISIBILITY + void __emplace_back(const value_type& __x) { push_back(__x); } +#else + template + _LIBCPP_INLINE_VISIBILITY + void __emplace_back(_Arg&& __arg) { + emplace_back(_VSTD::forward<_Arg>(__arg)); + } +#endif + _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x); #ifndef _LIBCPP_CXX03_LANG @@ -1128,7 +1139,7 @@ vector<_Tp, _Allocator>::vector(_InputIterator __first __get_db()->__insert_c(this); #endif for (; __first != __last; ++__first) - push_back(*__first); + __emplace_back(*__first); } template @@ -1145,7 +1156,7 @@ vector<_Tp, _Allocator>::vector(_InputIterator __first __get_db()->__insert_c(this); #endif for (; __first != __last; ++__first) - push_back(*__first); + __emplace_back(*__first); } template @@ -1365,7 +1376,7 @@ vector<_Tp, _Allocator>::assign(_InputIterator __first { clear(); for (; __first != __last; ++__first) - push_back(*__first); + __emplace_back(*__first); } template Modified: stable/11/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h ============================================================================== --- stable/11/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h Tue Dec 26 14:44:02 2017 (r327204) @@ -652,6 +652,12 @@ class TargetTransformInfoImplCRTPBase : public TargetT auto GTI = gep_type_begin(PointeeType, Operands); Type *TargetType; + + // Handle the case where the GEP instruction has a single operand, + // the basis, therefore TargetType is a nullptr. + if (Operands.empty()) + return !BaseGV ? TTI::TCC_Free : TTI::TCC_Basic; + for (auto I = Operands.begin(); I != Operands.end(); ++I, ++GTI) { TargetType = GTI.getIndexedType(); // We assume that the cost of Scalar GEP with constant index and the Modified: stable/11/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h ============================================================================== --- stable/11/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h Tue Dec 26 14:44:02 2017 (r327204) @@ -807,6 +807,14 @@ class MachineRegisterInfo { (public) return getReservedRegs().test(PhysReg); } + /// Returns true when the given register unit is considered reserved. + /// + /// Register units are considered reserved when for at least one of their + /// root registers, the root register and all super registers are reserved. + /// This currently iterates the register hierarchy and may be slower than + /// expected. + bool isReservedRegUnit(unsigned Unit) const; + /// isAllocatable - Returns true when PhysReg belongs to an allocatable /// register class and it hasn't been reserved. /// Modified: stable/11/contrib/llvm/include/llvm/IR/AutoUpgrade.h ============================================================================== --- stable/11/contrib/llvm/include/llvm/IR/AutoUpgrade.h Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/include/llvm/IR/AutoUpgrade.h Tue Dec 26 14:44:02 2017 (r327204) @@ -51,6 +51,8 @@ namespace llvm { /// module is modified. bool UpgradeModuleFlags(Module &M); + void UpgradeSectionAttributes(Module &M); + /// If the given TBAA tag uses the scalar TBAA format, create a new node /// corresponding to the upgrade to the struct-path aware TBAA format. /// Otherwise return the \p TBAANode itself. Modified: stable/11/contrib/llvm/include/llvm/Support/FormatVariadic.h ============================================================================== --- stable/11/contrib/llvm/include/llvm/Support/FormatVariadic.h Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/include/llvm/Support/FormatVariadic.h Tue Dec 26 14:44:02 2017 (r327204) @@ -94,6 +94,15 @@ class formatv_object_base { (public) Adapters.reserve(ParamCount); } + formatv_object_base(formatv_object_base const &rhs) = delete; + + formatv_object_base(formatv_object_base &&rhs) + : Fmt(std::move(rhs.Fmt)), + Adapters(), // Adapters are initialized by formatv_object + Replacements(std::move(rhs.Replacements)) { + Adapters.reserve(rhs.Adapters.size()); + }; + void format(raw_ostream &S) const { for (auto &R : Replacements) { if (R.Type == ReplacementType::Empty) @@ -147,6 +156,14 @@ template class formatv_object : publi formatv_object(StringRef Fmt, Tuple &&Params) : formatv_object_base(Fmt, std::tuple_size::value), Parameters(std::move(Params)) { + Adapters = apply_tuple(create_adapters(), Parameters); + } + + formatv_object(formatv_object const &rhs) = delete; + + formatv_object(formatv_object &&rhs) + : formatv_object_base(std::move(rhs)), + Parameters(std::move(rhs.Parameters)) { Adapters = apply_tuple(create_adapters(), Parameters); } }; Modified: stable/11/contrib/llvm/lib/AsmParser/LLParser.cpp ============================================================================== --- stable/11/contrib/llvm/lib/AsmParser/LLParser.cpp Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/AsmParser/LLParser.cpp Tue Dec 26 14:44:02 2017 (r327204) @@ -240,6 +240,7 @@ bool LLParser::ValidateEndOfModule() { UpgradeDebugInfo(*M); UpgradeModuleFlags(*M); + UpgradeSectionAttributes(*M); if (!Slots) return false; Modified: stable/11/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp Tue Dec 26 14:44:02 2017 (r327204) @@ -264,7 +264,7 @@ Expected hasObjCCategoryInModule(BitstreamCursor if (convertToString(Record, 0, S)) return error("Invalid record"); // Check for the i386 and other (x86_64, ARM) conventions - if (S.find("__DATA, __objc_catlist") != std::string::npos || + if (S.find("__DATA,__objc_catlist") != std::string::npos || S.find("__OBJC,__category") != std::string::npos) return true; break; Modified: stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp ============================================================================== --- stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Tue Dec 26 14:44:02 2017 (r327204) @@ -621,6 +621,7 @@ void DwarfCompileUnit::constructAbstractSubprogramScop auto *SP = cast(Scope->getScopeNode()); DIE *ContextDIE; + DwarfCompileUnit *ContextCU = this; if (includeMinimalInlineScopes()) ContextDIE = &getUnitDie(); @@ -631,18 +632,23 @@ void DwarfCompileUnit::constructAbstractSubprogramScop else if (auto *SPDecl = SP->getDeclaration()) { ContextDIE = &getUnitDie(); getOrCreateSubprogramDIE(SPDecl); - } else + } else { ContextDIE = getOrCreateContextDIE(resolve(SP->getScope())); + // The scope may be shared with a subprogram that has already been + // constructed in another CU, in which case we need to construct this + // subprogram in the same CU. + ContextCU = DD->lookupCU(ContextDIE->getUnitDie()); + } // Passing null as the associated node because the abstract definition // shouldn't be found by lookup. - AbsDef = &createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE, nullptr); - applySubprogramAttributesToDefinition(SP, *AbsDef); + AbsDef = &ContextCU->createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE, nullptr); + ContextCU->applySubprogramAttributesToDefinition(SP, *AbsDef); - if (!includeMinimalInlineScopes()) - addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined); - if (DIE *ObjectPointer = createAndAddScopeChildren(Scope, *AbsDef)) - addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer); + if (!ContextCU->includeMinimalInlineScopes()) + ContextCU->addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined); + if (DIE *ObjectPointer = ContextCU->createAndAddScopeChildren(Scope, *AbsDef)) + ContextCU->addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer); } DIE *DwarfCompileUnit::constructImportedEntityDIE( Modified: stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h ============================================================================== --- stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h Tue Dec 26 14:44:02 2017 (r327204) @@ -283,7 +283,7 @@ class DwarfDebug : public DebugHandlerBase { // 0, referencing the comp_dir of all the type units that use it. MCDwarfDwoLineTable SplitTypeUnitFileTable; /// @} - + /// True iff there are multiple CUs in this module. bool SingleCU; bool IsDarwin; @@ -562,6 +562,9 @@ class DwarfDebug : public DebugHandlerBase { bool isLexicalScopeDIENull(LexicalScope *Scope); bool hasDwarfPubSections(bool includeMinimalInlineScopes) const; + + /// Find the matching DwarfCompileUnit for the given CU DIE. + DwarfCompileUnit *lookupCU(const DIE *Die) { return CUDieMap.lookup(Die); } }; } // End of namespace llvm Modified: stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp ============================================================================== --- stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp Tue Dec 26 14:44:02 2017 (r327204) @@ -131,13 +131,12 @@ bool DwarfExpression::addMachineReg(const TargetRegist // Intersection between the bits we already emitted and the bits // covered by this subregister. - SmallBitVector Intersection(RegSize, false); - Intersection.set(Offset, Offset + Size); - Intersection ^= Coverage; + SmallBitVector CurSubReg(RegSize, false); + CurSubReg.set(Offset, Offset + Size); // If this sub-register has a DWARF number and we haven't covered // its range, emit a DWARF piece for it. - if (Reg >= 0 && Intersection.any()) { + if (Reg >= 0 && CurSubReg.test(Coverage)) { // Emit a piece for any gap in the coverage. if (Offset > CurPos) DwarfRegs.push_back({-1, Offset - CurPos, nullptr}); Modified: stable/11/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp ============================================================================== --- stable/11/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Dec 26 14:44:02 2017 (r327204) @@ -269,8 +269,9 @@ void LiveIntervals::computeRegUnitRange(LiveRange &LR, // may share super-registers. That's OK because createDeadDefs() is // idempotent. It is very rare for a register unit to have multiple roots, so // uniquing super-registers is probably not worthwhile. - bool IsReserved = true; + bool IsReserved = false; for (MCRegUnitRootIterator Root(Unit, TRI); Root.isValid(); ++Root) { + bool IsRootReserved = true; for (MCSuperRegIterator Super(*Root, TRI, /*IncludeSelf=*/true); Super.isValid(); ++Super) { unsigned Reg = *Super; @@ -279,9 +280,12 @@ void LiveIntervals::computeRegUnitRange(LiveRange &LR, // A register unit is considered reserved if all its roots and all their // super registers are reserved. if (!MRI->isReserved(Reg)) - IsReserved = false; + IsRootReserved = false; } + IsReserved |= IsRootReserved; } + assert(IsReserved == MRI->isReservedRegUnit(Unit) && + "reserved computation mismatch"); // Now extend LR to reach all uses. // Ignore uses of reserved registers. We only track defs of those. @@ -924,7 +928,7 @@ class LiveIntervals::HMEditor { (public) // kill flags. This is wasteful. Eventually, LiveVariables will strip all kill // flags, and postRA passes will use a live register utility instead. LiveRange *getRegUnitLI(unsigned Unit) { - if (UpdateFlags) + if (UpdateFlags && !MRI.isReservedRegUnit(Unit)) return &LIS.getRegUnit(Unit); return LIS.getCachedRegUnit(Unit); } Modified: stable/11/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp ============================================================================== --- stable/11/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp Tue Dec 26 14:44:02 2017 (r327204) @@ -601,3 +601,21 @@ void MachineRegisterInfo::setCalleeSavedRegs(ArrayRef< UpdatedCSRs.push_back(0); IsUpdatedCSRsInitialized = true; } + +bool MachineRegisterInfo::isReservedRegUnit(unsigned Unit) const { + const TargetRegisterInfo *TRI = getTargetRegisterInfo(); + for (MCRegUnitRootIterator Root(Unit, TRI); Root.isValid(); ++Root) { + bool IsRootReserved = true; + for (MCSuperRegIterator Super(*Root, TRI, /*IncludeSelf=*/true); + Super.isValid(); ++Super) { + unsigned Reg = *Super; + if (!isReserved(Reg)) { + IsRootReserved = false; + break; + } + } + if (IsRootReserved) + return true; + } + return false; +} Modified: stable/11/contrib/llvm/lib/CodeGen/MachineVerifier.cpp ============================================================================== --- stable/11/contrib/llvm/lib/CodeGen/MachineVerifier.cpp Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/CodeGen/MachineVerifier.cpp Tue Dec 26 14:44:02 2017 (r327204) @@ -1316,6 +1316,8 @@ void MachineVerifier::checkLiveness(const MachineOpera // Check the cached regunit intervals. if (TargetRegisterInfo::isPhysicalRegister(Reg) && !isReserved(Reg)) { for (MCRegUnitIterator Units(Reg, TRI); Units.isValid(); ++Units) { + if (MRI->isReservedRegUnit(*Units)) + continue; if (const LiveRange *LR = LiveInts->getCachedRegUnit(*Units)) checkLivenessAtUse(MO, MONum, UseIdx, *LR, *Units); } Modified: stable/11/contrib/llvm/lib/IR/AutoUpgrade.cpp ============================================================================== --- stable/11/contrib/llvm/lib/IR/AutoUpgrade.cpp Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/IR/AutoUpgrade.cpp Tue Dec 26 14:44:02 2017 (r327204) @@ -2271,6 +2271,24 @@ bool llvm::UpgradeModuleFlags(Module &M) { } } } + // Upgrade Objective-C Image Info Section. Removed the whitespce in the + // section name so that llvm-lto will not complain about mismatching + // module flags that is functionally the same. + if (ID->getString() == "Objective-C Image Info Section") { + if (auto *Value = dyn_cast_or_null(Op->getOperand(2))) { + SmallVector ValueComp; + Value->getString().split(ValueComp, " "); + if (ValueComp.size() != 1) { + std::string NewValue; + for (auto &S : ValueComp) + NewValue += S.str(); + Metadata *Ops[3] = {Op->getOperand(0), Op->getOperand(1), + MDString::get(M.getContext(), NewValue)}; + ModFlags->setOperand(I, MDNode::get(M.getContext(), Ops)); + Changed = true; + } + } + } } // "Objective-C Class Properties" is recently added for Objective-C. We @@ -2285,6 +2303,35 @@ bool llvm::UpgradeModuleFlags(Module &M) { } return Changed; +} + +void llvm::UpgradeSectionAttributes(Module &M) { + auto TrimSpaces = [](StringRef Section) -> std::string { + SmallVector Components; + Section.split(Components, ','); + + SmallString<32> Buffer; + raw_svector_ostream OS(Buffer); + + for (auto Component : Components) + OS << ',' << Component.trim(); + + return OS.str().substr(1); + }; + + for (auto &GV : M.globals()) { + if (!GV.hasSection()) + continue; + + StringRef Section = GV.getSection(); + + if (!Section.startswith("__DATA, __objc_catlist")) + continue; + + // __DATA, __objc_catlist, regular, no_dead_strip + // __DATA,__objc_catlist,regular,no_dead_strip + GV.setSection(TrimSpaces(Section)); + } } static bool isOldLoopArgument(Metadata *MD) { Modified: stable/11/contrib/llvm/lib/IR/ConstantFold.cpp ============================================================================== --- stable/11/contrib/llvm/lib/IR/ConstantFold.cpp Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/IR/ConstantFold.cpp Tue Dec 26 14:44:02 2017 (r327204) @@ -2199,6 +2199,9 @@ Constant *llvm::ConstantFoldGetElementPtr(Type *Pointe Unknown = true; continue; } + if (!isa(Idxs[i - 1])) + // FIXME: add the support of cosntant vector index. + continue; if (InRangeIndex && i == *InRangeIndex + 1) { // If an index is marked inrange, we cannot apply this canonicalization to // the following index, as that will cause the inrange index to point to Modified: stable/11/contrib/llvm/lib/Linker/IRMover.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Linker/IRMover.cpp Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/Linker/IRMover.cpp Tue Dec 26 14:44:02 2017 (r327204) @@ -640,6 +640,10 @@ GlobalValue *IRLinker::copyGlobalValueProto(const Glob } else { if (ForDefinition) NewGV = copyGlobalAliasProto(cast(SGV)); + else if (SGV->getValueType()->isFunctionTy()) + NewGV = + Function::Create(cast(TypeMap.get(SGV->getValueType())), + GlobalValue::ExternalLinkage, SGV->getName(), &DstM); else NewGV = new GlobalVariable( DstM, TypeMap.get(SGV->getValueType()), Modified: stable/11/contrib/llvm/lib/Linker/LinkModules.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Linker/LinkModules.cpp Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/Linker/LinkModules.cpp Tue Dec 26 14:44:02 2017 (r327204) @@ -329,8 +329,18 @@ bool ModuleLinker::shouldLinkFromSource(bool &LinkFrom bool ModuleLinker::linkIfNeeded(GlobalValue &GV) { GlobalValue *DGV = getLinkedToGlobal(&GV); - if (shouldLinkOnlyNeeded() && !(DGV && DGV->isDeclaration())) - return false; + if (shouldLinkOnlyNeeded()) { + // Always import variables with appending linkage. + if (!GV.hasAppendingLinkage()) { + // Don't import globals unless they are referenced by the destination + // module. + if (!DGV) + return false; + // Don't import globals that are already defined in the destination module + if (!DGV->isDeclaration()) + return false; + } + } if (DGV && !GV.hasLocalLinkage() && !GV.hasAppendingLinkage()) { auto *DGVar = dyn_cast(DGV); Modified: stable/11/contrib/llvm/lib/Support/Host.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Support/Host.cpp Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/Support/Host.cpp Tue Dec 26 14:44:02 2017 (r327204) @@ -208,6 +208,7 @@ StringRef sys::detail::getHostCPUNameForARM( .Case("0x06f", "krait") // APQ8064 .Case("0x201", "kryo") .Case("0x205", "kryo") + .Case("0xc00", "falkor") .Default("generic"); return "generic"; Modified: stable/11/contrib/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp Tue Dec 26 14:37:47 2017 (r327203) +++ stable/11/contrib/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp Tue Dec 26 14:44:02 2017 (r327204) @@ -220,27 +220,27 @@ static Optional getLoadInfo(const MachineIns default: return None; + case AArch64::LD1i64: + case AArch64::LD2i64: + DestRegIdx = 0; + BaseRegIdx = 3; + OffsetIdx = -1; + IsPrePost = false; + break; + case AArch64::LD1i8: case AArch64::LD1i16: case AArch64::LD1i32: - case AArch64::LD1i64: case AArch64::LD2i8: case AArch64::LD2i16: case AArch64::LD2i32: - case AArch64::LD2i64: case AArch64::LD3i8: case AArch64::LD3i16: case AArch64::LD3i32: + case AArch64::LD3i64: case AArch64::LD4i8: case AArch64::LD4i16: case AArch64::LD4i32: - DestRegIdx = 0; - BaseRegIdx = 3; - OffsetIdx = -1; - IsPrePost = false; - break; - - case AArch64::LD3i64: case AArch64::LD4i64: DestRegIdx = -1; BaseRegIdx = 3; @@ -264,23 +264,16 @@ static Optional getLoadInfo(const MachineIns case AArch64::LD1Rv4s: case AArch64::LD1Rv8h: case AArch64::LD1Rv16b: - case AArch64::LD1Twov1d: - case AArch64::LD1Twov2s: - case AArch64::LD1Twov4h: - case AArch64::LD1Twov8b: - case AArch64::LD2Twov2s: - case AArch64::LD2Twov4s: - case AArch64::LD2Twov8b: - case AArch64::LD2Rv1d: - case AArch64::LD2Rv2s: - case AArch64::LD2Rv4s: - case AArch64::LD2Rv8b: DestRegIdx = 0; BaseRegIdx = 1; OffsetIdx = -1; IsPrePost = false; break; + case AArch64::LD1Twov1d: + case AArch64::LD1Twov2s: + case AArch64::LD1Twov4h: + case AArch64::LD1Twov8b: case AArch64::LD1Twov2d: case AArch64::LD1Twov4s: case AArch64::LD1Twov8h: @@ -301,10 +294,17 @@ static Optional getLoadInfo(const MachineIns case AArch64::LD1Fourv4s: case AArch64::LD1Fourv8h: case AArch64::LD1Fourv16b: + case AArch64::LD2Twov2s: + case AArch64::LD2Twov4s: + case AArch64::LD2Twov8b: case AArch64::LD2Twov2d: case AArch64::LD2Twov4h: case AArch64::LD2Twov8h: case AArch64::LD2Twov16b: + case AArch64::LD2Rv1d: + case AArch64::LD2Rv2s: + case AArch64::LD2Rv4s: + case AArch64::LD2Rv8b: case AArch64::LD2Rv2d: case AArch64::LD2Rv4h: case AArch64::LD2Rv8h: @@ -345,32 +345,32 @@ static Optional getLoadInfo(const MachineIns IsPrePost = false; break; + case AArch64::LD1i64_POST: + case AArch64::LD2i64_POST: + DestRegIdx = 1; + BaseRegIdx = 4; + OffsetIdx = 5; + IsPrePost = true; + break; + case AArch64::LD1i8_POST: case AArch64::LD1i16_POST: case AArch64::LD1i32_POST: - case AArch64::LD1i64_POST: case AArch64::LD2i8_POST: case AArch64::LD2i16_POST: case AArch64::LD2i32_POST: - case AArch64::LD2i64_POST: case AArch64::LD3i8_POST: case AArch64::LD3i16_POST: case AArch64::LD3i32_POST: + case AArch64::LD3i64_POST: case AArch64::LD4i8_POST: case AArch64::LD4i16_POST: case AArch64::LD4i32_POST: - DestRegIdx = 1; - BaseRegIdx = 4; - OffsetIdx = 5; - IsPrePost = false; - break; - - case AArch64::LD3i64_POST: case AArch64::LD4i64_POST: DestRegIdx = -1; BaseRegIdx = 4; OffsetIdx = 5; - IsPrePost = false; + IsPrePost = true; break; case AArch64::LD1Onev1d_POST: @@ -389,23 +389,16 @@ static Optional getLoadInfo(const MachineIns case AArch64::LD1Rv4s_POST: case AArch64::LD1Rv8h_POST: case AArch64::LD1Rv16b_POST: - case AArch64::LD1Twov1d_POST: - case AArch64::LD1Twov2s_POST: - case AArch64::LD1Twov4h_POST: - case AArch64::LD1Twov8b_POST: - case AArch64::LD2Twov2s_POST: - case AArch64::LD2Twov4s_POST: - case AArch64::LD2Twov8b_POST: - case AArch64::LD2Rv1d_POST: - case AArch64::LD2Rv2s_POST: - case AArch64::LD2Rv4s_POST: - case AArch64::LD2Rv8b_POST: DestRegIdx = 1; BaseRegIdx = 2; OffsetIdx = 3; - IsPrePost = false; + IsPrePost = true; break; + case AArch64::LD1Twov1d_POST: + case AArch64::LD1Twov2s_POST: + case AArch64::LD1Twov4h_POST: + case AArch64::LD1Twov8b_POST: case AArch64::LD1Twov2d_POST: case AArch64::LD1Twov4s_POST: case AArch64::LD1Twov8h_POST: @@ -426,10 +419,17 @@ static Optional getLoadInfo(const MachineIns case AArch64::LD1Fourv4s_POST: case AArch64::LD1Fourv8h_POST: case AArch64::LD1Fourv16b_POST: + case AArch64::LD2Twov2s_POST: + case AArch64::LD2Twov4s_POST: + case AArch64::LD2Twov8b_POST: case AArch64::LD2Twov2d_POST: case AArch64::LD2Twov4h_POST: case AArch64::LD2Twov8h_POST: case AArch64::LD2Twov16b_POST: + case AArch64::LD2Rv1d_POST: + case AArch64::LD2Rv2s_POST: + case AArch64::LD2Rv4s_POST: + case AArch64::LD2Rv8b_POST: case AArch64::LD2Rv2d_POST: case AArch64::LD2Rv4h_POST: case AArch64::LD2Rv8h_POST: @@ -467,7 +467,7 @@ static Optional getLoadInfo(const MachineIns DestRegIdx = -1; BaseRegIdx = 2; OffsetIdx = 3; - IsPrePost = false; + IsPrePost = true; break; case AArch64::LDRBBroW: @@ -572,8 +572,12 @@ static Optional getLoadInfo(const MachineIns IsPrePost = true; break; - case AArch64::LDPDi: + case AArch64::LDNPDi: + case AArch64::LDNPQi: + case AArch64::LDNPSi: case AArch64::LDPQi: + case AArch64::LDPDi: + case AArch64::LDPSi: DestRegIdx = -1; BaseRegIdx = 2; OffsetIdx = 3; @@ -581,7 +585,6 @@ static Optional getLoadInfo(const MachineIns break; case AArch64::LDPSWi: - case AArch64::LDPSi: case AArch64::LDPWi: case AArch64::LDPXi: DestRegIdx = 0; @@ -592,18 +595,18 @@ static Optional getLoadInfo(const MachineIns case AArch64::LDPQpost: case AArch64::LDPQpre: + case AArch64::LDPDpost: + case AArch64::LDPDpre: + case AArch64::LDPSpost: *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***