git: 9c3bc177f78d - stable/12 - Merge llvm-project 12.0.1 rc2

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sat, 25 Dec 2021 11:55:32 UTC
The branch stable/12 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=9c3bc177f78d95fc23c1e73a18bc87a437e80906

commit 9c3bc177f78d95fc23c1e73a18bc87a437e80906
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-06-19 10:06:00 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-12-25 11:51:09 +0000

    Merge llvm-project 12.0.1 rc2
    
    This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
    openmp to llvmorg-12.0.1-rc2-0-ge7dac564cd0e, a.k.a. 12.0.1 rc2.
    
    PR:             255570
    MFC after:      6 weeks
    
    (cherry picked from commit 23408297fbf3089f0388a8873b02fa75ab3f5bb9)
---
 ObsoleteFiles.inc                                  | 291 +++++++++++
 .../clang/lib/CodeGen/CodeGenModule.cpp            |  12 +-
 .../clang/lib/Format/TokenAnnotator.cpp            |  12 +-
 .../clang/lib/Format/UnwrappedLineFormatter.cpp    |   7 -
 .../clang/lib/Format/UnwrappedLineParser.cpp       |  89 +++-
 .../clang/lib/Format/UnwrappedLineParser.h         |  12 +-
 .../clang/lib/Headers/ppc_wrappers/xmmintrin.h     |   9 +-
 .../llvm-project/clang/lib/Sema/SemaChecking.cpp   |   5 +-
 contrib/llvm-project/libcxx/include/memory         |  32 +-
 contrib/llvm-project/lld/ELF/SyntheticSections.cpp |   4 +-
 contrib/llvm-project/lldb/docs/man/lldb.rst        |   4 +-
 contrib/llvm-project/lldb/tools/driver/Driver.cpp  |   4 +-
 contrib/llvm-project/llvm/include/llvm/ADT/Any.h   |   7 +-
 .../llvm/CodeGen/GlobalISel/LegalizerHelper.h      |   1 +
 .../llvm-project/llvm/include/llvm/IR/Constant.h   |   4 +
 .../llvm/lib/Analysis/ConstantFolding.cpp          |  15 +-
 .../llvm/lib/Analysis/InstructionSimplify.cpp      |   8 +-
 .../llvm/lib/Analysis/MemoryDependenceAnalysis.cpp |   4 +-
 .../llvm/lib/Analysis/ScalarEvolution.cpp          |   4 +
 .../llvm/lib/Analysis/ValueTracking.cpp            |  15 +-
 .../llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp   |   5 +-
 .../lib/CodeGen/GlobalISel/LegalizerHelper.cpp     |  44 +-
 .../llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp  |  24 +-
 .../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  |  33 +-
 .../llvm/lib/CodeGen/StackProtector.cpp            |  24 +-
 contrib/llvm-project/llvm/lib/IR/Constants.cpp     |  12 +
 .../llvm-project/llvm/lib/Support/CommandLine.cpp  |   2 +-
 .../lib/Target/AArch64/AArch64ISelLowering.cpp     |  43 +-
 .../AArch64/GISel/AArch64InstructionSelector.cpp   |   2 +-
 .../llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp       |  22 +-
 .../llvm/lib/Target/BPF/BPFMIPeephole.cpp          |   3 +
 .../llvm/lib/Target/BPF/BPFPreserveDIType.cpp      |   9 +
 .../llvm/lib/Target/BPF/BPFTargetMachine.cpp       |   6 +
 .../llvm/lib/Target/BPF/BPFTargetMachine.h         |   2 +
 .../llvm/lib/Target/BPF/BPFTargetTransformInfo.h   |  61 +++
 contrib/llvm-project/llvm/lib/Target/BPF/BTF.def   |   1 +
 .../llvm-project/llvm/lib/Target/BPF/BTFDebug.cpp  |  62 ++-
 .../llvm-project/llvm/lib/Target/BPF/BTFDebug.h    |  11 +-
 .../llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp      |   6 +
 .../llvm/lib/Target/PowerPC/PPCFrameLowering.cpp   | 365 ++++++-------
 .../llvm/lib/Target/PowerPC/PPCISelLowering.cpp    |  62 +++
 .../llvm/lib/Target/PowerPC/PPCISelLowering.h      |   1 +
 .../llvm/lib/Target/PowerPC/PPCRegisterInfo.td     |  43 +-
 .../lib/Target/PowerPC/PPCTargetTransformInfo.cpp  |  21 +
 .../lib/Target/PowerPC/PPCTargetTransformInfo.h    |   3 +
 .../lib/Target/RISCV/RISCVInstrInfoVPseudos.td     |  20 +-
 .../lib/Target/SystemZ/SystemZISelLowering.cpp     |   5 +-
 .../WebAssemblyLowerEmscriptenEHSjLj.cpp           |  13 +-
 .../llvm/lib/Target/X86/X86ISelLowering.cpp        |   2 +
 .../llvm/lib/Target/X86/X86InstrCompiler.td        |  11 +-
 .../Transforms/InstCombine/InstCombineAndOrXor.cpp |  17 +-
 .../Transforms/InstCombine/InstCombineSelect.cpp   |   5 +-
 .../Transforms/InstCombine/InstCombineShifts.cpp   |  58 ++-
 .../llvm/lib/Transforms/Scalar/LoopRerollPass.cpp  |   6 +
 .../Transforms/Scalar/LowerConstantIntrinsics.cpp  |   8 +-
 .../llvm/lib/Transforms/Scalar/SCCP.cpp            |   7 +-
 .../llvm/lib/Transforms/Utils/InlineFunction.cpp   | 106 ++--
 etc/mtree/BSD.debug.dist                           |   2 +-
 etc/mtree/BSD.usr.dist                             |   2 +-
 lib/clang/headers/Makefile                         |   2 +-
 lib/clang/include/VCSVersion.inc                   |   8 +-
 lib/clang/include/clang/Basic/Version.inc          |   6 +-
 lib/clang/include/clang/Config/config.h            |   2 +-
 lib/clang/include/lld/Common/Version.inc           |   2 +-
 lib/clang/include/llvm/Config/config.h             |   4 +-
 lib/clang/include/llvm/Config/llvm-config.h        |   5 +-
 lib/clang/include/llvm/Support/VCSRevision.h       |   2 +-
 lib/libclang_rt/compiler-rt-vars.mk                |   2 +-
 tools/build/mk/OptionalObsoleteFiles.inc           | 578 ++++++++++-----------
 69 files changed, 1480 insertions(+), 799 deletions(-)

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 444853fe1aaf..46a1bf3180e9 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -38,6 +38,297 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20211222: new clang import which bumps version from 12.0.0 to 12.0.1.
+OLD_FILES+=usr/lib/clang/12.0.0/include/cuda_wrappers/algorithm
+OLD_FILES+=usr/lib/clang/12.0.0/include/cuda_wrappers/complex
+OLD_FILES+=usr/lib/clang/12.0.0/include/cuda_wrappers/new
+OLD_DIRS+=usr/lib/clang/12.0.0/include/cuda_wrappers
+OLD_FILES+=usr/lib/clang/12.0.0/include/fuzzer/FuzzedDataProvider.h
+OLD_DIRS+=usr/lib/clang/12.0.0/include/fuzzer
+OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/__clang_openmp_device_functions.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/cmath
+OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/complex
+OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/complex.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/complex_cmath.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/math.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/openmp_wrappers/new
+OLD_DIRS+=usr/lib/clang/12.0.0/include/openmp_wrappers
+OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/emmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/mm_malloc.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/mmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/pmmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/smmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/tmmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/ppc_wrappers/xmmintrin.h
+OLD_DIRS+=usr/lib/clang/12.0.0/include/ppc_wrappers
+OLD_FILES+=usr/lib/clang/12.0.0/include/profile/InstrProfData.inc
+OLD_DIRS+=usr/lib/clang/12.0.0/include/profile
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/allocator_interface.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/asan_interface.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/common_interface_defs.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/coverage_interface.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/dfsan_interface.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/hwasan_interface.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/linux_syscall_hooks.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/lsan_interface.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/msan_interface.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/netbsd_syscall_hooks.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/scudo_interface.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/tsan_interface.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/tsan_interface_atomic.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sanitizer/ubsan_interface.h
+OLD_DIRS+=usr/lib/clang/12.0.0/include/sanitizer
+OLD_FILES+=usr/lib/clang/12.0.0/include/xray/xray_interface.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/xray/xray_log_interface.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/xray/xray_records.h
+OLD_DIRS+=usr/lib/clang/12.0.0/include/xray
+OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_builtin_vars.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_cmath.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_complex_builtins.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_device_functions.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_intrinsics.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_libdevice_declares.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_math.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_math_forward_declares.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_cuda_runtime_wrapper.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_hip_cmath.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_hip_libdevice_declares.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_hip_math.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__clang_hip_runtime_wrapper.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__stddef_max_align_t.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__wmmintrin_aes.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/__wmmintrin_pclmul.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/adxintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/altivec.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/ammintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/amxintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/arm64intr.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/arm_acle.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/arm_bf16.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/arm_cde.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/arm_cmse.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/arm_fp16.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/arm_mve.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/arm_neon.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/arm_sve.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/armintr.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx2intrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512bf16intrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512bitalgintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512bwintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512cdintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512dqintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512erintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512fintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512ifmaintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512ifmavlintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512pfintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vbmi2intrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vbmiintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vbmivlintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlbf16intrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlbitalgintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlbwintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlcdintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vldqintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlvbmi2intrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlvnniintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vlvp2intersectintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vnniintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vp2intersectintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vpopcntdqintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avx512vpopcntdqvlintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avxintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/avxvnniintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/bmi2intrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/bmiintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/cet.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/cetintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/cldemoteintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/clflushoptintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/clwbintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/clzerointrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/cpuid.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/emmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/enqcmdintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/f16cintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/float.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/fma4intrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/fmaintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/fxsrintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/gfniintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/hresetintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/htmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/htmxlintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/ia32intrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/immintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/intrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/inttypes.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/invpcidintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/iso646.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/keylockerintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/limits.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/lwpintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/lzcntintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/mm3dnow.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/mm_malloc.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/mmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/module.modulemap
+OLD_FILES+=usr/lib/clang/12.0.0/include/movdirintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/msa.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/mwaitxintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/nmmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/omp-tools.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/omp.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/ompt.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/opencl-c-base.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/opencl-c.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/pconfigintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/pkuintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/pmmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/popcntintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/prfchwintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/ptwriteintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/rdseedintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/rtmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/s390intrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/serializeintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/sgxintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/shaintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/smmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/stdalign.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/stdarg.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/stdatomic.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/stdbool.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/stddef.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/stdint.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/stdnoreturn.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/tbmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/tgmath.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/tmmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/tsxldtrkintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/uintrintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/unwind.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/vadefs.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/vaesintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/varargs.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/vecintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/vpclmulqdqintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/waitpkgintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/wasm_simd128.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/wbnoinvdintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/wmmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/x86gprintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/x86intrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/xmmintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/xopintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/xsavecintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/xsaveintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/xsaveoptintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/xsavesintrin.h
+OLD_FILES+=usr/lib/clang/12.0.0/include/xtestintrin.h
+OLD_DIRS+=usr/lib/clang/12.0.0/include
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-aarch64.so
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-arm.so
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-armhf.so
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-i386.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-i386.so
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-preinit-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-preinit-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-preinit-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan-x86_64.so
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan_cxx-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan_cxx-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan_cxx-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi-i386.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi_diag-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi_diag-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi_diag-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi_diag-i386.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.cfi_diag-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.dd-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.dd-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.fuzzer-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.fuzzer-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.fuzzer_no_main-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.fuzzer_no_main-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.msan-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.msan-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.msan_cxx-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.msan_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.profile-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.profile-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.profile-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.profile-i386.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.profile-powerpc.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.profile-powerpc64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.profile-powerpc64le.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.profile-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.safestack-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.safestack-i386.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.stats-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.stats-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.stats-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.stats-i386.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.stats-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.stats_client-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.stats_client-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.stats_client-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.stats_client-i386.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.tsan-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.tsan-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.tsan_cxx-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_minimal-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_minimal-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_minimal-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_minimal-i386.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_standalone-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_standalone-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_standalone-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-basic-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-basic-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-basic-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-basic-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-fdr-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-fdr-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-fdr-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-fdr-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-profiling-aarch64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-profiling-arm.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-profiling-armhf.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-profiling-x86_64.a
+OLD_FILES+=usr/lib/clang/12.0.0/lib/freebsd/libclang_rt.xray-x86_64.a
+OLD_DIRS+=usr/lib/clang/12.0.0/lib/freebsd
+OLD_DIRS+=usr/lib/clang/12.0.0/lib
+OLD_DIRS+=usr/lib/clang/12.0.0
+
 # 20211222: new clang import which bumps version from 11.0.1 to 12.0.0.
 OLD_FILES+=usr/lib/clang/11.0.1/include/cuda_wrappers/algorithm
 OLD_FILES+=usr/lib/clang/11.0.1/include/cuda_wrappers/complex
diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp
index 31afbc6b4262..9c9bd4e374af 100644
--- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp
@@ -6215,15 +6215,17 @@ llvm::SanitizerStatReport &CodeGenModule::getSanStats() {
 
   return *SanStats;
 }
+
 llvm::Value *
 CodeGenModule::createOpenCLIntToSamplerConversion(const Expr *E,
                                                   CodeGenFunction &CGF) {
   llvm::Constant *C = ConstantEmitter(CGF).emitAbstract(E, E->getType());
-  auto SamplerT = getOpenCLRuntime().getSamplerType(E->getType().getTypePtr());
-  auto FTy = llvm::FunctionType::get(SamplerT, {C->getType()}, false);
-  return CGF.Builder.CreateCall(CreateRuntimeFunction(FTy,
-                                "__translate_sampler_initializer"),
-                                {C});
+  auto *SamplerT = getOpenCLRuntime().getSamplerType(E->getType().getTypePtr());
+  auto *FTy = llvm::FunctionType::get(SamplerT, {C->getType()}, false);
+  auto *Call = CGF.Builder.CreateCall(
+      CreateRuntimeFunction(FTy, "__translate_sampler_initializer"), {C});
+  Call->setCallingConv(Call->getCalledFunction()->getCallingConv());
+  return Call;
 }
 
 CharUnits CodeGenModule::getNaturalPointeeTypeAlignment(
diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp
index 34c291ecc492..82d6cfed308d 100755
--- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp
+++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp
@@ -1917,12 +1917,12 @@ private:
     if (Tok.Next->isOneOf(tok::identifier, tok::kw_this))
       return true;
 
-    if (Tok.Next->is(tok::l_paren) &&
-        !(Tok.Previous && Tok.Previous->is(tok::identifier) &&
-          Tok.Previous->Previous &&
-          Tok.Previous->Previous->isOneOf(tok::arrowstar, tok::arrow,
-                                          tok::star)))
-      return true;
+    // Look for a cast `( x ) (`.
+    if (Tok.Next->is(tok::l_paren) && Tok.Previous && Tok.Previous->Previous) {
+      if (Tok.Previous->is(tok::identifier) &&
+          Tok.Previous->Previous->is(tok::l_paren))
+        return true;
+    }
 
     if (!Tok.Next->Next)
       return false;
diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineFormatter.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineFormatter.cpp
index 5dd0ccdfa6fd..7d197310e65b 100644
--- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineFormatter.cpp
+++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineFormatter.cpp
@@ -1281,13 +1281,6 @@ void UnwrappedLineFormatter::formatFirstToken(
   if (Newlines)
     Indent = NewlineIndent;
 
-  // If in Whitemsmiths mode, indent start and end of blocks
-  if (Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths) {
-    if (RootToken.isOneOf(tok::l_brace, tok::r_brace, tok::kw_case,
-                          tok::kw_default))
-      Indent += Style.IndentWidth;
-  }
-
   // Preprocessor directives get indented before the hash only if specified
   if (Style.IndentPPDirectives != FormatStyle::PPDIS_BeforeHash &&
       (Line.Type == LT_PreprocessorDirective ||
diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp
index f689a6361a3a..bec18bd5d8df 100644
--- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp
@@ -579,17 +579,23 @@ size_t UnwrappedLineParser::computePPHash() const {
   return h;
 }
 
-void UnwrappedLineParser::parseBlock(bool MustBeDeclaration, bool AddLevel,
-                                     bool MunchSemi) {
+void UnwrappedLineParser::parseBlock(bool MustBeDeclaration, unsigned AddLevels,
+                                     bool MunchSemi,
+                                     bool UnindentWhitesmithsBraces) {
   assert(FormatTok->isOneOf(tok::l_brace, TT_MacroBlockBegin) &&
          "'{' or macro block token expected");
   const bool MacroBlock = FormatTok->is(TT_MacroBlockBegin);
   FormatTok->setBlockKind(BK_Block);
 
+  // For Whitesmiths mode, jump to the next level prior to skipping over the
+  // braces.
+  if (AddLevels > 0 && Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths)
+    ++Line->Level;
+
   size_t PPStartHash = computePPHash();
 
   unsigned InitialLevel = Line->Level;
-  nextToken(/*LevelDifference=*/AddLevel ? 1 : 0);
+  nextToken(/*LevelDifference=*/AddLevels);
 
   if (MacroBlock && FormatTok->is(tok::l_paren))
     parseParens();
@@ -602,10 +608,16 @@ void UnwrappedLineParser::parseBlock(bool MustBeDeclaration, bool AddLevel,
           ? (UnwrappedLine::kInvalidIndex)
           : (CurrentLines->size() - 1 - NbPreprocessorDirectives);
 
+  // Whitesmiths is weird here. The brace needs to be indented for the namespace
+  // block, but the block itself may not be indented depending on the style
+  // settings. This allows the format to back up one level in those cases.
+  if (UnindentWhitesmithsBraces)
+    --Line->Level;
+
   ScopedDeclarationState DeclarationState(*Line, DeclarationScopeStack,
                                           MustBeDeclaration);
-  if (AddLevel)
-    ++Line->Level;
+  if (AddLevels > 0u && Style.BreakBeforeBraces != FormatStyle::BS_Whitesmiths)
+    Line->Level += AddLevels;
   parseLevel(/*HasOpeningBrace=*/true);
 
   if (eof())
@@ -621,7 +633,7 @@ void UnwrappedLineParser::parseBlock(bool MustBeDeclaration, bool AddLevel,
   size_t PPEndHash = computePPHash();
 
   // Munch the closing brace.
-  nextToken(/*LevelDifference=*/AddLevel ? -1 : 0);
+  nextToken(/*LevelDifference=*/-AddLevels);
 
   if (MacroBlock && FormatTok->is(tok::l_paren))
     parseParens();
@@ -637,6 +649,7 @@ void UnwrappedLineParser::parseBlock(bool MustBeDeclaration, bool AddLevel,
     nextToken();
 
   Line->Level = InitialLevel;
+  FormatTok->setBlockKind(BK_Block);
 
   if (PPStartHash == PPEndHash) {
     Line->MatchingOpeningBlockLineIndex = OpeningLineIndex;
@@ -2128,15 +2141,34 @@ void UnwrappedLineParser::parseNamespace() {
     if (ShouldBreakBeforeBrace(Style, InitialToken))
       addUnwrappedLine();
 
-    bool AddLevel = Style.NamespaceIndentation == FormatStyle::NI_All ||
-                    (Style.NamespaceIndentation == FormatStyle::NI_Inner &&
-                     DeclarationScopeStack.size() > 1);
-    parseBlock(/*MustBeDeclaration=*/true, AddLevel);
+    unsigned AddLevels =
+        Style.NamespaceIndentation == FormatStyle::NI_All ||
+                (Style.NamespaceIndentation == FormatStyle::NI_Inner &&
+                 DeclarationScopeStack.size() > 1)
+            ? 1u
+            : 0u;
+    bool ManageWhitesmithsBraces =
+        AddLevels == 0u &&
+        Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths;
+
+    // If we're in Whitesmiths mode, indent the brace if we're not indenting
+    // the whole block.
+    if (ManageWhitesmithsBraces)
+      ++Line->Level;
+
+    parseBlock(/*MustBeDeclaration=*/true, AddLevels,
+               /*MunchSemi=*/true,
+               /*UnindentWhitesmithsBraces=*/ManageWhitesmithsBraces);
+
     // Munch the semicolon after a namespace. This is more common than one would
     // think. Putting the semicolon into its own line is very ugly.
     if (FormatTok->Tok.is(tok::semi))
       nextToken();
-    addUnwrappedLine();
+
+    addUnwrappedLine(AddLevels > 0 ? LineLevel::Remove : LineLevel::Keep);
+
+    if (ManageWhitesmithsBraces)
+      --Line->Level;
   }
   // FIXME: Add error handling.
 }
@@ -2222,6 +2254,11 @@ void UnwrappedLineParser::parseDoWhile() {
     return;
   }
 
+  // If in Whitesmiths mode, the line with the while() needs to be indented
+  // to the same level as the block.
+  if (Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths)
+    ++Line->Level;
+
   nextToken();
   parseStructuralElement();
 }
@@ -2234,25 +2271,19 @@ void UnwrappedLineParser::parseLabel(bool LeftAlignLabel) {
   if (LeftAlignLabel)
     Line->Level = 0;
 
-  bool RemoveWhitesmithsCaseIndent =
-      (!Style.IndentCaseBlocks &&
-       Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths);
-
-  if (RemoveWhitesmithsCaseIndent)
-    --Line->Level;
-
   if (!Style.IndentCaseBlocks && CommentsBeforeNextToken.empty() &&
       FormatTok->Tok.is(tok::l_brace)) {
 
-    CompoundStatementIndenter Indenter(
-        this, Line->Level, Style.BraceWrapping.AfterCaseLabel,
-        Style.BraceWrapping.IndentBraces || RemoveWhitesmithsCaseIndent);
+    CompoundStatementIndenter Indenter(this, Line->Level,
+                                       Style.BraceWrapping.AfterCaseLabel,
+                                       Style.BraceWrapping.IndentBraces);
     parseBlock(/*MustBeDeclaration=*/false);
     if (FormatTok->Tok.is(tok::kw_break)) {
       if (Style.BraceWrapping.AfterControlStatement ==
           FormatStyle::BWACS_Always) {
         addUnwrappedLine();
-        if (RemoveWhitesmithsCaseIndent) {
+        if (!Style.IndentCaseBlocks &&
+            Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths) {
           Line->Level++;
         }
       }
@@ -2920,17 +2951,29 @@ LLVM_ATTRIBUTE_UNUSED static void printDebugInfo(const UnwrappedLine &Line,
   llvm::dbgs() << "\n";
 }
 
-void UnwrappedLineParser::addUnwrappedLine() {
+void UnwrappedLineParser::addUnwrappedLine(LineLevel AdjustLevel) {
   if (Line->Tokens.empty())
     return;
   LLVM_DEBUG({
     if (CurrentLines == &Lines)
       printDebugInfo(*Line);
   });
+
+  // If this line closes a block when in Whitesmiths mode, remember that
+  // information so that the level can be decreased after the line is added.
+  // This has to happen after the addition of the line since the line itself
+  // needs to be indented.
+  bool ClosesWhitesmithsBlock =
+      Line->MatchingOpeningBlockLineIndex != UnwrappedLine::kInvalidIndex &&
+      Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths;
+
   CurrentLines->push_back(std::move(*Line));
   Line->Tokens.clear();
   Line->MatchingOpeningBlockLineIndex = UnwrappedLine::kInvalidIndex;
   Line->FirstStartColumn = 0;
+
+  if (ClosesWhitesmithsBlock && AdjustLevel == LineLevel::Remove)
+    --Line->Level;
   if (CurrentLines == &Lines && !PreprocessorDirectives.empty()) {
     CurrentLines->append(
         std::make_move_iterator(PreprocessorDirectives.begin()),
diff --git a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.h b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.h
index 02b328cb72de..ce135fac5e57 100644
--- a/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.h
+++ b/contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.h
@@ -85,8 +85,9 @@ private:
   void reset();
   void parseFile();
   void parseLevel(bool HasOpeningBrace);
-  void parseBlock(bool MustBeDeclaration, bool AddLevel = true,
-                  bool MunchSemi = true);
+  void parseBlock(bool MustBeDeclaration, unsigned AddLevels = 1u,
+                  bool MunchSemi = true,
+                  bool UnindentWhitesmithsBraces = false);
   void parseChildBlock();
   void parsePPDirective();
   void parsePPDefine();
@@ -140,7 +141,12 @@ private:
   bool tryToParsePropertyAccessor();
   void tryToParseJSFunction();
   bool tryToParseSimpleAttribute();
-  void addUnwrappedLine();
+
+  // Used by addUnwrappedLine to denote whether to keep or remove a level
+  // when resetting the line state.
+  enum class LineLevel { Remove, Keep };
+
+  void addUnwrappedLine(LineLevel AdjustLevel = LineLevel::Remove);
   bool eof() const;
   // LevelDifference is the difference of levels after and before the current
   // token. For example:
diff --git a/contrib/llvm-project/clang/lib/Headers/ppc_wrappers/xmmintrin.h b/contrib/llvm-project/clang/lib/Headers/ppc_wrappers/xmmintrin.h
index 0f429fa04081..0e45b96769f8 100644
--- a/contrib/llvm-project/clang/lib/Headers/ppc_wrappers/xmmintrin.h
+++ b/contrib/llvm-project/clang/lib/Headers/ppc_wrappers/xmmintrin.h
@@ -28,7 +28,7 @@
    Most SSE scalar float intrinsic operations can be performed more
    efficiently as C language float scalar operations or optimized to
    use vector SIMD operations. We recommend this for new applications. */
-#error "Please read comment above.  Use -DNO_WARN_X86_INTRINSICS to disable this error."
+#error "Please read comment above. Use -DNO_WARN_X86_INTRINSICS to disable this error."
 #endif
 
 #ifndef _XMMINTRIN_H_INCLUDED
@@ -62,14 +62,13 @@
 
 /* The Intel API is flexible enough that we must allow aliasing with other
    vector types, and their scalar components.  */
-typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
+typedef vector float __m128 __attribute__((__may_alias__));
 
 /* Unaligned version of the same type.  */
-typedef float __m128_u __attribute__ ((__vector_size__ (16), __may_alias__,
-				       __aligned__ (1)));
+typedef vector float __m128_u __attribute__((__may_alias__, __aligned__(1)));
 
 /* Internal data types for implementing the intrinsics.  */
-typedef float __v4sf __attribute__ ((__vector_size__ (16)));
+typedef vector float __v4sf;
 
 /* Create an undefined vector.  */
 extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
diff --git a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp
index 2d3d36f4adad..2b55712d44c2 100644
--- a/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp
+++ b/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp
@@ -2623,7 +2623,10 @@ static bool isValidBPFPreserveEnumValueArg(Expr *Arg) {
     return false;
 
   const auto *CE = dyn_cast<CStyleCastExpr>(UO->getSubExpr());
-  if (!CE || CE->getCastKind() != CK_IntegralToPointer)
+  if (!CE)
+    return false;
+  if (CE->getCastKind() != CK_IntegralToPointer &&
+      CE->getCastKind() != CK_NullToPointer)
     return false;
 
   // The integer must be from an EnumConstantDecl.
diff --git a/contrib/llvm-project/libcxx/include/memory b/contrib/llvm-project/libcxx/include/memory
index 39d0f5bee6a5..efb10c8fd25b 100644
--- a/contrib/llvm-project/libcxx/include/memory
+++ b/contrib/llvm-project/libcxx/include/memory
@@ -99,14 +99,14 @@ struct allocator_traits
 };
 
 template <>
-class allocator<void> // deprecated in C++17, removed in C++20
+class allocator<void> // removed in C++20
 {
 public:
-    typedef void*                                 pointer;
-    typedef const void*                           const_pointer;
-    typedef void                                  value_type;
+    typedef void*                                 pointer;          // deprecated in C++17
+    typedef const void*                           const_pointer;    // deprecated in C++17
+    typedef void                                  value_type;       // deprecated in C++17
 
-    template <class _Up> struct rebind {typedef allocator<_Up> other;};
+    template <class _Up> struct rebind {typedef allocator<_Up> other;}; // deprecated in C++17
 };
 
 template <class T>
@@ -786,27 +786,27 @@ to_address(const _Pointer& __p) _NOEXCEPT
 
 template <class _Tp> class allocator;
 
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
+#if _LIBCPP_STD_VER <= 17
 template <>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 allocator<void>
+class _LIBCPP_TEMPLATE_VIS allocator<void>
 {
 public:
-    typedef void*             pointer;
-    typedef const void*       const_pointer;
-    typedef void              value_type;
+    _LIBCPP_DEPRECATED_IN_CXX17 typedef void*             pointer;
+    _LIBCPP_DEPRECATED_IN_CXX17 typedef const void*       const_pointer;
+    _LIBCPP_DEPRECATED_IN_CXX17 typedef void              value_type;
 
-    template <class _Up> struct rebind {typedef allocator<_Up> other;};
+    template <class _Up> struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {typedef allocator<_Up> other;};
 };
 
 template <>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 allocator<const void>
+class _LIBCPP_TEMPLATE_VIS allocator<const void>
 {
 public:
-    typedef const void*       pointer;
-    typedef const void*       const_pointer;
-    typedef const void        value_type;
+    _LIBCPP_DEPRECATED_IN_CXX17 typedef const void*       pointer;
+    _LIBCPP_DEPRECATED_IN_CXX17 typedef const void*       const_pointer;
+    _LIBCPP_DEPRECATED_IN_CXX17 typedef const void        value_type;
 
-    template <class _Up> struct rebind {typedef allocator<_Up> other;};
+    template <class _Up> struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {typedef allocator<_Up> other;};
 };
 #endif
 
diff --git a/contrib/llvm-project/lld/ELF/SyntheticSections.cpp b/contrib/llvm-project/lld/ELF/SyntheticSections.cpp
index 9a875bd7ec3e..70c36c63d101 100644
--- a/contrib/llvm-project/lld/ELF/SyntheticSections.cpp
+++ b/contrib/llvm-project/lld/ELF/SyntheticSections.cpp
@@ -3110,7 +3110,9 @@ size_t VersionTableSection::getSize() const {
 void VersionTableSection::writeTo(uint8_t *buf) {
   buf += 2;
   for (const SymbolTableEntry &s : getPartition().dynSymTab->getSymbols()) {
-    write16(buf, s.sym->versionId);
+    // Use the original versionId for an unfetched lazy symbol (undefined weak),
+    // which must be VER_NDX_GLOBAL (an undefined versioned symbol is an error).
+    write16(buf, s.sym->isLazy() ? VER_NDX_GLOBAL : s.sym->versionId);
     buf += 2;
   }
 }
diff --git a/contrib/llvm-project/lldb/docs/man/lldb.rst b/contrib/llvm-project/lldb/docs/man/lldb.rst
index 6dca15fa35dc..b75288db380d 100644
--- a/contrib/llvm-project/lldb/docs/man/lldb.rst
+++ b/contrib/llvm-project/lldb/docs/man/lldb.rst
@@ -256,11 +256,11 @@ executable. To disambiguate between arguments passed to lldb and arguments
 passed to the debugged executable, arguments starting with a - must be passed
 after --.
 
-  lldb --arch x86_64 /path/to/program program argument -- --arch arvm7
+  lldb --arch x86_64 /path/to/program program argument -- --arch armv7
 
 For convenience, passing the executable after -- is also supported.
 
-  lldb --arch x86_64 -- /path/to/program program argument --arch arvm7
+  lldb --arch x86_64 -- /path/to/program program argument --arch armv7
 
 Passing one of the attach options causes :program:`lldb` to immediately attach
 to the given process.
diff --git a/contrib/llvm-project/lldb/tools/driver/Driver.cpp b/contrib/llvm-project/lldb/tools/driver/Driver.cpp
index e4a60127b65e..210a712f9741 100644
--- a/contrib/llvm-project/lldb/tools/driver/Driver.cpp
+++ b/contrib/llvm-project/lldb/tools/driver/Driver.cpp
@@ -751,11 +751,11 @@ EXAMPLES:
   arguments passed to the debugged executable, arguments starting with a - must
   be passed after --.
 
-    lldb --arch x86_64 /path/to/program program argument -- --arch arvm7
+    lldb --arch x86_64 /path/to/program program argument -- --arch armv7
 
   For convenience, passing the executable after -- is also supported.
 
-    lldb --arch x86_64 -- /path/to/program program argument --arch arvm7
+    lldb --arch x86_64 -- /path/to/program program argument --arch armv7
 
   Passing one of the attach options causes lldb to immediately attach to the
   given process.
diff --git a/contrib/llvm-project/llvm/include/llvm/ADT/Any.h b/contrib/llvm-project/llvm/include/llvm/ADT/Any.h
index 0aded628cda4..1e3abca70679 100644
--- a/contrib/llvm-project/llvm/include/llvm/ADT/Any.h
+++ b/contrib/llvm-project/llvm/include/llvm/ADT/Any.h
@@ -23,7 +23,12 @@
 
 namespace llvm {
 
-class Any {
+class LLVM_EXTERNAL_VISIBILITY Any {
+
+  // The `Typeid<T>::Id` static data member below is a globally unique
+  // identifier for the type `T`. It is explicitly marked with default
+  // visibility so that when `-fvisibility=hidden` is used, the loader still
+  // merges duplicate definitions across DSO boundaries.
   template <typename T> struct TypeId { static const char Id; };
 
   struct StorageBase {
diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
index c3b494e94ff1..4a982b00125d 100644
--- a/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
+++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
@@ -316,6 +316,7 @@ public:
 
   LegalizeResult narrowScalarShift(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
   LegalizeResult narrowScalarMul(MachineInstr &MI, LLT Ty);
+  LegalizeResult narrowScalarFPTOI(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
   LegalizeResult narrowScalarExtract(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
   LegalizeResult narrowScalarInsert(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
 
diff --git a/contrib/llvm-project/llvm/include/llvm/IR/Constant.h b/contrib/llvm-project/llvm/include/llvm/IR/Constant.h
index 0190aca27b72..71692c746015 100644
--- a/contrib/llvm-project/llvm/include/llvm/IR/Constant.h
+++ b/contrib/llvm-project/llvm/include/llvm/IR/Constant.h
@@ -214,6 +214,10 @@ public:
   /// both must either be scalars or vectors with the same element count. If no
   /// changes are made, the constant C is returned.
   static Constant *mergeUndefsWith(Constant *C, Constant *Other);
+
+  /// Return true if a constant is ConstantData or a ConstantAggregate or
+  /// ConstantExpr that contain only ConstantData.
+  bool isManifestConstant() const;
 };
 
 } // end namespace llvm
diff --git a/contrib/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp b/contrib/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp
index f73890d548f0..cc1ce4c65821 100644
--- a/contrib/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/contrib/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp
@@ -1808,19 +1808,6 @@ double getValueAsDouble(ConstantFP *Op) {
   return APF.convertToDouble();
 }
 
-static bool isManifestConstant(const Constant *c) {
-  if (isa<ConstantData>(c)) {
-    return true;
-  } else if (isa<ConstantAggregate>(c) || isa<ConstantExpr>(c)) {
-    for (const Value *subc : c->operand_values()) {
-      if (!isManifestConstant(cast<Constant>(subc)))
-        return false;
-    }
-    return true;
-  }
-  return false;
-}
-
 static bool getConstIntOrUndef(Value *Op, const APInt *&C) {
   if (auto *CI = dyn_cast<ConstantInt>(Op)) {
     C = &CI->getValue();
@@ -1845,7 +1832,7 @@ static Constant *ConstantFoldScalarCall1(StringRef Name,
     // We know we have a "Constant" argument. But we want to only
     // return true for manifest constants, not those that depend on
     // constants with unknowable values, e.g. GlobalValue or BlockAddress.
-    if (isManifestConstant(Operands[0]))
+    if (Operands[0]->isManifestConstant())
       return ConstantInt::getTrue(Ty->getContext());
     return nullptr;
   }
diff --git a/contrib/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp b/contrib/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp
index c40e5c36cdc7..a12816885c40 100644
--- a/contrib/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/contrib/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -4127,10 +4127,12 @@ static Value *simplifySelectWithICmpCond(Value *CondVal, Value *TrueVal,
                                               TrueVal, FalseVal))
     return V;
 
-  // If we have an equality comparison, then we know the value in one of the
-  // arms of the select. See if substituting this value into the arm and
+  // If we have a scalar equality comparison, then we know the value in one of
+  // the arms of the select. See if substituting this value into the arm and
   // simplifying the result yields the same value as the other arm.
-  if (Pred == ICmpInst::ICMP_EQ) {
+  // Note that the equivalence/replacement opportunity does not hold for vectors
+  // because each element of a vector select is chosen independently.
+  if (Pred == ICmpInst::ICMP_EQ && !CondVal->getType()->isVectorTy()) {
     if (SimplifyWithOpReplaced(FalseVal, CmpLHS, CmpRHS, Q,
                                /* AllowRefinement */ false, MaxRecurse) ==
             TrueVal ||
diff --git a/contrib/llvm-project/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/contrib/llvm-project/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
index 895936d47175..886b5bf4acd3 100644
--- a/contrib/llvm-project/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/contrib/llvm-project/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -344,7 +344,9 @@ MemoryDependenceResults::getInvariantGroupPointerDependency(LoadInst *LI,
       // If we hit load/store with the same invariant.group metadata (and the
       // same pointer operand) we can assume that value pointed by pointer
       // operand didn't change.
-      if ((isa<LoadInst>(U) || isa<StoreInst>(U)) &&
+      if ((isa<LoadInst>(U) ||
+           (isa<StoreInst>(U) &&
+            cast<StoreInst>(U)->getPointerOperand() == Ptr)) &&
           U->hasMetadata(LLVMContext::MD_invariant_group))
         ClosestDependency = GetClosestDependency(ClosestDependency, U);
     }
diff --git a/contrib/llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp b/contrib/llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp
index fe9d8297d679..1a9ae68573e9 100644
--- a/contrib/llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/contrib/llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -10622,6 +10622,10 @@ bool ScalarEvolution::isImpliedViaMerge(ICmpInst::Predicate Pred,
       if (!dominates(RHS, IncBB))
         return false;
       const SCEV *L = getSCEV(LPhi->getIncomingValueForBlock(IncBB));
+      // Make sure L does not refer to a value from a potentially previous
+      // iteration of a loop.
+      if (!properlyDominates(L, IncBB))
+        return false;
       if (!ProvedEasily(L, RHS))
         return false;
     }
diff --git a/contrib/llvm-project/llvm/lib/Analysis/ValueTracking.cpp b/contrib/llvm-project/llvm/lib/Analysis/ValueTracking.cpp
index e174c5efe424..75486d3c80e7 100644
--- a/contrib/llvm-project/llvm/lib/Analysis/ValueTracking.cpp
+++ b/contrib/llvm-project/llvm/lib/Analysis/ValueTracking.cpp
@@ -5150,6 +5150,9 @@ static bool programUndefinedIfUndefOrPoison(const Value *V,
     return false;
   }
 
+  // Limit number of instructions we look at, to avoid scanning through large
+  // blocks. The current limit is chosen arbitrarily.
+  unsigned ScanLimit = 32;
   BasicBlock::const_iterator End = BB->end();
 
   if (!PoisonOnly) {
@@ -5160,6 +5163,11 @@ static bool programUndefinedIfUndefOrPoison(const Value *V,
     // For example, 'udiv x, (undef | 1)' isn't UB.
 
     for (auto &I : make_range(Begin, End)) {
+      if (isa<DbgInfoIntrinsic>(I))
+        continue;
+      if (--ScanLimit == 0)
+        break;
+
       if (const auto *CB = dyn_cast<CallBase>(&I)) {
         for (unsigned i = 0; i < CB->arg_size(); ++i) {
           if (CB->paramHasAttr(i, Attribute::NoUndef) &&
*** 2621 LINES SKIPPED ***