git: 49071a9c083d - stable/13 - Merge llvm-project release/16.x llvmorg-16.0.1-0-gcd89023f7979
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 23 Jul 2023 18:27:01 UTC
The branch stable/13 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=49071a9c083dd7841f8cdf5a1f7023a945262e2d
commit 49071a9c083dd7841f8cdf5a1f7023a945262e2d
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-04-17 17:14:23 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-07-23 17:38:08 +0000
Merge llvm-project release/16.x llvmorg-16.0.1-0-gcd89023f7979
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-16.0.1-0-gcd89023f7979 (aka 16.0.1 release).
PR: 271047
MFC after: 1 month
(cherry picked from commit 1ac55f4cb0001fed92329746c730aa9a947c09a5)
---
contrib/llvm-project/clang/include/clang-c/Index.h | 2 +-
.../include/clang/Basic/DiagnosticParseKinds.td | 7 +-
.../include/clang/Basic/DiagnosticSemaKinds.td | 5 +-
.../clang/include/clang/Basic/arm_sve.td | 41 +-
.../clang/include/clang/Basic/riscv_vector.td | 102 +-
.../clang/include/clang/Driver/Options.td | 2 +
.../clang/include/clang/Format/Format.h | 39 +-
.../clang/include/clang/Lex/Preprocessor.h | 184 +-
.../clang/include/clang/Sema/DeclSpec.h | 10 +-
.../llvm-project/clang/include/clang/Sema/Sema.h | 38 +-
.../clang/include/clang/Sema/SemaInternal.h | 4 +-
.../StaticAnalyzer/Core/PathSensitive/SMTConv.h | 4 +-
.../include/clang/Support/RISCVVIntrinsicUtils.h | 46 +-
.../DependencyScanning/DependencyScanningService.h | 6 +-
.../DependencyScanning/DependencyScanningTool.h | 27 +-
.../DependencyScanning/DependencyScanningWorker.h | 6 +-
.../DependencyScanning/ModuleDepCollector.h | 29 +-
.../llvm-project/clang/lib/AST/ExprConstant.cpp | 2 +-
contrib/llvm-project/clang/lib/AST/Type.cpp | 12 +-
.../clang/lib/Basic/Targets/AArch64.cpp | 6 +-
.../llvm-project/clang/lib/Basic/Targets/ARM.cpp | 3 +-
contrib/llvm-project/clang/lib/Basic/Targets/PPC.h | 8 +-
.../llvm-project/clang/lib/Basic/Targets/RISCV.cpp | 4 +-
.../llvm-project/clang/lib/Basic/Targets/X86.cpp | 8 +-
contrib/llvm-project/clang/lib/CodeGen/CGCXXABI.h | 5 +-
contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp | 4 +-
.../llvm-project/clang/lib/CodeGen/CGExprCXX.cpp | 11 +-
.../clang/lib/CodeGen/MicrosoftCXXABI.cpp | 21 +-
.../llvm-project/clang/lib/CodeGen/TargetInfo.cpp | 98 +-
contrib/llvm-project/clang/lib/Driver/Driver.cpp | 4 +-
.../clang/lib/Driver/SanitizerArgs.cpp | 4 +-
.../clang/lib/Driver/ToolChains/Arch/PPC.cpp | 93 +-
.../clang/lib/Driver/ToolChains/Arch/PPC.h | 2 +
.../clang/lib/Driver/ToolChains/Clang.cpp | 11 +-
.../clang/lib/Driver/ToolChains/Cuda.cpp | 15 +-
.../clang/lib/Driver/ToolChains/FreeBSD.cpp | 71 +-
.../clang/lib/Driver/ToolChains/FreeBSD.h | 14 +-
.../clang/lib/Driver/ToolChains/Fuchsia.cpp | 2 +-
.../clang/lib/Driver/ToolChains/MinGW.cpp | 10 +
contrib/llvm-project/clang/lib/Format/Format.cpp | 8 +-
.../lib/Format/IntegerLiteralSeparatorFixer.cpp | 56 +-
.../lib/Format/IntegerLiteralSeparatorFixer.h | 3 +-
.../clang/lib/Format/QualifierAlignmentFixer.cpp | 5 +-
.../clang/lib/Format/TokenAnnotator.cpp | 3 +
.../clang/lib/Format/UnwrappedLineParser.cpp | 31 +-
.../clang/lib/Frontend/CompilerInstance.cpp | 9 +-
contrib/llvm-project/clang/lib/Headers/immintrin.h | 4 +-
contrib/llvm-project/clang/lib/Headers/smmintrin.h | 2 +-
.../clang/lib/Lex/PPMacroExpansion.cpp | 37 +-
.../llvm-project/clang/lib/Lex/Preprocessor.cpp | 44 +-
contrib/llvm-project/clang/lib/Lex/TokenLexer.cpp | 12 +-
contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp | 11 +-
.../llvm-project/clang/lib/Parse/ParseDeclCXX.cpp | 5 +-
contrib/llvm-project/clang/lib/Parse/ParseExpr.cpp | 8 -
contrib/llvm-project/clang/lib/Sema/SemaAttr.cpp | 17 -
.../llvm-project/clang/lib/Sema/SemaConcept.cpp | 27 +-
.../llvm-project/clang/lib/Sema/SemaCoroutine.cpp | 4 +-
contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp | 34 +-
.../llvm-project/clang/lib/Sema/SemaDeclCXX.cpp | 3 +-
.../llvm-project/clang/lib/Sema/SemaExprCXX.cpp | 10 +-
contrib/llvm-project/clang/lib/Sema/SemaModule.cpp | 13 +-
.../clang/lib/Sema/SemaRISCVVectorLookup.cpp | 5 +-
.../llvm-project/clang/lib/Sema/SemaTemplate.cpp | 11 +-
.../clang/lib/Sema/SemaTemplateDeduction.cpp | 7 +-
.../clang/lib/Sema/SemaTemplateVariadic.cpp | 234 ++-
contrib/llvm-project/clang/lib/Sema/SemaType.cpp | 6 -
.../llvm-project/clang/lib/Sema/TreeTransform.h | 3 +-
.../Checkers/ReturnPointerRangeChecker.cpp | 4 +
.../clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 2 +-
.../StaticAnalyzer/Core/RangeConstraintManager.cpp | 13 +-
.../clang/lib/StaticAnalyzer/Core/RegionStore.cpp | 8 +-
.../clang/lib/Support/RISCVVIntrinsicUtils.cpp | 90 +-
.../DependencyScanning/DependencyScanningTool.cpp | 150 +-
.../DependencyScanningWorker.cpp | 4 +-
.../DependencyScanning/ModuleDepCollector.cpp | 33 +-
.../clang/utils/TableGen/RISCVVEmitter.cpp | 5 +-
.../compiler-rt/lib/builtins/cpu_model.c | 3 +
.../sanitizer_common/sanitizer_linux_libcdep.cpp | 1 +
.../sanitizer_common/sanitizer_symbolizer_win.cpp | 2 -
.../include/__algorithm/ranges_binary_search.h | 4 +-
.../llvm-project/libcxx/include/__algorithm/sort.h | 578 ++----
contrib/llvm-project/libcxx/include/__config | 38 +-
.../libcxx/include/__expected/expected.h | 7 +-
.../libcxx/include/__format/concepts.h | 5 +-
.../libcxx/include/__format/format_functions.h | 8 +-
.../include/__format/formatter_floating_point.h | 3 +-
.../libcxx/include/__functional/function.h | 38 +-
.../libcxx/include/__functional/hash.h | 4 +
.../libcxx/include/__memory/construct_at.h | 10 +
.../libcxx/include/__memory/shared_ptr.h | 218 ++-
.../include/__memory/uninitialized_algorithms.h | 34 +-
.../__memory_resource/polymorphic_allocator.h | 2 +-
.../libcxx/include/__ranges/elements_view.h | 118 +-
.../libcxx/include/__ranges/filter_view.h | 50 +-
.../libcxx/include/__ranges/iota_view.h | 432 ++---
.../libcxx/include/__ranges/istream_view.h | 26 +-
.../libcxx/include/__ranges/join_view.h | 96 +-
.../libcxx/include/__ranges/split_view.h | 52 +-
.../libcxx/include/__ranges/take_while_view.h | 30 +-
.../libcxx/include/__ranges/transform_view.h | 127 +-
.../libcxx/include/__type_traits/add_pointer.h | 4 +-
.../libcxx/include/__type_traits/remove_pointer.h | 4 +-
.../libcxx/include/__utility/exception_guard.h | 47 +-
contrib/llvm-project/libcxx/include/any | 10 +-
.../libcxx/include/module.modulemap.in | 16 +-
.../llvm-project/libcxx/include/source_location | 6 +-
contrib/llvm-project/libcxx/include/version | 4 +-
.../libunwind/include/libunwind.modulemap | 3 +
contrib/llvm-project/libunwind/include/unwind.h | 4 +-
.../libunwind/src/DwarfInstructions.hpp | 3 +-
.../libunwind/src/UnwindRegistersRestore.S | 18 +
.../libunwind/src/UnwindRegistersSave.S | 11 +
contrib/llvm-project/lld/COFF/MinGW.cpp | 3 +
contrib/llvm-project/lld/ELF/Arch/RISCV.cpp | 6 +-
contrib/llvm-project/lld/ELF/ICF.cpp | 10 +-
contrib/llvm-project/lld/ELF/Relocations.cpp | 10 +-
contrib/llvm-project/lld/ELF/SymbolTable.cpp | 4 +-
contrib/llvm-project/lld/docs/ReleaseNotes.rst | 17 +
.../Plugins/Language/CPlusPlus/Coroutines.cpp | 164 +-
.../source/Plugins/Language/CPlusPlus/Coroutines.h | 7 +-
.../Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 143 +-
.../NativeRegisterContextFreeBSD_mips64.cpp | 4 +-
.../NativeRegisterContextFreeBSD_powerpc.cpp | 4 +-
.../llvm/include/llvm/Analysis/ScalarEvolution.h | 11 +-
.../llvm/DebugInfo/LogicalView/Core/LVElement.h | 1 -
.../llvm/DebugInfo/LogicalView/Core/LVStringPool.h | 7 -
.../llvm/DebugInfo/LogicalView/Core/LVSupport.h | 4 +
.../llvm/include/llvm/Debuginfod/Debuginfod.h | 6 +-
.../llvm/include/llvm/IR/IntrinsicsAArch64.td | 31 +
.../llvm/ProfileData/Coverage/CoverageMapping.h | 16 +-
.../ProfileData/Coverage/CoverageMappingReader.h | 3 +-
.../llvm/include/llvm/Support/ExitCodes.h | 6 +-
.../llvm/include/llvm/Support/RISCVISAInfo.h | 6 +
.../llvm/include/llvm/Support/Signals.h | 11 +-
.../include/llvm/TargetParser/RISCVTargetParser.h | 5 +
.../llvm/include/llvm/TargetParser/Triple.h | 8 +
.../llvm/include/llvm/Transforms/IPO/OpenMPOpt.h | 12 +
.../llvm/lib/Analysis/LazyValueInfo.cpp | 13 +-
.../llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 +
.../llvm-project/llvm/lib/CodeGen/IfConversion.cpp | 9 +
.../llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 13 +-
.../llvm/lib/CodeGen/TargetLoweringBase.cpp | 4 +-
.../lib/DebugInfo/LogicalView/Core/LVSupport.cpp | 6 +
.../llvm/lib/DebugInfo/Symbolize/Symbolize.cpp | 27 +-
.../llvm/lib/Debuginfod/Debuginfod.cpp | 19 +-
.../lib/ExecutionEngine/JITLink/ELF_aarch64.cpp | 1 +
.../llvm/lib/ExecutionEngine/Orc/Layer.cpp | 4 +
contrib/llvm-project/llvm/lib/IR/AutoUpgrade.cpp | 35 +
contrib/llvm-project/llvm/lib/IR/Verifier.cpp | 6 -
.../llvm-project/llvm/lib/Object/ELFObjectFile.cpp | 7 +-
.../llvm/lib/Passes/PassBuilderPipelines.cpp | 14 +-
.../llvm-project/llvm/lib/Passes/PassRegistry.def | 1 +
.../lib/ProfileData/Coverage/CoverageMapping.cpp | 110 +-
.../ProfileData/Coverage/CoverageMappingReader.cpp | 19 +-
.../lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S | 2 +
.../BLAKE3/blake3_avx2_x86-64_windows_gnu.S | 2 +
.../BLAKE3/blake3_avx2_x86-64_windows_msvc.asm | 12 +-
.../lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S | 2 +
.../BLAKE3/blake3_avx512_x86-64_windows_gnu.S | 2 +
.../BLAKE3/blake3_avx512_x86-64_windows_msvc.asm | 36 +-
.../llvm/lib/Support/BLAKE3/blake3_impl.h | 10 +-
.../lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S | 2 +
.../BLAKE3/blake3_sse2_x86-64_windows_gnu.S | 2 +
.../BLAKE3/blake3_sse2_x86-64_windows_msvc.asm | 36 +-
.../lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S | 2 +
.../BLAKE3/blake3_sse41_x86-64_windows_gnu.S | 2 +
.../BLAKE3/blake3_sse41_x86-64_windows_msvc.asm | 36 +-
.../llvm/lib/Support/BLAKE3/llvm_blake3_prefix.h | 41 +
contrib/llvm-project/llvm/lib/Support/Parallel.cpp | 8 +-
.../llvm-project/llvm/lib/Support/RISCVISAInfo.cpp | 63 +
.../llvm-project/llvm/lib/Support/Windows/Path.inc | 2 -
.../llvm/lib/Support/Windows/Signals.inc | 23 +-
contrib/llvm-project/llvm/lib/Support/Z3Solver.cpp | 2 +-
.../llvm-project/llvm/lib/Support/raw_ostream.cpp | 12 +-
.../llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td | 14 +-
.../llvm/lib/Target/AArch64/SVEInstrFormats.td | 52 +-
.../llvm/lib/Target/ARM/ARMFrameLowering.cpp | 28 +
.../llvm-project/llvm/lib/Target/BPF/BTFDebug.cpp | 46 +-
.../llvm-project/llvm/lib/Target/BPF/BTFDebug.h | 3 +
.../Target/Hexagon/AsmParser/HexagonAsmParser.cpp | 2 +-
.../llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 3 +-
.../Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp | 10 +
.../llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 22 +
.../llvm/lib/Target/RISCV/RISCVISelLowering.h | 4 +
.../llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp | 5 +-
.../llvm/lib/Target/RISCV/RISCVSubtarget.cpp | 3 +
.../llvm/lib/Target/RISCV/RISCVSubtarget.h | 2 +
.../Target/Sparc/MCTargetDesc/SparcInstPrinter.cpp | 2 +
.../llvm/lib/Target/Sparc/SparcInstrInfo.cpp | 121 +-
.../llvm/lib/Target/Sparc/SparcInstrInfo.h | 9 +
.../llvm/lib/Target/Sparc/SparcInstrInfo.td | 9 +-
.../llvm/lib/Target/Sparc/SparcTargetMachine.cpp | 7 +
contrib/llvm-project/llvm/lib/Target/X86/X86.td | 3 +-
.../llvm/lib/Target/X86/X86CallingConv.td | 4 +-
.../llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | 5 +-
.../llvm/lib/Target/X86/X86ISelLowering.cpp | 101 +-
.../llvm/lib/Target/X86/X86ISelLowering.h | 6 +
.../llvm/lib/Target/X86/X86InstrCompiler.td | 6 +-
.../llvm/lib/Target/X86/X86InstrFPStack.td | 15 +
.../llvm/lib/Target/X86/X86InstrSSE.td | 17 +
.../llvm/lib/Target/X86/X86PfmCounters.td | 15 +-
.../llvm/lib/Target/X86/X86ScheduleZnver4.td | 1957 ++++++++++++++++++++
.../llvm/lib/TargetParser/ARMTargetParser.cpp | 2 +-
.../llvm/lib/TargetParser/RISCVTargetParser.cpp | 6 +
.../llvm/lib/Transforms/IPO/Attributor.cpp | 22 +-
.../lib/Transforms/IPO/AttributorAttributes.cpp | 32 +-
.../llvm/lib/Transforms/IPO/OpenMPOpt.cpp | 79 +-
.../Transforms/InstCombine/InstCombineCompares.cpp | 16 +-
.../llvm/lib/Transforms/Utils/Local.cpp | 3 +-
.../lib/Transforms/Vectorize/LoopVectorize.cpp | 15 +-
.../llvm/tools/llvm-cov/CodeCoverage.cpp | 32 +-
.../llvm/tools/llvm-objdump/ObjdumpOpts.td | 4 +-
.../llvm/tools/llvm-objdump/llvm-objdump.cpp | 4 +-
.../llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp | 8 +-
contrib/llvm-project/openmp/runtime/src/kmp_os.h | 2 +-
.../openmp/runtime/src/kmp_runtime.cpp | 6 +-
.../openmp/runtime/src/kmp_safe_c_api.h | 2 +
.../llvm-project/openmp/runtime/src/kmp_str.cpp | 8 +-
.../llvm-project/openmp/runtime/src/z_Linux_asm.S | 5 +-
lib/clang/include/VCSVersion.inc | 6 +-
lib/clang/include/clang/Basic/Version.inc | 6 +-
lib/clang/include/lld/Common/Version.inc | 2 +-
lib/clang/include/lldb/Version/Version.inc | 6 +-
lib/clang/include/llvm/Config/config.h | 9 +-
lib/clang/include/llvm/Config/llvm-config.h | 4 +-
lib/clang/include/llvm/Support/VCSRevision.h | 2 +-
usr.bin/clang/llvm-cov/Makefile | 1 +
227 files changed, 5335 insertions(+), 2401 deletions(-)
diff --git a/contrib/llvm-project/clang/include/clang-c/Index.h b/contrib/llvm-project/clang/include/clang-c/Index.h
index fd758ddde085..a3e54285f89f 100644
--- a/contrib/llvm-project/clang/include/clang-c/Index.h
+++ b/contrib/llvm-project/clang/include/clang-c/Index.h
@@ -34,7 +34,7 @@
* compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable.
*/
#define CINDEX_VERSION_MAJOR 0
-#define CINDEX_VERSION_MINOR 62
+#define CINDEX_VERSION_MINOR 63
#define CINDEX_VERSION_ENCODE(major, minor) (((major)*10000) + ((minor)*1))
diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td
index c367a34b762b..e99beb3a7636 100644
--- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td
+++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticParseKinds.td
@@ -1052,7 +1052,7 @@ def err_lambda_template_parameter_list_empty : Error<
// C++2b static lambdas
def err_static_lambda: ExtWarn<
"static lambdas are a C++2b extension">, InGroup<CXX2b>;
-def warn_cxx20_compat_static_lambda: ExtWarn<
+def warn_cxx20_compat_static_lambda : Warning<
"static lambdas are incompatible with C++ standards before C++2b">,
InGroup<CXXPre2bCompat>, DefaultIgnore;
def err_static_mutable_lambda : Error<
@@ -1607,11 +1607,6 @@ def err_import_in_wrong_fragment : Error<
def err_export_empty : Error<"export declaration cannot be empty">;
}
-def ext_offsetof_member_designator : Extension<
- "using %select{a member access expression|an array subscript expression}0 "
- "within '%select{__builtin_offsetof|offsetof}1' is a Clang extension">,
- InGroup<GNUOffsetofExtensions>;
-
let CategoryName = "Generics Issue" in {
def err_objc_expected_type_parameter : Error<
diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td
index de56e3e1566b..bfe582d8252f 100644
--- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -9138,8 +9138,9 @@ def err_operator_overload_static : Error<
def err_operator_overload_default_arg : Error<
"parameter of overloaded %0 cannot have a default argument">;
-def ext_subscript_overload : ExtWarn<
- "overloaded %0 with %select{no|a defaulted|more than one}1 parameter is a C++2b extension">, InGroup<CXXPre2bCompat>, DefaultIgnore;
+def ext_subscript_overload : Warning<
+ "overloaded %0 with %select{no|a defaulted|more than one}1 parameter is a "
+ "C++2b extension">, InGroup<CXXPre2bCompat>, DefaultIgnore;
def error_subscript_overload : Error<
"overloaded %0 cannot have %select{no|a defaulted|more than one}1 parameter before C++2b">;
diff --git a/contrib/llvm-project/clang/include/clang/Basic/arm_sve.td b/contrib/llvm-project/clang/include/clang/Basic/arm_sve.td
index e910036117b7..e547bbd34b5e 100644
--- a/contrib/llvm-project/clang/include/clang/Basic/arm_sve.td
+++ b/contrib/llvm-project/clang/include/clang/Basic/arm_sve.td
@@ -1249,16 +1249,37 @@ def SVZIP1_BF16 : SInst<"svzip1[_{d}]", "ddd", "b", MergeNone, "aarch64_sve
def SVZIP2_BF16 : SInst<"svzip2[_{d}]", "ddd", "b", MergeNone, "aarch64_sve_zip2">;
}
-def SVREV_B : SInst<"svrev_{d}", "PP", "PcPsPiPl", MergeNone, "aarch64_sve_rev">;
-def SVSEL_B : SInst<"svsel[_b]", "PPPP", "Pc", MergeNone, "aarch64_sve_sel">;
-def SVTRN1_B : SInst<"svtrn1_{d}", "PPP", "PcPsPiPl", MergeNone, "aarch64_sve_trn1">;
-def SVTRN2_B : SInst<"svtrn2_{d}", "PPP", "PcPsPiPl", MergeNone, "aarch64_sve_trn2">;
-def SVPUNPKHI : SInst<"svunpkhi[_b]", "PP", "Pc", MergeNone, "aarch64_sve_punpkhi">;
-def SVPUNPKLO : SInst<"svunpklo[_b]", "PP", "Pc", MergeNone, "aarch64_sve_punpklo">;
-def SVUZP1_B : SInst<"svuzp1_{d}", "PPP", "PcPsPiPl", MergeNone, "aarch64_sve_uzp1">;
-def SVUZP2_B : SInst<"svuzp2_{d}", "PPP", "PcPsPiPl", MergeNone, "aarch64_sve_uzp2">;
-def SVZIP1_B : SInst<"svzip1_{d}", "PPP", "PcPsPiPl", MergeNone, "aarch64_sve_zip1">;
-def SVZIP2_B : SInst<"svzip2_{d}", "PPP", "PcPsPiPl", MergeNone, "aarch64_sve_zip2">;
+def SVREV_B8 : SInst<"svrev_b8", "PP", "Pc", MergeNone, "aarch64_sve_rev">;
+def SVREV_B16 : SInst<"svrev_b16", "PP", "Pc", MergeNone, "aarch64_sve_rev_b16", [IsOverloadNone]>;
+def SVREV_B32 : SInst<"svrev_b32", "PP", "Pc", MergeNone, "aarch64_sve_rev_b32", [IsOverloadNone]>;
+def SVREV_B64 : SInst<"svrev_b64", "PP", "Pc", MergeNone, "aarch64_sve_rev_b64", [IsOverloadNone]>;
+def SVSEL_B : SInst<"svsel[_b]", "PPPP", "Pc", MergeNone, "aarch64_sve_sel">;
+def SVTRN1_B8 : SInst<"svtrn1_b8", "PPP", "Pc", MergeNone, "aarch64_sve_trn1">;
+def SVTRN1_B16 : SInst<"svtrn1_b16", "PPP", "Pc", MergeNone, "aarch64_sve_trn1_b16", [IsOverloadNone]>;
+def SVTRN1_B32 : SInst<"svtrn1_b32", "PPP", "Pc", MergeNone, "aarch64_sve_trn1_b32", [IsOverloadNone]>;
+def SVTRN1_B64 : SInst<"svtrn1_b64", "PPP", "Pc", MergeNone, "aarch64_sve_trn1_b64", [IsOverloadNone]>;
+def SVTRN2_B8 : SInst<"svtrn2_b8", "PPP", "Pc", MergeNone, "aarch64_sve_trn2">;
+def SVTRN2_B16 : SInst<"svtrn2_b16", "PPP", "Pc", MergeNone, "aarch64_sve_trn2_b16", [IsOverloadNone]>;
+def SVTRN2_B32 : SInst<"svtrn2_b32", "PPP", "Pc", MergeNone, "aarch64_sve_trn2_b32", [IsOverloadNone]>;
+def SVTRN2_B64 : SInst<"svtrn2_b64", "PPP", "Pc", MergeNone, "aarch64_sve_trn2_b64", [IsOverloadNone]>;
+def SVPUNPKHI : SInst<"svunpkhi[_b]", "PP", "Pc", MergeNone, "aarch64_sve_punpkhi">;
+def SVPUNPKLO : SInst<"svunpklo[_b]", "PP", "Pc", MergeNone, "aarch64_sve_punpklo">;
+def SVUZP1_B8 : SInst<"svuzp1_b8", "PPP", "Pc", MergeNone, "aarch64_sve_uzp1">;
+def SVUZP1_B16 : SInst<"svuzp1_b16", "PPP", "Pc", MergeNone, "aarch64_sve_uzp1_b16", [IsOverloadNone]>;
+def SVUZP1_B32 : SInst<"svuzp1_b32", "PPP", "Pc", MergeNone, "aarch64_sve_uzp1_b32", [IsOverloadNone]>;
+def SVUZP1_B64 : SInst<"svuzp1_b64", "PPP", "Pc", MergeNone, "aarch64_sve_uzp1_b64", [IsOverloadNone]>;
+def SVUZP2_B8 : SInst<"svuzp2_b8", "PPP", "Pc", MergeNone, "aarch64_sve_uzp2">;
+def SVUZP2_B16 : SInst<"svuzp2_b16", "PPP", "Pc", MergeNone, "aarch64_sve_uzp2_b16", [IsOverloadNone]>;
+def SVUZP2_B32 : SInst<"svuzp2_b32", "PPP", "Pc", MergeNone, "aarch64_sve_uzp2_b32", [IsOverloadNone]>;
+def SVUZP2_B64 : SInst<"svuzp2_b64", "PPP", "Pc", MergeNone, "aarch64_sve_uzp2_b64", [IsOverloadNone]>;
+def SVZIP1_B8 : SInst<"svzip1_b8", "PPP", "Pc", MergeNone, "aarch64_sve_zip1">;
+def SVZIP1_B16 : SInst<"svzip1_b16", "PPP", "Pc", MergeNone, "aarch64_sve_zip1_b16", [IsOverloadNone]>;
+def SVZIP1_B32 : SInst<"svzip1_b32", "PPP", "Pc", MergeNone, "aarch64_sve_zip1_b32", [IsOverloadNone]>;
+def SVZIP1_B64 : SInst<"svzip1_b64", "PPP", "Pc", MergeNone, "aarch64_sve_zip1_b64", [IsOverloadNone]>;
+def SVZIP2_B : SInst<"svzip2_b8", "PPP", "Pc", MergeNone, "aarch64_sve_zip2">;
+def SVZIP2_B16 : SInst<"svzip2_b16", "PPP", "Pc", MergeNone, "aarch64_sve_zip2_b16", [IsOverloadNone]>;
+def SVZIP2_B32 : SInst<"svzip2_b32", "PPP", "Pc", MergeNone, "aarch64_sve_zip2_b32", [IsOverloadNone]>;
+def SVZIP2_B64 : SInst<"svzip2_b64", "PPP", "Pc", MergeNone, "aarch64_sve_zip2_b64", [IsOverloadNone]>;
////////////////////////////////////////////////////////////////////////////////
// Predicate creation
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 c63cba9aa459..b23e26ecaa57 100644
--- a/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td
+++ b/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td
@@ -1539,7 +1539,7 @@ enum RVV_CSR {
};
static __inline__ __attribute__((__always_inline__, __nodebug__))
-unsigned long vread_csr(enum RVV_CSR __csr) {
+unsigned long __riscv_vread_csr(enum RVV_CSR __csr) {
unsigned long __rv = 0;
switch (__csr) {
case RVV_VSTART:
@@ -1559,7 +1559,7 @@ unsigned long vread_csr(enum RVV_CSR __csr) {
}
static __inline__ __attribute__((__always_inline__, __nodebug__))
-void vwrite_csr(enum RVV_CSR __csr, unsigned long __value) {
+void __riscv_vwrite_csr(enum RVV_CSR __csr, unsigned long __value) {
switch (__csr) {
case RVV_VSTART:
__asm__ __volatile__ ("csrw\tvstart, %z0" : : "rJ"(__value) : "memory");
@@ -1580,7 +1580,7 @@ def vread_vwrite_csr: RVVHeader;
let HeaderCode =
[{
-#define vlenb() __builtin_rvv_vlenb()
+#define __riscv_vlenb() __builtin_rvv_vlenb()
}] in
def vlenb_macro: RVVHeader;
@@ -1611,62 +1611,62 @@ let HasBuiltinAlias = false, HasVL = false, HasMasked = false,
// and LMUL.
let HeaderCode =
[{
-#define vsetvl_e8mf4(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 6)
-#define vsetvl_e8mf2(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 7)
-#define vsetvl_e8m1(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 0)
-#define vsetvl_e8m2(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 1)
-#define vsetvl_e8m4(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 2)
-#define vsetvl_e8m8(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 3)
-
-#define vsetvl_e16mf2(avl) __builtin_rvv_vsetvli((size_t)(avl), 1, 7)
-#define vsetvl_e16m1(avl) __builtin_rvv_vsetvli((size_t)(avl), 1, 0)
-#define vsetvl_e16m2(avl) __builtin_rvv_vsetvli((size_t)(avl), 1, 1)
-#define vsetvl_e16m4(avl) __builtin_rvv_vsetvli((size_t)(avl), 1, 2)
-#define vsetvl_e16m8(avl) __builtin_rvv_vsetvli((size_t)(avl), 1, 3)
-
-#define vsetvl_e32m1(avl) __builtin_rvv_vsetvli((size_t)(avl), 2, 0)
-#define vsetvl_e32m2(avl) __builtin_rvv_vsetvli((size_t)(avl), 2, 1)
-#define vsetvl_e32m4(avl) __builtin_rvv_vsetvli((size_t)(avl), 2, 2)
-#define vsetvl_e32m8(avl) __builtin_rvv_vsetvli((size_t)(avl), 2, 3)
+#define __riscv_vsetvl_e8mf4(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 6)
+#define __riscv_vsetvl_e8mf2(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 7)
+#define __riscv_vsetvl_e8m1(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 0)
+#define __riscv_vsetvl_e8m2(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 1)
+#define __riscv_vsetvl_e8m4(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 2)
+#define __riscv_vsetvl_e8m8(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 3)
+
+#define __riscv_vsetvl_e16mf2(avl) __builtin_rvv_vsetvli((size_t)(avl), 1, 7)
+#define __riscv_vsetvl_e16m1(avl) __builtin_rvv_vsetvli((size_t)(avl), 1, 0)
+#define __riscv_vsetvl_e16m2(avl) __builtin_rvv_vsetvli((size_t)(avl), 1, 1)
+#define __riscv_vsetvl_e16m4(avl) __builtin_rvv_vsetvli((size_t)(avl), 1, 2)
+#define __riscv_vsetvl_e16m8(avl) __builtin_rvv_vsetvli((size_t)(avl), 1, 3)
+
+#define __riscv_vsetvl_e32m1(avl) __builtin_rvv_vsetvli((size_t)(avl), 2, 0)
+#define __riscv_vsetvl_e32m2(avl) __builtin_rvv_vsetvli((size_t)(avl), 2, 1)
+#define __riscv_vsetvl_e32m4(avl) __builtin_rvv_vsetvli((size_t)(avl), 2, 2)
+#define __riscv_vsetvl_e32m8(avl) __builtin_rvv_vsetvli((size_t)(avl), 2, 3)
#if __riscv_v_elen >= 64
-#define vsetvl_e8mf8(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 5)
-#define vsetvl_e16mf4(avl) __builtin_rvv_vsetvli((size_t)(avl), 1, 6)
-#define vsetvl_e32mf2(avl) __builtin_rvv_vsetvli((size_t)(avl), 2, 7)
-
-#define vsetvl_e64m1(avl) __builtin_rvv_vsetvli((size_t)(avl), 3, 0)
-#define vsetvl_e64m2(avl) __builtin_rvv_vsetvli((size_t)(avl), 3, 1)
-#define vsetvl_e64m4(avl) __builtin_rvv_vsetvli((size_t)(avl), 3, 2)
-#define vsetvl_e64m8(avl) __builtin_rvv_vsetvli((size_t)(avl), 3, 3)
+#define __riscv_vsetvl_e8mf8(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 5)
+#define __riscv_vsetvl_e16mf4(avl) __builtin_rvv_vsetvli((size_t)(avl), 1, 6)
+#define __riscv_vsetvl_e32mf2(avl) __builtin_rvv_vsetvli((size_t)(avl), 2, 7)
+
+#define __riscv_vsetvl_e64m1(avl) __builtin_rvv_vsetvli((size_t)(avl), 3, 0)
+#define __riscv_vsetvl_e64m2(avl) __builtin_rvv_vsetvli((size_t)(avl), 3, 1)
+#define __riscv_vsetvl_e64m4(avl) __builtin_rvv_vsetvli((size_t)(avl), 3, 2)
+#define __riscv_vsetvl_e64m8(avl) __builtin_rvv_vsetvli((size_t)(avl), 3, 3)
#endif
-#define vsetvlmax_e8mf4() __builtin_rvv_vsetvlimax(0, 6)
-#define vsetvlmax_e8mf2() __builtin_rvv_vsetvlimax(0, 7)
-#define vsetvlmax_e8m1() __builtin_rvv_vsetvlimax(0, 0)
-#define vsetvlmax_e8m2() __builtin_rvv_vsetvlimax(0, 1)
-#define vsetvlmax_e8m4() __builtin_rvv_vsetvlimax(0, 2)
-#define vsetvlmax_e8m8() __builtin_rvv_vsetvlimax(0, 3)
+#define __riscv_vsetvlmax_e8mf4() __builtin_rvv_vsetvlimax(0, 6)
+#define __riscv_vsetvlmax_e8mf2() __builtin_rvv_vsetvlimax(0, 7)
+#define __riscv_vsetvlmax_e8m1() __builtin_rvv_vsetvlimax(0, 0)
+#define __riscv_vsetvlmax_e8m2() __builtin_rvv_vsetvlimax(0, 1)
+#define __riscv_vsetvlmax_e8m4() __builtin_rvv_vsetvlimax(0, 2)
+#define __riscv_vsetvlmax_e8m8() __builtin_rvv_vsetvlimax(0, 3)
-#define vsetvlmax_e16mf2() __builtin_rvv_vsetvlimax(1, 7)
-#define vsetvlmax_e16m1() __builtin_rvv_vsetvlimax(1, 0)
-#define vsetvlmax_e16m2() __builtin_rvv_vsetvlimax(1, 1)
-#define vsetvlmax_e16m4() __builtin_rvv_vsetvlimax(1, 2)
-#define vsetvlmax_e16m8() __builtin_rvv_vsetvlimax(1, 3)
+#define __riscv_vsetvlmax_e16mf2() __builtin_rvv_vsetvlimax(1, 7)
+#define __riscv_vsetvlmax_e16m1() __builtin_rvv_vsetvlimax(1, 0)
+#define __riscv_vsetvlmax_e16m2() __builtin_rvv_vsetvlimax(1, 1)
+#define __riscv_vsetvlmax_e16m4() __builtin_rvv_vsetvlimax(1, 2)
+#define __riscv_vsetvlmax_e16m8() __builtin_rvv_vsetvlimax(1, 3)
-#define vsetvlmax_e32m1() __builtin_rvv_vsetvlimax(2, 0)
-#define vsetvlmax_e32m2() __builtin_rvv_vsetvlimax(2, 1)
-#define vsetvlmax_e32m4() __builtin_rvv_vsetvlimax(2, 2)
-#define vsetvlmax_e32m8() __builtin_rvv_vsetvlimax(2, 3)
+#define __riscv_vsetvlmax_e32m1() __builtin_rvv_vsetvlimax(2, 0)
+#define __riscv_vsetvlmax_e32m2() __builtin_rvv_vsetvlimax(2, 1)
+#define __riscv_vsetvlmax_e32m4() __builtin_rvv_vsetvlimax(2, 2)
+#define __riscv_vsetvlmax_e32m8() __builtin_rvv_vsetvlimax(2, 3)
#if __riscv_v_elen >= 64
-#define vsetvlmax_e8mf8() __builtin_rvv_vsetvlimax(0, 5)
-#define vsetvlmax_e16mf4() __builtin_rvv_vsetvlimax(1, 6)
-#define vsetvlmax_e32mf2() __builtin_rvv_vsetvlimax(2, 7)
-
-#define vsetvlmax_e64m1() __builtin_rvv_vsetvlimax(3, 0)
-#define vsetvlmax_e64m2() __builtin_rvv_vsetvlimax(3, 1)
-#define vsetvlmax_e64m4() __builtin_rvv_vsetvlimax(3, 2)
-#define vsetvlmax_e64m8() __builtin_rvv_vsetvlimax(3, 3)
+#define __riscv_vsetvlmax_e8mf8() __builtin_rvv_vsetvlimax(0, 5)
+#define __riscv_vsetvlmax_e16mf4() __builtin_rvv_vsetvlimax(1, 6)
+#define __riscv_vsetvlmax_e32mf2() __builtin_rvv_vsetvlimax(2, 7)
+
+#define __riscv_vsetvlmax_e64m1() __builtin_rvv_vsetvlimax(3, 0)
+#define __riscv_vsetvlmax_e64m2() __builtin_rvv_vsetvlimax(3, 1)
+#define __riscv_vsetvlmax_e64m4() __builtin_rvv_vsetvlimax(3, 2)
+#define __riscv_vsetvlmax_e64m8() __builtin_rvv_vsetvlimax(3, 3)
#endif
}] in
diff --git a/contrib/llvm-project/clang/include/clang/Driver/Options.td b/contrib/llvm-project/clang/include/clang/Driver/Options.td
index 23752823e88f..652c15afcce8 100644
--- a/contrib/llvm-project/clang/include/clang/Driver/Options.td
+++ b/contrib/llvm-project/clang/include/clang/Driver/Options.td
@@ -4559,6 +4559,8 @@ def mnvs : Flag<["-"], "mnvs">, Group<m_hexagon_Features_Group>,
Flags<[CC1Option]>, HelpText<"Enable generation of new-value stores">;
def mno_nvs : Flag<["-"], "mno-nvs">, Group<m_hexagon_Features_Group>,
Flags<[CC1Option]>, HelpText<"Disable generation of new-value stores">;
+def mcabac: Flag<["-"], "mcabac">, Group<m_hexagon_Features_Group>,
+ HelpText<"Enable CABAC instructions">;
// SPARC feature flags
def mfpu : Flag<["-"], "mfpu">, Group<m_sparc_Features_Group>;
diff --git a/contrib/llvm-project/clang/include/clang/Format/Format.h b/contrib/llvm-project/clang/include/clang/Format/Format.h
index 72efd3be1cc7..7a313460d888 100755
--- a/contrib/llvm-project/clang/include/clang/Format/Format.h
+++ b/contrib/llvm-project/clang/include/clang/Format/Format.h
@@ -2500,6 +2500,10 @@ struct FormatStyle {
/// Decimal: 3
/// Hex: -1
/// \endcode
+ ///
+ /// You can also specify a minimum number of digits (``BinaryMinDigits``,
+ /// ``DecimalMinDigits``, and ``HexMinDigits``) the integer literal must
+ /// have in order for the separators to be inserted.
struct IntegerLiteralSeparatorStyle {
/// Format separators in binary literals.
/// \code{.text}
@@ -2509,6 +2513,14 @@ struct FormatStyle {
/// /* 4: */ b = 0b1001'1110'1101;
/// \endcode
int8_t Binary;
+ /// Format separators in binary literals with a minimum number of digits.
+ /// \code{.text}
+ /// // Binary: 3
+ /// // BinaryMinDigits: 7
+ /// b1 = 0b101101;
+ /// b2 = 0b1'101'101;
+ /// \endcode
+ int8_t BinaryMinDigits;
/// Format separators in decimal literals.
/// \code{.text}
/// /* -1: */ d = 18446744073709550592ull;
@@ -2516,6 +2528,14 @@ struct FormatStyle {
/// /* 3: */ d = 18'446'744'073'709'550'592ull;
/// \endcode
int8_t Decimal;
+ /// Format separators in decimal literals with a minimum number of digits.
+ /// \code{.text}
+ /// // Decimal: 3
+ /// // DecimalMinDigits: 5
+ /// d1 = 2023;
+ /// d2 = 10'000;
+ /// \endcode
+ int8_t DecimalMinDigits;
/// Format separators in hexadecimal literals.
/// \code{.text}
/// /* -1: */ h = 0xDEADBEEFDEADBEEFuz;
@@ -2523,6 +2543,20 @@ struct FormatStyle {
/// /* 2: */ h = 0xDE'AD'BE'EF'DE'AD'BE'EFuz;
/// \endcode
int8_t Hex;
+ /// Format separators in hexadecimal literals with a minimum number of
+ /// digits.
+ /// \code{.text}
+ /// // Hex: 2
+ /// // HexMinDigits: 6
+ /// h1 = 0xABCDE;
+ /// h2 = 0xAB'CD'EF;
+ /// \endcode
+ int8_t HexMinDigits;
+ bool operator==(const IntegerLiteralSeparatorStyle &R) const {
+ return Binary == R.Binary && BinaryMinDigits == R.BinaryMinDigits &&
+ Decimal == R.Decimal && DecimalMinDigits == R.DecimalMinDigits &&
+ Hex == R.Hex && HexMinDigits == R.HexMinDigits;
+ }
};
/// Format integer literal separators (``'`` for C++ and ``_`` for C#, Java,
@@ -4212,10 +4246,7 @@ struct FormatStyle {
IndentWrappedFunctionNames == R.IndentWrappedFunctionNames &&
InsertBraces == R.InsertBraces &&
InsertNewlineAtEOF == R.InsertNewlineAtEOF &&
- IntegerLiteralSeparator.Binary == R.IntegerLiteralSeparator.Binary &&
- IntegerLiteralSeparator.Decimal ==
- R.IntegerLiteralSeparator.Decimal &&
- IntegerLiteralSeparator.Hex == R.IntegerLiteralSeparator.Hex &&
+ IntegerLiteralSeparator == R.IntegerLiteralSeparator &&
JavaImportGroups == R.JavaImportGroups &&
JavaScriptQuotes == R.JavaScriptQuotes &&
JavaScriptWrapImports == R.JavaScriptWrapImports &&
diff --git a/contrib/llvm-project/clang/include/clang/Lex/Preprocessor.h b/contrib/llvm-project/clang/include/clang/Lex/Preprocessor.h
index f383a2e5b530..322626802eab 100644
--- a/contrib/llvm-project/clang/include/clang/Lex/Preprocessor.h
+++ b/contrib/llvm-project/clang/include/clang/Lex/Preprocessor.h
@@ -193,11 +193,6 @@ class Preprocessor {
LangOptions::FPEvalMethodKind CurrentFPEvalMethod =
LangOptions::FPEvalMethodKind::FEM_UnsetOnCommandLine;
- // Keeps the value of the last evaluation method before a
- // `pragma float_control (precise,off) is applied.
- LangOptions::FPEvalMethodKind LastFPEvalMethod =
- LangOptions::FPEvalMethodKind::FEM_UnsetOnCommandLine;
-
// The most recent pragma location where the floating point evaluation
// method was modified. This is used to determine whether the
// 'pragma clang fp eval_method' was used whithin the current scope.
@@ -313,6 +308,9 @@ private:
/// The import path for named module that we're currently processing.
SmallVector<std::pair<IdentifierInfo *, SourceLocation>, 2> NamedModuleImportPath;
+ /// Whether the import is an `@import` or a standard c++ modules import.
+ bool IsAtImport = false;
+
/// Whether the last token we lexed was an '@'.
bool LastTokenWasAt = false;
@@ -456,6 +454,144 @@ private:
TrackGMF TrackGMFState = TrackGMF::BeforeGMFIntroducer;
+ /// Track the status of the c++20 module decl.
+ ///
+ /// module-declaration:
+ /// 'export'[opt] 'module' module-name module-partition[opt]
+ /// attribute-specifier-seq[opt] ';'
+ ///
+ /// module-name:
+ /// module-name-qualifier[opt] identifier
+ ///
+ /// module-partition:
+ /// ':' module-name-qualifier[opt] identifier
+ ///
+ /// module-name-qualifier:
+ /// identifier '.'
+ /// module-name-qualifier identifier '.'
+ ///
+ /// Transition state:
+ ///
+ /// NotAModuleDecl --- export ---> FoundExport
+ /// NotAModuleDecl --- module ---> ImplementationCandidate
+ /// FoundExport --- module ---> InterfaceCandidate
+ /// ImplementationCandidate --- Identifier ---> ImplementationCandidate
+ /// ImplementationCandidate --- period ---> ImplementationCandidate
+ /// ImplementationCandidate --- colon ---> ImplementationCandidate
+ /// InterfaceCandidate --- Identifier ---> InterfaceCandidate
+ /// InterfaceCandidate --- period ---> InterfaceCandidate
+ /// InterfaceCandidate --- colon ---> InterfaceCandidate
+ /// ImplementationCandidate --- Semi ---> NamedModuleImplementation
+ /// NamedModuleInterface --- Semi ---> NamedModuleInterface
+ /// NamedModuleImplementation --- Anything ---> NamedModuleImplementation
+ /// NamedModuleInterface --- Anything ---> NamedModuleInterface
+ ///
+ /// FIXME: We haven't handle attribute-specifier-seq here. It may not be bad
+ /// soon since we don't support any module attributes yet.
+ class ModuleDeclSeq {
+ enum ModuleDeclState : int {
+ NotAModuleDecl,
+ FoundExport,
+ InterfaceCandidate,
+ ImplementationCandidate,
+ NamedModuleInterface,
+ NamedModuleImplementation,
+ };
+
+ public:
+ ModuleDeclSeq() : State(NotAModuleDecl) {}
+
+ void handleExport() {
+ if (State == NotAModuleDecl)
+ State = FoundExport;
+ else if (!isNamedModule())
+ reset();
+ }
+
+ void handleModule() {
+ if (State == FoundExport)
+ State = InterfaceCandidate;
+ else if (State == NotAModuleDecl)
+ State = ImplementationCandidate;
+ else if (!isNamedModule())
+ reset();
+ }
+
+ void handleIdentifier(IdentifierInfo *Identifier) {
+ if (isModuleCandidate() && Identifier)
+ Name += Identifier->getName().str();
+ else if (!isNamedModule())
+ reset();
+ }
+
+ void handleColon() {
+ if (isModuleCandidate())
+ Name += ":";
+ else if (!isNamedModule())
+ reset();
+ }
+
+ void handlePeriod() {
+ if (isModuleCandidate())
+ Name += ".";
+ else if (!isNamedModule())
+ reset();
+ }
+
+ void handleSemi() {
+ if (!Name.empty() && isModuleCandidate()) {
+ if (State == InterfaceCandidate)
+ State = NamedModuleInterface;
+ else if (State == ImplementationCandidate)
+ State = NamedModuleImplementation;
+ else
+ llvm_unreachable("Unimaged ModuleDeclState.");
+ } else if (!isNamedModule())
+ reset();
+ }
+
+ void handleMisc() {
+ if (!isNamedModule())
+ reset();
+ }
+
+ bool isModuleCandidate() const {
+ return State == InterfaceCandidate || State == ImplementationCandidate;
+ }
+
+ bool isNamedModule() const {
+ return State == NamedModuleInterface ||
+ State == NamedModuleImplementation;
+ }
+
+ bool isNamedInterface() const { return State == NamedModuleInterface; }
+
+ bool isImplementationUnit() const {
+ return State == NamedModuleImplementation && !getName().contains(':');
+ }
+
+ StringRef getName() const {
+ assert(isNamedModule() && "Can't get name from a non named module");
+ return Name;
+ }
+
+ StringRef getPrimaryName() const {
+ assert(isNamedModule() && "Can't get name from a non named module");
+ return getName().split(':').first;
+ }
+
+ void reset() {
+ Name.clear();
+ State = NotAModuleDecl;
+ }
+
+ private:
+ ModuleDeclState State;
+ std::string Name;
+ };
+
+ ModuleDeclSeq ModuleDeclState;
+
/// Whether the module import expects an identifier next. Otherwise,
/// it expects a '.' or ';'.
bool ModuleImportExpectsIdentifier = false;
@@ -2194,14 +2330,6 @@ public:
return LastFPEvalPragmaLocation;
}
- LangOptions::FPEvalMethodKind getLastFPEvalMethod() const {
- return LastFPEvalMethod;
- }
-
- void setLastFPEvalMethod(LangOptions::FPEvalMethodKind Val) {
- LastFPEvalMethod = Val;
- }
-
void setCurrentFPEvalMethod(SourceLocation PragmaLoc,
LangOptions::FPEvalMethodKind Val) {
assert(Val != LangOptions::FEM_UnsetOnCommandLine &&
@@ -2225,6 +2353,36 @@ public:
/// Retrieves the module whose implementation we're current compiling, if any.
Module *getCurrentModuleImplementation();
+ /// If we are preprocessing a named module.
+ bool isInNamedModule() const { return ModuleDeclState.isNamedModule(); }
+
+ /// If we are proprocessing a named interface unit.
+ /// Note that a module implementation partition is not considered as an
+ /// named interface unit here although it is importable
+ /// to ease the parsing.
+ bool isInNamedInterfaceUnit() const {
+ return ModuleDeclState.isNamedInterface();
+ }
+
+ /// Get the named module name we're preprocessing.
+ /// Requires we're preprocessing a named module.
+ StringRef getNamedModuleName() const { return ModuleDeclState.getName(); }
+
+ /// If we are implementing an implementation module unit.
+ /// Note that the module implementation partition is not considered as an
+ /// implementation unit.
+ bool isInImplementationUnit() const {
+ return ModuleDeclState.isImplementationUnit();
+ }
+
+ /// If we're importing a standard C++20 Named Modules.
+ bool isInImportingCXXNamedModules() const {
+ // NamedModuleImportPath will be non-empty only if we're importing
+ // Standard C++ named modules.
+ return !NamedModuleImportPath.empty() && getLangOpts().CPlusPlusModules &&
+ !IsAtImport;
+ }
+
/// Allocate a new MacroInfo object with the provided SourceLocation.
MacroInfo *AllocateMacroInfo(SourceLocation L);
diff --git a/contrib/llvm-project/clang/include/clang/Sema/DeclSpec.h b/contrib/llvm-project/clang/include/clang/Sema/DeclSpec.h
index a95fe5686009..69fe2c541607 100644
--- a/contrib/llvm-project/clang/include/clang/Sema/DeclSpec.h
+++ b/contrib/llvm-project/clang/include/clang/Sema/DeclSpec.h
@@ -506,16 +506,8 @@ public:
assert(isTypeRep((TST) TypeSpecType) && "DeclSpec does not store a type");
return TypeRep;
}
- // Returns the underlying decl, if any.
Decl *getRepAsDecl() const {
- auto *D = getRepAsFoundDecl();
- if (const auto *Using = dyn_cast_or_null<UsingShadowDecl>(D))
- return Using->getTargetDecl();
- return D;
- }
- // Returns the originally found decl, if any.
- Decl *getRepAsFoundDecl() const {
- assert(isDeclRep((TST)TypeSpecType) && "DeclSpec does not store a decl");
+ assert(isDeclRep((TST) TypeSpecType) && "DeclSpec does not store a decl");
return DeclRep;
}
Expr *getRepAsExpr() const {
diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h
index 9ab4146aaefe..e57955f16bdd 100644
--- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h
+++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h
@@ -238,11 +238,9 @@ namespace threadSafety {
// FIXME: No way to easily map from TemplateTypeParmTypes to
// TemplateTypeParmDecls, so we have this horrible PointerUnion.
-using UnexpandedParameterPack = std::pair<
- llvm::PointerUnion<
- const TemplateTypeParmType *, const SubstTemplateTypeParmPackType *,
- const SubstNonTypeTemplateParmPackExpr *, const NamedDecl *>,
- SourceLocation>;
+typedef std::pair<llvm::PointerUnion<const TemplateTypeParmType *, NamedDecl *>,
+ SourceLocation>
+ UnexpandedParameterPack;
/// Describes whether we've seen any nullability information for the given
/// file.
@@ -3330,9 +3328,7 @@ public:
SourceLocation ScopedEnumKWLoc,
bool ScopedEnumUsesClassTag, TypeResult UnderlyingType,
bool IsTypeSpecifier, bool IsTemplateParamOrArg,
- OffsetOfKind OOK,
- UsingShadowDecl*& FoundUsingShadow,
- SkipBodyInfo *SkipBody = nullptr);
+ OffsetOfKind OOK, SkipBodyInfo *SkipBody = nullptr);
DeclResult ActOnTemplatedFriendTag(Scope *S, SourceLocation FriendLoc,
unsigned TagSpec, SourceLocation TagLoc,
@@ -7284,24 +7280,34 @@ private:
private:
// The current stack of constraint satisfactions, so we can exit-early.
- llvm::SmallVector<llvm::FoldingSetNodeID, 10> SatisfactionStack;
+ using SatisfactionStackEntryTy =
+ std::pair<const NamedDecl *, llvm::FoldingSetNodeID>;
+ llvm::SmallVector<SatisfactionStackEntryTy, 10>
+ SatisfactionStack;
public:
- void PushSatisfactionStackEntry(const llvm::FoldingSetNodeID &ID) {
- SatisfactionStack.push_back(ID);
+ void PushSatisfactionStackEntry(const NamedDecl *D,
+ const llvm::FoldingSetNodeID &ID) {
+ const NamedDecl *Can = cast<NamedDecl>(D->getCanonicalDecl());
+ SatisfactionStack.emplace_back(Can, ID);
}
void PopSatisfactionStackEntry() { SatisfactionStack.pop_back(); }
- bool SatisfactionStackContains(const llvm::FoldingSetNodeID &ID) const {
- return llvm::find(SatisfactionStack, ID) != SatisfactionStack.end();
+ bool SatisfactionStackContains(const NamedDecl *D,
+ const llvm::FoldingSetNodeID &ID) const {
+ const NamedDecl *Can = cast<NamedDecl>(D->getCanonicalDecl());
+ return llvm::find(SatisfactionStack,
+ SatisfactionStackEntryTy{Can, ID}) !=
+ SatisfactionStack.end();
}
// Resets the current SatisfactionStack for cases where we are instantiating
// constraints as a 'side effect' of normal instantiation in a way that is not
// indicative of recursive definition.
class SatisfactionStackResetRAII {
- llvm::SmallVector<llvm::FoldingSetNodeID, 10> BackupSatisfactionStack;
+ llvm::SmallVector<SatisfactionStackEntryTy, 10>
+ BackupSatisfactionStack;
Sema &SemaRef;
public:
@@ -7314,8 +7320,8 @@ public:
}
};
- void
- SwapSatisfactionStack(llvm::SmallVectorImpl<llvm::FoldingSetNodeID> &NewSS) {
+ void SwapSatisfactionStack(
+ llvm::SmallVectorImpl<SatisfactionStackEntryTy> &NewSS) {
SatisfactionStack.swap(NewSS);
}
diff --git a/contrib/llvm-project/clang/include/clang/Sema/SemaInternal.h b/contrib/llvm-project/clang/include/clang/Sema/SemaInternal.h
index 4eca50919dc7..842eec099540 100644
--- a/contrib/llvm-project/clang/include/clang/Sema/SemaInternal.h
+++ b/contrib/llvm-project/clang/include/clang/Sema/SemaInternal.h
@@ -62,7 +62,7 @@ inline InheritableAttr *getDLLAttr(Decl *D) {
}
/// Retrieve the depth and index of a template parameter.
-inline std::pair<unsigned, unsigned> getDepthAndIndex(const NamedDecl *ND) {
+inline std::pair<unsigned, unsigned> getDepthAndIndex(NamedDecl *ND) {
if (const auto *TTP = dyn_cast<TemplateTypeParmDecl>(ND))
return std::make_pair(TTP->getDepth(), TTP->getIndex());
@@ -79,7 +79,7 @@ getDepthAndIndex(UnexpandedParameterPack UPP) {
if (const auto *TTP = UPP.first.dyn_cast<const TemplateTypeParmType *>())
return std::make_pair(TTP->getDepth(), TTP->getIndex());
- return getDepthAndIndex(UPP.first.get<const NamedDecl *>());
+ return getDepthAndIndex(UPP.first.get<NamedDecl *>());
}
class TypoCorrectionConsumer : public VisibleDeclConsumer {
diff --git a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h
index ea05b9f8ee3f..fcc9c02999b3 100644
--- a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h
+++ b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h
@@ -454,7 +454,9 @@ public:
llvm::SMTExprRef OperandExp =
getSymExpr(Solver, Ctx, USE->getOperand(), &OperandTy, hasComparison);
llvm::SMTExprRef UnaryExp =
- fromUnOp(Solver, USE->getOpcode(), OperandExp);
+ OperandTy->isRealFloatingType()
+ ? fromFloatUnOp(Solver, USE->getOpcode(), OperandExp)
+ : fromUnOp(Solver, USE->getOpcode(), OperandExp);
// Currently, without the `support-symbolic-integer-casts=true` option,
// we do not emit `SymbolCast`s for implicit casts.
diff --git a/contrib/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h b/contrib/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h
index fc53d70019c5..bf31dced98b2 100644
--- a/contrib/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h
+++ b/contrib/llvm-project/clang/include/clang/Support/RISCVVIntrinsicUtils.h
@@ -92,25 +92,24 @@ enum class TypeModifier : uint8_t {
LLVM_MARK_AS_BITMASK_ENUM(LMUL1),
};
-struct Policy {
- bool IsUnspecified = false;
+class Policy {
+public:
enum PolicyType {
Undisturbed,
Agnostic,
};
- PolicyType TailPolicy = Agnostic;
- PolicyType MaskPolicy = Agnostic;
- bool HasTailPolicy, HasMaskPolicy;
- Policy(bool HasTailPolicy, bool HasMaskPolicy)
- : IsUnspecified(true), HasTailPolicy(HasTailPolicy),
- HasMaskPolicy(HasMaskPolicy) {}
- Policy(PolicyType TailPolicy, bool HasTailPolicy, bool HasMaskPolicy)
- : TailPolicy(TailPolicy), HasTailPolicy(HasTailPolicy),
- HasMaskPolicy(HasMaskPolicy) {}
- Policy(PolicyType TailPolicy, PolicyType MaskPolicy, bool HasTailPolicy,
- bool HasMaskPolicy)
- : TailPolicy(TailPolicy), MaskPolicy(MaskPolicy),
- HasTailPolicy(HasTailPolicy), HasMaskPolicy(HasMaskPolicy) {}
+
+private:
+ // The default assumption for an RVV instruction is TAMA, as an undisturbed
+ // policy generally will affect the performance of an out-of-order core.
+ const PolicyType TailPolicy = Agnostic;
+ const PolicyType MaskPolicy = Agnostic;
*** 12885 LINES SKIPPED ***