From nobody Sun Apr 09 21:35:15 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pvlks5pyMz44JTc; Sun, 9 Apr 2023 21:35:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pvlks04Yrz4M9k; Sun, 9 Apr 2023 21:35:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681076117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uw8GxdvTkSr4ZyFYurcgeRMIlpLpiZjCA3UeTKVTKIg=; b=cQqNQvbpzXCT0Wy6avJZhc44E6gYCghK7/hht9hh22FXw+df61jKyzEGVpX6r8Fc77V99k 7G1XzWuDG3JKDdcs2L7ObWbi/NMsPEgpf1EJrEkENAjvpOujmol9vkDj2KrUYT5KgqVkR6 DNJvST3zFeM3tV8oA8hmZgglOGK4Rv83o7KYVC3fM6RMzMywt80VdbxDZ7oaVj04IBaRJN tbflsSdBO4fcu9iHuO3Yv4JcN96QOrPjpUaYFtxaoA9d5JTUBeQrgAJkR4t612hGNUXyvW WFknpKP8WQbsmZ+KSbQyhH6VCAISj+A9OjiiRmANlNSl1t0nUU8uOwuNd7EQRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681076117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uw8GxdvTkSr4ZyFYurcgeRMIlpLpiZjCA3UeTKVTKIg=; b=he0ZF+9KUAVDHYq0HKhpekJzlUgxjtDJEGmZAk+WxaniyXRWCbYAxPhtdTPHffAeQW/fid U3ZLBXBIJS+c0fWCnobdlb2QLYsIgU4vwx6fN7Z0lL3Nz2tY8cLAfmNY+ZpXe3V1omW6Qa lLf81kVL3PLre6Fv4Pcri6siWStgzZ0gt+nHaULzulTqR0Bmz3NgqW/Mmybn/Jtj4Gwjxn doIDSgQGxbpe2VQLNYSj4zJmu1VXkEPJZ8io3SMSi8PS75KH1AiOsBtxS2dSqRHVSBPGFa 9Vo0k5hb5iRMvCOmlV3K2JgrVeX6pSK4YYwUQnlCGHC+ATWV6PhRPphHEMakKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681076117; a=rsa-sha256; cv=none; b=BYevaZ/FFBK6LJcCMFUfpSDJTaNFNw9Ag12y8l4DhWcz65YANQ1jzQkHRHN+1rLiZeOv7t 0YuWrz+R2L4x8zq7aygw3tZ7w6E3IQBXU+j0G0QksYiba3Ku6PAI1on3DkcKr4iXT3Cvnh SUj+XJ1CoE9ztlYPB2fQZtHyh0oTR5WgPC5zyXCia1lTpYYyv25lbd1fspSetDFvM5xPni jKU0OSkUluQt+TMsKbJwuI6vQGvHK97ZQo3h+AGP1rHjsiO56tfeZ9oh9vHeRmUB7CnK8N 0icfuYA+CG5UnjkylWWdbaALSSfWf61UmoAO2y0OFz+5Swt6Z1BUejDY4nCAsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Pvlkr3RwnzPKT; Sun, 9 Apr 2023 21:35:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 339LZGqP081537; Sun, 9 Apr 2023 21:35:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 339LZFjU081535; Sun, 9 Apr 2023 21:35:15 GMT (envelope-from git) Date: Sun, 9 Apr 2023 21:35:15 GMT Message-Id: <202304092135.339LZFjU081535@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 74093eb27f68 - stable/13 - Merge llvm-project main llvmorg-15-init-17826-g1f8ae9d7e7e4 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 74093eb27f687d9f89d8db457e410aec1cd71b6b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=74093eb27f687d9f89d8db457e410aec1cd71b6b commit 74093eb27f687d9f89d8db457e410aec1cd71b6b Author: Dimitry Andric AuthorDate: 2022-07-27 20:11:54 +0000 Commit: Dimitry Andric CommitDate: 2023-04-09 14:54:48 +0000 Merge llvm-project main llvmorg-15-init-17826-g1f8ae9d7e7e4 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-15-init-17826-g1f8ae9d7e7e4, the last commit before the upstream release/16.x branch was created. PR: 265425 MFC after: 2 weeks (cherry picked from commit 972a253a57b6f144b0e4a3e2080a2a0076ec55a0) --- .../clang/include/clang/Analysis/CFG.h | 3 +- .../include/clang/Analysis/ConstructionContext.h | 72 +- .../FlowSensitive/DataflowAnalysisContext.h | 4 + .../Analysis/FlowSensitive/DataflowEnvironment.h | 15 + .../clang/Analysis/FlowSensitive/MapLattice.h | 9 +- .../clang/Analysis/FlowSensitive/Transfer.h | 9 +- .../FlowSensitive/TypeErasedDataflowAnalysis.h | 11 +- .../include/clang/Analysis/FlowSensitive/Value.h | 59 +- .../clang/include/clang/Basic/AttrDocs.td | 6 + .../clang/include/clang/Basic/DiagnosticIDs.h | 24 +- .../include/clang/Basic/DiagnosticParseKinds.td | 6 +- .../include/clang/Basic/DiagnosticSemaKinds.td | 8 +- .../clang/include/clang/Basic/LangOptions.def | 1 + .../clang/include/clang/Basic/TokenKinds.def | 3 + .../clang/include/clang/Basic/riscv_vector.td | 103 +-- .../clang/include/clang/CodeGen/ModuleBuilder.h | 8 +- .../clang/include/clang/Driver/Driver.h | 2 - .../clang/include/clang/Driver/Options.td | 4 + .../clang/include/clang/Frontend/Utils.h | 4 +- .../clang/include/clang/Lex/PreprocessingRecord.h | 1 - .../clang/include/clang/Lex/Preprocessor.h | 1 - .../clang/include/clang/Parse/Parser.h | 3 +- .../clang/include/clang/Sema/Overload.h | 4 + .../include/clang/Sema/RISCVIntrinsicManager.h | 36 + .../llvm-project/clang/include/clang/Sema/Scope.h | 38 +- .../llvm-project/clang/include/clang/Sema/Sema.h | 14 +- .../clang/include/clang/Sema/Template.h | 34 + .../clang/include/clang/Serialization/ASTWriter.h | 4 + .../Core/BugReporter/BugReporterVisitors.h | 2 +- .../StaticAnalyzer/Core/PathSensitive/ExprEngine.h | 19 +- .../Core/PathSensitive/ProgramState.h | 2 - .../StaticAnalyzer/Core/PathSensitive/SVals.h | 1 - .../include/clang/Support/RISCVVIntrinsicUtils.h | 100 ++- .../RefactoringActionRuleRequirements.h | 2 +- .../Tooling/Refactoring/RefactoringActionRules.h | 4 +- .../clang/Tooling/Refactoring/RefactoringOptions.h | 4 +- contrib/llvm-project/clang/lib/AST/ASTImporter.cpp | 52 +- contrib/llvm-project/clang/lib/AST/Decl.cpp | 14 +- .../llvm-project/clang/lib/AST/ExprConstant.cpp | 10 +- contrib/llvm-project/clang/lib/Analysis/CFG.cpp | 45 +- .../clang/lib/Analysis/ConstructionContext.cpp | 11 + .../clang/lib/Analysis/ExprMutationAnalyzer.cpp | 18 +- .../FlowSensitive/DataflowAnalysisContext.cpp | 71 +- .../Analysis/FlowSensitive/DataflowEnvironment.cpp | 48 +- .../lib/Analysis/FlowSensitive/DebugSupport.cpp | 14 + .../clang/lib/Analysis/FlowSensitive/Transfer.cpp | 48 +- .../FlowSensitive/TypeErasedDataflowAnalysis.cpp | 20 +- .../FlowSensitive/WatchedLiteralsSolver.cpp | 110 ++- .../clang/lib/Analysis/LiveVariables.cpp | 27 +- .../llvm-project/clang/lib/Basic/Targets/CSKY.h | 2 +- .../llvm-project/clang/lib/Basic/Targets/PPC.cpp | 3 + contrib/llvm-project/clang/lib/Basic/Targets/X86.h | 4 +- contrib/llvm-project/clang/lib/CodeGen/ABIInfo.h | 2 +- contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.h | 2 + contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 19 +- contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp | 14 +- .../llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp | 8 +- .../llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp | 12 +- .../clang/lib/CodeGen/CGOpenMPRuntimeGPU.h | 23 +- .../clang/lib/CodeGen/CodeGenAction.cpp | 25 +- .../clang/lib/CodeGen/CodeGenModule.cpp | 39 +- .../llvm-project/clang/lib/CodeGen/CodeGenModule.h | 11 +- .../clang/lib/CodeGen/ItaniumCXXABI.cpp | 6 +- .../clang/lib/CodeGen/MicrosoftCXXABI.cpp | 2 +- .../clang/lib/CodeGen/ModuleBuilder.cpp | 24 +- .../CodeGen/ObjectFilePCHContainerOperations.cpp | 4 +- .../clang/lib/CodeGen/SanitizerMetadata.h | 1 - .../clang/lib/Driver/ToolChains/Arch/ARM.cpp | 5 + .../clang/lib/Driver/ToolChains/Arch/PPC.cpp | 4 + .../clang/lib/Driver/ToolChains/Clang.cpp | 7 + .../clang/lib/Driver/ToolChains/FreeBSD.cpp | 6 +- .../llvm-project/clang/lib/Edit/EditedSource.cpp | 4 +- .../clang/lib/Format/FormatTokenLexer.cpp | 159 ++-- .../clang/lib/Frontend/CompilerInvocation.cpp | 6 + contrib/llvm-project/clang/lib/Headers/stdatomic.h | 3 +- .../clang/lib/Interpreter/IncrementalExecutor.h | 1 - contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp | 36 +- .../llvm-project/clang/lib/Parse/ParseDeclCXX.cpp | 594 +++++++-------- .../llvm-project/clang/lib/Parse/ParsePragma.cpp | 52 ++ contrib/llvm-project/clang/lib/Parse/Parser.cpp | 4 +- contrib/llvm-project/clang/lib/Sema/Scope.cpp | 82 +- contrib/llvm-project/clang/lib/Sema/Sema.cpp | 7 +- contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 20 +- contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 37 +- contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp | 45 ++ .../llvm-project/clang/lib/Sema/SemaOverload.cpp | 26 +- .../clang/lib/Sema/SemaRISCVVectorLookup.cpp | 395 ++++++++++ contrib/llvm-project/clang/lib/Sema/SemaStmt.cpp | 10 +- .../llvm-project/clang/lib/Sema/SemaTemplate.cpp | 55 +- .../clang/lib/Serialization/ASTReaderDecl.cpp | 3 +- .../clang/lib/Serialization/ASTWriter.cpp | 6 +- .../lib/StaticAnalyzer/Checkers/CStringChecker.cpp | 100 ++- .../Checkers/InnerPointerChecker.cpp | 6 +- .../lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 11 +- .../lib/StaticAnalyzer/Checkers/PaddingChecker.cpp | 2 +- .../Checkers/StdLibraryFunctionsChecker.cpp | 2 +- .../UninitializedObjectChecker.cpp | 20 +- .../UninitializedObject/UninitializedPointee.cpp | 26 +- .../StaticAnalyzer/Core/BugReporterVisitors.cpp | 23 +- .../clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 91 ++- .../lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 124 +++- .../Core/ExprEngineCallAndReturn.cpp | 28 +- .../clang/lib/StaticAnalyzer/Core/RegionStore.cpp | 69 +- .../clang/lib/Support/RISCVVIntrinsicUtils.cpp | 88 ++- .../clang/utils/TableGen/RISCVVEmitter.cpp | 417 +++++++---- .../llvm-project/clang/utils/TableGen/TableGen.cpp | 6 + .../clang/utils/TableGen/TableGenBackends.h | 1 + .../compiler-rt/lib/builtins/int_types.h | 2 +- .../lib/sanitizer_common/sanitizer_common.h | 5 + .../lib/sanitizer_common/sanitizer_win.cpp | 11 + .../compiler-rt/lib/tsan/rtl/tsan_flags.inc | 4 - .../compiler-rt/lib/tsan/rtl/tsan_platform.h | 1 + .../compiler-rt/lib/tsan/rtl/tsan_rtl.cpp | 63 +- .../compiler-rt/lib/tsan/rtl/tsan_rtl.h | 40 +- .../compiler-rt/lib/tsan/rtl/tsan_rtl_access.cpp | 9 - .../compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp | 44 +- .../compiler-rt/lib/tsan/rtl/tsan_shadow.h | 10 + .../llvm-project/libcxx/include/__algorithm/copy.h | 16 +- .../libcxx/include/__algorithm/copy_backward.h | 42 +- .../libcxx/include/__algorithm/equal_range.h | 1 + .../libcxx/include/__algorithm/includes.h | 19 +- .../libcxx/include/__algorithm/inplace_merge.h | 4 +- .../libcxx/include/__algorithm/is_heap.h | 2 +- .../libcxx/include/__algorithm/is_heap_until.h | 4 +- .../include/__algorithm/ranges_copy_backward.h | 7 +- .../libcxx/include/__algorithm/ranges_generate.h | 24 +- .../libcxx/include/__algorithm/ranges_generate_n.h | 14 +- .../libcxx/include/__algorithm/ranges_includes.h | 8 +- .../libcxx/include/__algorithm/ranges_is_heap.h | 23 +- .../include/__algorithm/ranges_is_heap_until.h | 20 +- contrib/llvm-project/libcxx/include/__assert | 6 +- .../libcxx/include/__concepts/arithmetic.h | 2 + .../libcxx/include/__format/formatter_integer.h | 1 + .../libcxx/include/__functional/invoke.h | 11 +- contrib/llvm-project/libcxx/include/__hash_table | 1 + .../include/__iterator/incrementable_traits.h | 1 + .../libcxx/include/__iterator/iterator_traits.h | 6 + .../libcxx/include/__iterator/reverse_iterator.h | 184 ++++- .../libcxx/include/__memory/swap_allocator.h | 53 ++ .../libcxx/include/__memory/temporary_buffer.h | 1 + .../include/__memory/uninitialized_algorithms.h | 144 ++++ contrib/llvm-project/libcxx/include/__split_buffer | 1 + contrib/llvm-project/libcxx/include/__tree | 1 + .../libcxx/include/__type_traits/aligned_storage.h | 142 ++++ .../libcxx/include/__type_traits/aligned_union.h | 55 ++ .../include/__type_traits/common_reference.h | 188 +++++ .../libcxx/include/__type_traits/common_type.h | 138 ++++ .../libcxx/include/__type_traits/copy_cv.h | 54 ++ .../libcxx/include/__type_traits/copy_cvref.h | 46 ++ .../include/__type_traits/is_nothrow_convertible.h | 53 ++ .../include/__type_traits/is_primary_template.h | 34 + .../include/__type_traits/is_signed_integer.h | 33 + .../include/__type_traits/is_unsigned_integer.h | 33 + .../include/__type_traits/is_valid_expansion.h | 31 + .../libcxx/include/__type_traits/lazy.h | 25 + .../include/__type_traits/make_32_64_or_128_bit.h | 48 ++ .../libcxx/include/__type_traits/make_signed.h | 76 ++ .../libcxx/include/__type_traits/make_unsigned.h | 89 +++ .../libcxx/include/__type_traits/nat.h | 32 + .../libcxx/include/__type_traits/promote.h | 95 +++ .../libcxx/include/__type_traits/remove_cvref.h | 41 + .../libcxx/include/__type_traits/type_list.h | 44 ++ .../libcxx/include/__utility/transaction.h | 5 + contrib/llvm-project/libcxx/include/algorithm | 33 + contrib/llvm-project/libcxx/include/charconv | 1 + contrib/llvm-project/libcxx/include/forward_list | 1 + contrib/llvm-project/libcxx/include/list | 1 + contrib/llvm-project/libcxx/include/math.h | 1 + contrib/llvm-project/libcxx/include/memory | 118 --- .../libcxx/include/module.modulemap.in | 20 + contrib/llvm-project/libcxx/include/string | 1 + contrib/llvm-project/libcxx/include/type_traits | 787 +------------------- contrib/llvm-project/libcxx/include/vector | 19 +- contrib/llvm-project/libcxx/src/assert.cpp | 47 +- contrib/llvm-project/lld/ELF/Driver.cpp | 15 +- contrib/llvm-project/lld/ELF/DriverUtils.cpp | 20 +- contrib/llvm-project/lld/ELF/InputFiles.cpp | 4 +- contrib/llvm-project/lld/ELF/LinkerScript.cpp | 12 +- contrib/llvm-project/lld/ELF/Options.td | 14 +- contrib/llvm-project/lld/ELF/ScriptParser.cpp | 7 +- contrib/llvm-project/lld/ELF/SyntheticSections.cpp | 12 +- contrib/llvm-project/lld/ELF/Writer.cpp | 30 +- contrib/llvm-project/lld/MachO/Driver.cpp | 20 +- contrib/llvm-project/lld/MachO/DriverUtils.cpp | 1 + contrib/llvm-project/lld/MachO/InputFiles.cpp | 60 +- contrib/llvm-project/lld/MachO/InputFiles.h | 12 +- contrib/llvm-project/lld/MachO/InputSection.cpp | 2 +- contrib/llvm-project/lld/MachO/Options.td | 10 +- contrib/llvm-project/lld/MachO/SyntheticSections.h | 6 +- .../lldb/include/lldb/Core/Disassembler.h | 8 +- .../lldb/include/lldb/Target/MemoryTagManager.h | 15 + .../lldb/include/lldb/Target/Process.h | 4 +- .../lldb/include/lldb/Target/TraceCursor.h | 36 +- .../lldb/include/lldb/Target/TraceDumper.h | 7 +- .../lldb/Utility/TraceIntelPTGDBRemotePackets.h | 4 +- .../lldb/include/lldb/lldb-enumerations.h | 8 +- .../source/Commands/CommandObjectDisassemble.cpp | 3 +- .../source/Commands/CommandObjectExpression.cpp | 2 +- .../lldb/source/Commands/CommandObjectMemory.cpp | 2 +- .../lldb/source/Commands/CommandObjectThread.cpp | 2 +- .../llvm-project/lldb/source/Commands/Options.td | 10 +- .../llvm-project/lldb/source/Core/Disassembler.cpp | 385 +--------- .../llvm-project/lldb/source/Host/common/Host.cpp | 2 +- .../Disassembler/LLVMC/DisassemblerLLVMC.cpp | 331 +++++++++ .../ExpressionParser/Clang/ClangASTSource.cpp | 10 +- .../Clang/ClangExpressionParser.cpp | 5 +- .../Instruction/ARM/EmulateInstructionARM.cpp | 4 +- .../Plugins/Instruction/ARM/EmulationStateARM.cpp | 85 ++- .../Plugins/Instruction/ARM/EmulationStateARM.h | 7 +- .../ObjectFile/Minidump/MinidumpFileBuilder.cpp | 4 +- .../Process/Utility/MemoryTagManagerAArch64MTE.cpp | 65 ++ .../Process/Utility/MemoryTagManagerAArch64MTE.h | 6 + .../Utility/RegisterContextDarwin_arm64.cpp | 2 +- .../Plugins/Process/Utility/ThreadMemory.cpp | 3 +- .../Plugins/Process/elf-core/ProcessElfCore.cpp | 72 +- .../Plugins/Process/elf-core/ProcessElfCore.h | 14 + .../gdb-remote/GDBRemoteCommunicationClient.cpp | 18 + .../gdb-remote/GDBRemoteCommunicationClient.h | 2 + .../Process/gdb-remote/ProcessGDBRemote.cpp | 68 +- .../Plugins/Process/minidump/ProcessMinidump.cpp | 3 +- .../Plugins/SymbolFile/NativePDB/PdbUtil.cpp | 2 +- .../Plugins/Trace/intel-pt/DecodedThread.cpp | 198 ++--- .../source/Plugins/Trace/intel-pt/DecodedThread.h | 180 +++-- .../Plugins/Trace/intel-pt/LibiptDecoder.cpp | 57 +- .../source/Plugins/Trace/intel-pt/LibiptDecoder.h | 10 + .../Plugins/Trace/intel-pt/ThreadDecoder.cpp | 19 +- .../source/Plugins/Trace/intel-pt/ThreadDecoder.h | 6 + .../Plugins/Trace/intel-pt/TraceCursorIntelPT.cpp | 89 ++- .../Plugins/Trace/intel-pt/TraceCursorIntelPT.h | 46 +- .../source/Plugins/Trace/intel-pt/TraceIntelPT.cpp | 50 +- .../source/Plugins/Trace/intel-pt/TraceIntelPT.h | 9 + .../Trace/intel-pt/TraceIntelPTMultiCpuDecoder.cpp | 26 +- .../Trace/intel-pt/TraceIntelPTMultiCpuDecoder.h | 6 + .../x86/x86AssemblyInspectionEngine.cpp | 2 +- contrib/llvm-project/lldb/source/Symbol/Type.cpp | 4 +- .../llvm-project/lldb/source/Target/Process.cpp | 15 +- .../lldb/source/Target/RegisterContextUnwind.cpp | 4 +- .../llvm-project/lldb/source/Target/StackFrame.cpp | 42 +- .../lldb/source/Target/ThreadPlanCallFunction.cpp | 10 +- .../lldb/source/Target/ThreadPlanTracer.cpp | 4 +- .../lldb/source/Target/TraceCursor.cpp | 2 + .../lldb/source/Target/TraceDumper.cpp | 58 +- .../llvm-project/llvm/include/llvm/ADT/DenseMap.h | 2 + .../llvm-project/llvm/include/llvm/ADT/Optional.h | 7 +- .../llvm-project/llvm/include/llvm/Analysis/DDG.h | 23 +- .../llvm/include/llvm/Analysis/MemoryBuiltins.h | 1 - .../include/llvm/Analysis/TargetTransformInfo.h | 1 - .../llvm/include/llvm/BinaryFormat/ELF.h | 22 + .../llvm/include/llvm/CodeGen/GlobalISel/CSEInfo.h | 4 +- .../include/llvm/CodeGen/GlobalISel/IRTranslator.h | 2 +- .../llvm/include/llvm/CodeGen/LiveIntervals.h | 1 - .../llvm/include/llvm/CodeGen/SelectionDAGNodes.h | 6 + .../llvm/include/llvm/CodeGen/TargetInstrInfo.h | 1 - .../llvm/include/llvm/DWARFLinker/DWARFLinker.h | 2 +- .../include/llvm/DebugInfo/PDB/IPDBEnumChildren.h | 11 +- .../include/llvm/ExecutionEngine/JITLink/x86_64.h | 23 +- .../ExecutorSharedMemoryMapperService.h | 6 +- .../llvm/include/llvm/IR/Instructions.h | 2 + .../llvm/include/llvm/IR/IntrinsicInst.h | 11 +- .../llvm/include/llvm/IR/Intrinsics.td | 6 + .../llvm/include/llvm/IR/ModuleSummaryIndex.h | 6 + .../llvm/include/llvm/IR/PrintPasses.h | 15 + .../include/llvm/LTO/legacy/LTOCodeGenerator.h | 4 + .../llvm/MC/MCDisassembler/MCDisassembler.h | 23 + .../include/llvm/Passes/StandardInstrumentations.h | 10 +- .../include/llvm/ProfileData/SampleProfReader.h | 37 +- .../include/llvm/ProfileData/SampleProfWriter.h | 45 +- .../llvm/include/llvm/Support/BinaryByteStream.h | 4 +- .../include/llvm/Support/DXILOperationCommon.h | 63 ++ .../llvm-project/llvm/include/llvm/Support/Error.h | 2 +- .../llvm/include/llvm/Support/MathExtras.h | 6 + .../llvm/include/llvm/Support/raw_ostream.h | 4 +- .../llvm/Target/GlobalISel/SelectionDAGCompat.td | 2 + .../llvm/include/llvm/Transforms/IPO.h | 2 - .../llvm/include/llvm/Transforms/IPO/Attributor.h | 2 +- .../llvm/Transforms/IPO/WholeProgramDevirt.h | 4 +- .../include/llvm/Transforms/Utils/MatrixUtils.h | 47 +- .../include/llvm/Transforms/Utils/MemoryOpRemark.h | 6 +- .../llvm/Transforms/Utils/SimplifyLibCalls.h | 2 +- .../llvm-project/llvm/lib/Analysis/CodeMetrics.cpp | 3 +- .../llvm-project/llvm/lib/Analysis/InlineCost.cpp | 4 +- .../llvm/lib/Analysis/InstructionSimplify.cpp | 12 - .../llvm/lib/Analysis/LoopAccessAnalysis.cpp | 4 +- .../llvm/lib/Analysis/MemoryBuiltins.cpp | 7 - .../llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | 3 +- .../llvm/lib/Analysis/PHITransAddr.cpp | 17 +- .../llvm/lib/Analysis/ScalarEvolution.cpp | 26 +- .../llvm/lib/Analysis/TypeMetadataUtils.cpp | 4 +- .../llvm/lib/Analysis/ValueTracking.cpp | 43 +- .../llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 +- .../llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 7 +- .../llvm/lib/CodeGen/AsmPrinter/WasmException.h | 2 +- .../llvm/lib/CodeGen/AtomicExpandPass.cpp | 7 +- .../llvm/lib/CodeGen/CodeGenPrepare.cpp | 4 +- .../llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | 3 +- .../llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 10 +- .../CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp | 5 +- .../llvm/lib/CodeGen/LiveRangeEdit.cpp | 16 +- .../llvm/lib/CodeGen/MachineFunctionPass.cpp | 29 + .../llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp | 7 +- .../llvm/lib/CodeGen/ProcessImplicitDefs.cpp | 2 +- .../llvm/lib/CodeGen/RegAllocGreedy.cpp | 19 +- .../llvm-project/llvm/lib/CodeGen/RegAllocGreedy.h | 2 + .../llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 90 ++- .../llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 41 +- .../lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | 2 +- .../lib/CodeGen/SelectionDAG/TargetLowering.cpp | 17 +- .../llvm/lib/DWARFLinker/DWARFLinker.cpp | 53 +- contrib/llvm-project/llvm/lib/DWP/DWP.cpp | 7 + .../JITLink/COFFLinkGraphBuilder.cpp | 124 ++-- .../ExecutionEngine/JITLink/COFFLinkGraphBuilder.h | 10 +- .../lib/ExecutionEngine/JITLink/COFF_x86_64.cpp | 179 +++-- .../lib/ExecutionEngine/JITLink/SEHFrameSupport.h | 61 ++ .../llvm/lib/ExecutionEngine/JITLink/x86_64.cpp | 2 + .../ExecutionEngine/Orc/ObjectFileInterface.cpp | 38 +- .../llvm-project/llvm/lib/FileCheck/FileCheck.cpp | 2 + contrib/llvm-project/llvm/lib/IR/Instructions.cpp | 4 + contrib/llvm-project/llvm/lib/IR/IntrinsicInst.cpp | 33 + .../llvm/lib/IR/ModuleSummaryIndex.cpp | 8 +- contrib/llvm-project/llvm/lib/IR/PrintPasses.cpp | 44 ++ contrib/llvm-project/llvm/lib/LTO/LTO.cpp | 4 + contrib/llvm-project/llvm/lib/LTO/LTOBackend.cpp | 3 + .../llvm-project/llvm/lib/LTO/LTOCodeGenerator.cpp | 12 + .../llvm/lib/LTO/ThinLTOCodeGenerator.cpp | 6 + .../llvm-project/llvm/lib/MC/ELFObjectWriter.cpp | 5 +- .../llvm/lib/MC/MCDisassembler/MCDisassembler.cpp | 5 + .../llvm-project/llvm/lib/MC/XCOFFObjectWriter.cpp | 2 +- .../llvm/lib/ObjCopy/ELF/ELFObject.cpp | 52 +- .../llvm-project/llvm/lib/ObjCopy/ELF/ELFObject.h | 14 +- .../llvm-project/llvm/lib/ObjectYAML/ELFYAML.cpp | 8 + .../llvm/lib/Passes/PassBuilderPipelines.cpp | 3 + .../llvm/lib/Passes/StandardInstrumentations.cpp | 58 -- .../llvm/lib/Support/ARMAttributeParser.cpp | 2 +- .../lib/Target/AArch64/AArch64ISelLowering.cpp | 144 +++- .../llvm/lib/Target/AArch64/AArch64InstrInfo.td | 6 + .../llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td | 32 +- .../AArch64/Disassembler/AArch64Disassembler.cpp | 8 + .../AArch64/Disassembler/AArch64Disassembler.h | 3 + .../GISel/AArch64O0PreLegalizerCombiner.cpp | 4 +- .../AArch64/GISel/AArch64PostLegalizerCombiner.cpp | 4 +- .../AArch64/GISel/AArch64PostLegalizerLowering.cpp | 4 +- .../AArch64/GISel/AArch64PreLegalizerCombiner.cpp | 4 +- .../llvm/lib/Target/AArch64/SVEInstrFormats.td | 12 +- .../lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp | 212 ++++-- .../llvm/lib/Target/AMDGPU/AMDGPUMIRFormatter.h | 2 +- .../Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp | 4 +- .../llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp | 826 ++++++++++++--------- .../llvm/lib/Target/AMDGPU/GCNSchedStrategy.h | 233 ++++-- .../Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp | 16 + .../llvm/lib/Target/AMDGPU/R600ISelLowering.h | 4 +- .../llvm/lib/Target/AMDGPU/SIISelLowering.cpp | 6 +- .../llvm/lib/Target/AMDGPU/SIISelLowering.h | 8 +- .../llvm/lib/Target/AMDGPU/SIRegisterInfo.td | 56 +- .../llvm/lib/Target/AMDGPU/VOPCInstructions.td | 2 +- .../Target/ARM/Disassembler/ARMDisassembler.cpp | 30 + .../llvm/lib/Target/DirectX/DXILOpBuilder.cpp | 324 ++++++++ .../llvm/lib/Target/DirectX/DXILOpBuilder.h | 46 ++ .../llvm/lib/Target/DirectX/DXILOpLowering.cpp | 167 +---- .../DirectX/DXILWriter/DXILValueEnumerator.cpp | 4 +- .../llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h | 1 - .../llvm/lib/Target/Hexagon/HexagonISelLowering.h | 3 - .../llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp | 46 -- .../llvm/lib/Target/Hexagon/HexagonInstrInfo.h | 4 - .../LoongArch/AsmParser/LoongArchAsmParser.cpp | 2 +- .../Disassembler/LoongArchDisassembler.cpp | 2 +- .../llvm/lib/Target/LoongArch/LoongArch.h | 2 +- .../lib/Target/LoongArch/LoongArchFrameLowering.h | 2 +- .../lib/Target/LoongArch/LoongArchISelDAGToDAG.h | 2 +- .../lib/Target/LoongArch/LoongArchISelLowering.h | 2 +- .../lib/Target/LoongArch/LoongArchRegisterInfo.h | 2 +- .../llvm/lib/Target/LoongArch/LoongArchSubtarget.h | 2 +- .../Target/LoongArch/LoongArchTargetMachine.cpp | 2 +- .../LoongArch/MCTargetDesc/LoongArchAsmBackend.h | 2 +- .../LoongArch/MCTargetDesc/LoongArchBaseInfo.cpp | 4 +- .../LoongArch/MCTargetDesc/LoongArchBaseInfo.h | 4 +- .../MCTargetDesc/LoongArchELFObjectWriter.cpp | 2 +- .../LoongArch/MCTargetDesc/LoongArchInstPrinter.h | 2 +- .../LoongArch/MCTargetDesc/LoongArchMCAsmInfo.h | 2 +- .../MCTargetDesc/LoongArchMCCodeEmitter.cpp | 2 +- .../MCTargetDesc/LoongArchMCTargetDesc.cpp | 2 +- .../LoongArch/MCTargetDesc/LoongArchMCTargetDesc.h | 2 +- .../LoongArch/MCTargetDesc/LoongArchMatInt.h | 4 +- .../LoongArch/TargetInfo/LoongArchTargetInfo.h | 2 +- .../lib/Target/Mips/MipsPreLegalizerCombiner.cpp | 4 +- .../llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp | 15 + .../llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 53 +- .../llvm/lib/Target/RISCV/RISCVISelLowering.h | 1 + .../llvm/lib/Target/RISCV/RISCVInstrInfo.h | 21 +- .../llvm/lib/Target/RISCV/RISCVInstrInfoC.td | 56 +- .../llvm/lib/Target/RISCV/RISCVTargetMachine.h | 3 +- .../llvm/lib/Target/SystemZ/SystemZRegisterInfo.h | 34 +- .../Target/WebAssembly/WebAssemblyISelLowering.cpp | 30 +- .../llvm/lib/Target/X86/X86ISelLowering.cpp | 84 ++- .../llvm/lib/Target/X86/X86ISelLowering.h | 2 +- .../llvm/lib/Target/X86/X86InstrInfo.h | 2 +- .../AggressiveInstCombine.cpp | 55 +- .../llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | 6 +- .../lib/Transforms/IPO/AttributorAttributes.cpp | 28 +- .../llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 61 +- .../llvm/lib/Transforms/IPO/GlobalOpt.cpp | 3 +- .../llvm/lib/Transforms/IPO/LowerTypeTests.cpp | 61 +- .../llvm/lib/Transforms/IPO/OpenMPOpt.cpp | 12 - .../llvm-project/llvm/lib/Transforms/IPO/SCCP.cpp | 2 +- .../lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp | 8 + .../llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp | 35 +- .../Transforms/InstCombine/InstCombineInternal.h | 7 +- .../Instrumentation/AddressSanitizer.cpp | 4 +- .../lib/Transforms/Scalar/LoopDataPrefetch.cpp | 8 +- .../Transforms/Scalar/LowerMatrixIntrinsics.cpp | 25 +- .../llvm/lib/Transforms/Scalar/Reassociate.cpp | 24 +- .../llvm/lib/Transforms/Utils/InlineFunction.cpp | 59 +- .../llvm/lib/Transforms/Utils/MatrixUtils.cpp | 42 +- .../llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | 137 +++- .../lib/Transforms/Vectorize/LoopVectorize.cpp | 9 +- .../lib/Transforms/Vectorize/SLPVectorizer.cpp | 4 +- .../llvm/tools/llvm-dwarfutil/DebugInfoLinker.cpp | 49 +- .../llvm/tools/llvm-dwarfutil/DebugInfoLinker.h | 4 +- .../llvm/tools/llvm-dwarfutil/llvm-dwarfutil.cpp | 22 +- .../llvm-project/llvm/tools/llvm-lto/llvm-lto.cpp | 7 + .../llvm/tools/llvm-mca/CodeRegionGenerator.cpp | 4 +- .../llvm/tools/llvm-objcopy/ObjcopyOptions.cpp | 27 +- .../llvm/tools/llvm-objcopy/ObjcopyOpts.td | 11 +- .../llvm/tools/llvm-objdump/llvm-objdump.cpp | 152 +++- .../llvm/tools/llvm-profdata/llvm-profdata.cpp | 3 +- .../llvm/tools/llvm-readobj/ELFDumper.cpp | 15 + .../llvm/tools/llvm-xray/xray-graph.cpp | 9 +- .../llvm/utils/TableGen/DXILEmitter.cpp | 107 ++- .../TableGen/GlobalISel/GIMatchDagPredicate.h | 6 +- lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/clang/Config/config.h | 2 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/lldb/Version/Version.inc | 4 +- lib/clang/include/llvm/Config/config.h | 4 +- lib/clang/include/llvm/Config/llvm-config.h | 2 +- lib/clang/include/llvm/Support/VCSRevision.h | 2 +- lib/clang/libclang/Makefile | 9 + lib/clang/liblldb/LLDBWrapLua.cpp | 2 +- lib/libc++/Makefile | 20 + 438 files changed, 9684 insertions(+), 4700 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Analysis/CFG.h b/contrib/llvm-project/clang/include/clang/Analysis/CFG.h index d8e7e1e43d81..4f16a6361950 100644 --- a/contrib/llvm-project/clang/include/clang/Analysis/CFG.h +++ b/contrib/llvm-project/clang/include/clang/Analysis/CFG.h @@ -202,7 +202,8 @@ public: isa(C) || isa(C) || isa(C) || - isa(C))); + isa(C) || + isa(C))); Data2.setPointer(const_cast(C)); } diff --git a/contrib/llvm-project/clang/include/clang/Analysis/ConstructionContext.h b/contrib/llvm-project/clang/include/clang/Analysis/ConstructionContext.h index a437160e0778..67a091199b91 100644 --- a/contrib/llvm-project/clang/include/clang/Analysis/ConstructionContext.h +++ b/contrib/llvm-project/clang/include/clang/Analysis/ConstructionContext.h @@ -36,13 +36,14 @@ public: ElidedDestructorKind, ElidableConstructorKind, ArgumentKind, - STATEMENT_WITH_INDEX_KIND_BEGIN=ArgumentKind, - STATEMENT_WITH_INDEX_KIND_END=ArgumentKind, + LambdaCaptureKind, + STATEMENT_WITH_INDEX_KIND_BEGIN = ArgumentKind, + STATEMENT_WITH_INDEX_KIND_END = LambdaCaptureKind, STATEMENT_KIND_BEGIN = VariableKind, - STATEMENT_KIND_END = ArgumentKind, + STATEMENT_KIND_END = LambdaCaptureKind, InitializerKind, - INITIALIZER_KIND_BEGIN=InitializerKind, - INITIALIZER_KIND_END=InitializerKind + INITIALIZER_KIND_BEGIN = InitializerKind, + INITIALIZER_KIND_END = InitializerKind }; LLVM_DUMP_METHOD static StringRef getKindAsString(ItemKind K) { @@ -55,6 +56,8 @@ public: case ElidedDestructorKind: return "elide destructor"; case ElidableConstructorKind: return "elide constructor"; case ArgumentKind: return "construct into argument"; + case LambdaCaptureKind: + return "construct into lambda captured variable"; case InitializerKind: return "construct into member variable"; }; llvm_unreachable("Unknown ItemKind"); @@ -72,7 +75,7 @@ private: bool hasIndex() const { return Kind >= STATEMENT_WITH_INDEX_KIND_BEGIN && - Kind >= STATEMENT_WITH_INDEX_KIND_END; + Kind <= STATEMENT_WITH_INDEX_KIND_END; } bool hasInitializer() const { @@ -127,6 +130,9 @@ public: ConstructionContextItem(const CXXCtorInitializer *Init) : Data(Init), Kind(InitializerKind), Index(0) {} + ConstructionContextItem(const LambdaExpr *LE, unsigned Index) + : Data(LE), Kind(LambdaCaptureKind), Index(Index) {} + ItemKind getKind() const { return Kind; } LLVM_DUMP_METHOD StringRef getKindAsString() const { @@ -254,7 +260,8 @@ public: CXX17ElidedCopyReturnedValueKind, RETURNED_VALUE_BEGIN = SimpleReturnedValueKind, RETURNED_VALUE_END = CXX17ElidedCopyReturnedValueKind, - ArgumentKind + ArgumentKind, + LambdaCaptureKind }; protected: @@ -298,6 +305,11 @@ public: const ConstructionContextLayer *TopLayer); Kind getKind() const { return K; } + + virtual const ArrayInitLoopExpr *getArrayInitLoop() const { return nullptr; } + + // Only declared to silence -Wnon-virtual-dtor warnings. + virtual ~ConstructionContext() = default; }; /// An abstract base class for local variable constructors. @@ -314,6 +326,12 @@ protected: public: const DeclStmt *getDeclStmt() const { return DS; } + const ArrayInitLoopExpr *getArrayInitLoop() const override { + const auto *Var = cast(DS->getSingleDecl()); + + return dyn_cast(Var->getInit()); + } + static bool classof(const ConstructionContext *CC) { return CC->getKind() >= VARIABLE_BEGIN && CC->getKind() <= VARIABLE_END; @@ -381,6 +399,10 @@ protected: public: const CXXCtorInitializer *getCXXCtorInitializer() const { return I; } + const ArrayInitLoopExpr *getArrayInitLoop() const override { + return dyn_cast(I->getInit()); + } + static bool classof(const ConstructionContext *CC) { return CC->getKind() >= INITIALIZER_BEGIN && CC->getKind() <= INITIALIZER_END; @@ -659,6 +681,42 @@ public: } }; +class LambdaCaptureConstructionContext : public ConstructionContext { + // The lambda of which the initializer we capture. + const LambdaExpr *LE; + + // Index of the captured element in the captured list. + unsigned Index; + + friend class ConstructionContext; // Allows to create<>() itself. + + explicit LambdaCaptureConstructionContext(const LambdaExpr *LE, + unsigned Index) + : ConstructionContext(LambdaCaptureKind), LE(LE), Index(Index) {} + +public: + const LambdaExpr *getLambdaExpr() const { return LE; } + unsigned getIndex() const { return Index; } + + const Expr *getInitializer() const { + return *(LE->capture_init_begin() + Index); + } + + const FieldDecl *getFieldDecl() const { + auto It = LE->getLambdaClass()->field_begin(); + std::advance(It, Index); + return *It; + } + + const ArrayInitLoopExpr *getArrayInitLoop() const override { + return dyn_cast_or_null(getInitializer()); + } + + static bool classof(const ConstructionContext *CC) { + return CC->getKind() == LambdaCaptureKind; + } +}; + } // end namespace clang #endif // LLVM_CLANG_ANALYSIS_CONSTRUCTIONCONTEXT_H diff --git a/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h b/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h index abc3183e1b0b..b3e725ad3f6a 100644 --- a/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h +++ b/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h @@ -340,6 +340,10 @@ private: llvm::DenseMap, DisjunctionValue *> DisjunctionVals; llvm::DenseMap NegationVals; + llvm::DenseMap, ImplicationValue *> + ImplicationVals; + llvm::DenseMap, BiconditionalValue *> + BiconditionalVals; // Flow conditions are tracked symbolically: each unique flow condition is // associated with a fresh symbolic variable (token), bound to the clause that diff --git a/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h b/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h index f17df36f6a4a..2e9c088d0e5c 100644 --- a/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h +++ b/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h @@ -128,6 +128,21 @@ public: /// with a symbolic representation of the `this` pointee. Environment(DataflowAnalysisContext &DACtx, const DeclContext &DeclCtx); + /// Creates and returns an environment to use for an inline analysis of the + /// callee. Uses the storage location from each argument in the `Call` as the + /// storage location for the corresponding parameter in the callee. + /// + /// Requirements: + /// + /// The callee of `Call` must be a `FunctionDecl` with a body. + /// + /// The body of the callee must not reference globals. + /// + /// The arguments of `Call` must map 1:1 to the callee's parameters. + /// + /// Each argument of `Call` must already have a `StorageLocation`. + Environment pushCall(const CallExpr *Call) const; + /// Returns true if and only if the environment is equivalent to `Other`, i.e /// the two environments: /// - have the same mappings from declarations to storage locations, diff --git a/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/MapLattice.h b/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/MapLattice.h index 014cd60841ee..16b0c978779a 100644 --- a/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/MapLattice.h +++ b/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/MapLattice.h @@ -54,10 +54,13 @@ public: // The `bottom` element is the empty map. static MapLattice bottom() { return MapLattice(); } - void insert(const std::pair &P) { C.insert(P); } + std::pair + insert(const std::pair &P) { + return C.insert(P); + } - void insert(std::pair &&P) { - C.insert(std::move(P)); + std::pair insert(std::pair &&P) { + return C.insert(std::move(P)); } unsigned size() const { return C.size(); } diff --git a/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/Transfer.h b/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/Transfer.h index 25afa01f307c..cbb625487c1e 100644 --- a/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/Transfer.h +++ b/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/Transfer.h @@ -20,6 +20,12 @@ namespace clang { namespace dataflow { +struct TransferOptions { + /// Determines whether to analyze function bodies when present in the + /// translation unit. + bool ContextSensitive = false; +}; + /// Maps statements to the environments of basic blocks that contain them. class StmtToEnvMap { public: @@ -36,7 +42,8 @@ public: /// Requirements: /// /// `S` must not be `ParenExpr` or `ExprWithCleanups`. -void transfer(const StmtToEnvMap &StmtToEnv, const Stmt &S, Environment &Env); +void transfer(const StmtToEnvMap &StmtToEnv, const Stmt &S, Environment &Env, + TransferOptions Options); } // namespace dataflow } // namespace clang diff --git a/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h b/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h index b043062459e4..92700f164e7b 100644 --- a/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h +++ b/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h @@ -23,6 +23,7 @@ #include "clang/Analysis/FlowSensitive/ControlFlowContext.h" #include "clang/Analysis/FlowSensitive/DataflowEnvironment.h" #include "clang/Analysis/FlowSensitive/DataflowLattice.h" +#include "clang/Analysis/FlowSensitive/Transfer.h" #include "llvm/ADT/Any.h" #include "llvm/ADT/Optional.h" #include "llvm/Support/Error.h" @@ -36,6 +37,9 @@ struct DataflowAnalysisOptions { // (at which point the built-in transfer functions can be simply a standalone // analysis). bool ApplyBuiltinTransfer = true; + + /// Only has an effect if `ApplyBuiltinTransfer` is true. + TransferOptions BuiltinTransferOptions; }; /// Type-erased lattice element container. @@ -57,7 +61,7 @@ public: /// Deprecated. Use the `DataflowAnalysisOptions` constructor instead. TypeErasedDataflowAnalysis(bool ApplyBuiltinTransfer) - : Options({ApplyBuiltinTransfer}) {} + : Options({ApplyBuiltinTransfer, TransferOptions{}}) {} TypeErasedDataflowAnalysis(DataflowAnalysisOptions Options) : Options(Options) {} @@ -90,6 +94,11 @@ public: /// Determines whether to apply the built-in transfer functions, which model /// the heap and stack in the `Environment`. bool applyBuiltinTransfer() const { return Options.ApplyBuiltinTransfer; } + + /// Returns the options to be passed to the built-in transfer functions. + TransferOptions builtinTransferOptions() const { + return Options.BuiltinTransferOptions; + } }; /// Type-erased model of the program at a given program point. diff --git a/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/Value.h b/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/Value.h index 70348f874543..c63799fe6a46 100644 --- a/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/Value.h +++ b/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/Value.h @@ -37,12 +37,13 @@ public: Pointer, Struct, - // Synthetic boolean values are either atomic values or composites that - // represent conjunctions, disjunctions, and negations. + // Synthetic boolean values are either atomic values or logical connectives. AtomicBool, Conjunction, Disjunction, - Negation + Negation, + Implication, + Biconditional, }; explicit Value(Kind ValKind) : ValKind(ValKind) {} @@ -84,7 +85,9 @@ public: return Val->getKind() == Kind::AtomicBool || Val->getKind() == Kind::Conjunction || Val->getKind() == Kind::Disjunction || - Val->getKind() == Kind::Negation; + Val->getKind() == Kind::Negation || + Val->getKind() == Kind::Implication || + Val->getKind() == Kind::Biconditional; } }; @@ -162,6 +165,54 @@ private: BoolValue &SubVal; }; +/// Models a boolean implication. +/// +/// Equivalent to `!LHS v RHS`. +class ImplicationValue : public BoolValue { +public: + explicit ImplicationValue(BoolValue &LeftSubVal, BoolValue &RightSubVal) + : BoolValue(Kind::Implication), LeftSubVal(LeftSubVal), + RightSubVal(RightSubVal) {} + + static bool classof(const Value *Val) { + return Val->getKind() == Kind::Implication; + } + + /// Returns the left sub-value of the implication. + BoolValue &getLeftSubValue() const { return LeftSubVal; } + + /// Returns the right sub-value of the implication. + BoolValue &getRightSubValue() const { return RightSubVal; } + +private: + BoolValue &LeftSubVal; + BoolValue &RightSubVal; +}; + +/// Models a boolean biconditional. +/// +/// Equivalent to `(LHS ^ RHS) v (!LHS ^ !RHS)`. +class BiconditionalValue : public BoolValue { +public: + explicit BiconditionalValue(BoolValue &LeftSubVal, BoolValue &RightSubVal) + : BoolValue(Kind::Biconditional), LeftSubVal(LeftSubVal), + RightSubVal(RightSubVal) {} + + static bool classof(const Value *Val) { + return Val->getKind() == Kind::Biconditional; + } + + /// Returns the left sub-value of the biconditional. + BoolValue &getLeftSubValue() const { return LeftSubVal; } + + /// Returns the right sub-value of the biconditional. + BoolValue &getRightSubValue() const { return RightSubVal; } + +private: + BoolValue &LeftSubVal; + BoolValue &RightSubVal; +}; + /// Models an integer. class IntegerValue : public Value { public: diff --git a/contrib/llvm-project/clang/include/clang/Basic/AttrDocs.td b/contrib/llvm-project/clang/include/clang/Basic/AttrDocs.td index aff0dbbdd94d..5c84e2fc5b77 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/AttrDocs.td +++ b/contrib/llvm-project/clang/include/clang/Basic/AttrDocs.td @@ -5040,6 +5040,12 @@ general this requires the template to be declared at least twice. For example: clang::preferred_name(wstring)]] basic_string { // ... }; + + +Note that the ``preferred_name`` attribute will be ignored when the compiler +writes a C++20 Module interface now. This is due to a compiler issue +(https://github.com/llvm/llvm-project/issues/56490) that blocks users to modularize +declarations with `preferred_name`. This is intended to be fixed in the future. }]; } diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticIDs.h b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticIDs.h index 709d5e1dc80d..91b180f8004d 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticIDs.h +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticIDs.h @@ -45,18 +45,18 @@ namespace clang { // Start position for diagnostics. enum { DIAG_START_COMMON = 0, - DIAG_START_DRIVER = DIAG_START_COMMON + DIAG_SIZE_COMMON, - DIAG_START_FRONTEND = DIAG_START_DRIVER + DIAG_SIZE_DRIVER, - DIAG_START_SERIALIZATION = DIAG_START_FRONTEND + DIAG_SIZE_FRONTEND, - DIAG_START_LEX = DIAG_START_SERIALIZATION + DIAG_SIZE_SERIALIZATION, - DIAG_START_PARSE = DIAG_START_LEX + DIAG_SIZE_LEX, - DIAG_START_AST = DIAG_START_PARSE + DIAG_SIZE_PARSE, - DIAG_START_COMMENT = DIAG_START_AST + DIAG_SIZE_AST, - DIAG_START_CROSSTU = DIAG_START_COMMENT + DIAG_SIZE_COMMENT, - DIAG_START_SEMA = DIAG_START_CROSSTU + DIAG_SIZE_CROSSTU, - DIAG_START_ANALYSIS = DIAG_START_SEMA + DIAG_SIZE_SEMA, - DIAG_START_REFACTORING = DIAG_START_ANALYSIS + DIAG_SIZE_ANALYSIS, - DIAG_UPPER_LIMIT = DIAG_START_REFACTORING + DIAG_SIZE_REFACTORING + DIAG_START_DRIVER = DIAG_START_COMMON + static_cast(DIAG_SIZE_COMMON), + DIAG_START_FRONTEND = DIAG_START_DRIVER + static_cast(DIAG_SIZE_DRIVER), + DIAG_START_SERIALIZATION = DIAG_START_FRONTEND + static_cast(DIAG_SIZE_FRONTEND), + DIAG_START_LEX = DIAG_START_SERIALIZATION + static_cast(DIAG_SIZE_SERIALIZATION), + DIAG_START_PARSE = DIAG_START_LEX + static_cast(DIAG_SIZE_LEX), + DIAG_START_AST = DIAG_START_PARSE + static_cast(DIAG_SIZE_PARSE), + DIAG_START_COMMENT = DIAG_START_AST + static_cast(DIAG_SIZE_AST), + DIAG_START_CROSSTU = DIAG_START_COMMENT + static_cast(DIAG_SIZE_COMMENT), + DIAG_START_SEMA = DIAG_START_CROSSTU + static_cast(DIAG_SIZE_CROSSTU), + DIAG_START_ANALYSIS = DIAG_START_SEMA + static_cast(DIAG_SIZE_SEMA), + DIAG_START_REFACTORING = DIAG_START_ANALYSIS + static_cast(DIAG_SIZE_ANALYSIS), + DIAG_UPPER_LIMIT = DIAG_START_REFACTORING + static_cast(DIAG_SIZE_REFACTORING) }; class CustomDiagInfo; diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td index 352a050ba5cf..18adb21e2be0 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td @@ -282,7 +282,7 @@ def err_inline_nested_namespace_definition : Error< def err_expected_semi_after_attribute_list : Error< "expected ';' after attribute list">; def err_expected_semi_after_static_assert : Error< - "expected ';' after static_assert">; + "expected ';' after '%0'">; def err_expected_semi_for : Error<"expected ';' in 'for' statement specifier">; def err_single_decl_assign_in_for_range : Error< "range-based 'for' statement uses ':', not '='">; @@ -425,7 +425,7 @@ def err_unexpected_token_in_nested_name_spec : Error< def err_bool_redeclaration : Error< "redeclaration of C++ built-in type 'bool'">; def warn_cxx98_compat_static_assert : Warning< - "static_assert declarations are incompatible with C++98">, + "'static_assert' declarations are incompatible with C++98">, InGroup, DefaultIgnore; def ext_ms_static_assert : ExtWarn< "use of 'static_assert' without inclusion of is a Microsoft " @@ -538,6 +538,8 @@ def err_invalid_operator_on_type : Error< "cannot use %select{dot|arrow}0 operator on a type">; def err_expected_unqualified_id : Error< "expected %select{identifier|unqualified-id}0">; +def err_while_loop_outside_of_a_function : Error< + "while loop outside of a function">; def err_brackets_go_after_unqualified_id : Error< "brackets are not allowed here; to declare an array, " "place the brackets after the %select{identifier|name}0">; diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td index 756102720049..6ff5b8de57fd 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -1526,12 +1526,12 @@ def err_messaging_class_with_direct_method : Error< // C++ declarations def err_static_assert_expression_is_not_constant : Error< - "static_assert expression is not an integral constant expression">; + "static assertion expression is not an integral constant expression">; def err_constexpr_if_condition_expression_is_not_constant : Error< "constexpr if condition is not a constant expression">; -def err_static_assert_failed : Error<"static_assert failed%select{: %1|}0">; +def err_static_assert_failed : Error<"static assertion failed%select{: %1|}0">; def err_static_assert_requirement_failed : Error< - "static_assert failed due to requirement '%0'%select{: %2|}1">; + "static assertion failed due to requirement '%0'%select{: %2|}1">; def warn_consteval_if_always_true : Warning< "consteval if is always true in an %select{unevaluated|immediate}0 context">, @@ -5774,6 +5774,8 @@ def warn_forward_class_redefinition : Warning< def err_redefinition_different_typedef : Error< "%select{typedef|type alias|type alias template}0 " "redefinition with different types%diff{ ($ vs $)|}1,2">; +def err_redefinition_different_concept : Error< + "redefinition of concept %0 with different template parameters or requirements">; def err_tag_reference_non_tag : Error< "%select{non-struct type|non-class type|non-union type|non-enum " "type|typedef|type alias|template|type alias template|template " diff --git a/contrib/llvm-project/clang/include/clang/Basic/LangOptions.def b/contrib/llvm-project/clang/include/clang/Basic/LangOptions.def index 6fb31c5655ab..ad366821f3cb 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/LangOptions.def +++ b/contrib/llvm-project/clang/include/clang/Basic/LangOptions.def @@ -195,6 +195,7 @@ VALUE_LANGOPT(DoubleSize , 32, 0, "width of double") VALUE_LANGOPT(LongDoubleSize , 32, 0, "width of long double") LANGOPT(PPCIEEELongDouble , 1, 0, "use IEEE 754 quadruple-precision for long double") LANGOPT(EnableAIXExtendedAltivecABI , 1, 0, "__EXTABI__ predefined macro") +LANGOPT(EnableAIXQuadwordAtomicsABI , 1, 0, "Use 16-byte atomic lock free semantics") COMPATIBLE_VALUE_LANGOPT(PICLevel , 2, 0, "__PIC__ level") COMPATIBLE_VALUE_LANGOPT(PIE , 1, 0, "is pie") LANGOPT(ROPI , 1, 0, "Read-only position independence") diff --git a/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def b/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def index 7b65a1537805..84fc0893c8b5 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def +++ b/contrib/llvm-project/clang/include/clang/Basic/TokenKinds.def @@ -908,6 +908,9 @@ PRAGMA_ANNOTATION(pragma_fp) // Annotation for the attribute pragma directives - #pragma clang attribute ... PRAGMA_ANNOTATION(pragma_attribute) +// Annotation for the riscv pragma directives - #pragma clang riscv intrinsic ... +PRAGMA_ANNOTATION(pragma_riscv) + // Annotations for module import translated from #include etc. ANNOTATION(module_include) ANNOTATION(module_begin) diff --git a/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td b/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td index d96020ee40d0..6b21f48110de 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td +++ b/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td @@ -186,7 +186,7 @@ class RVVBuiltin