git: 0c85e2760f6b - stable/13 - Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 20 Apr 2024 10:34:19 UTC
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0c85e2760f6b5016c16d29f8c2f63f3ba2cf5298 commit 0c85e2760f6b5016c16d29f8c2f63f3ba2cf5298 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-01-03 18:04:11 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-04-19 21:24:24 +0000 Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4. PR: 276104 MFC after: 1 month (cherry picked from commit 647cbc5de815c5651677bf8582797f716ec7b48d) --- ObsoleteFiles.inc | 105 +- .../llvm-project/clang/include/clang/AST/Type.h | 26 - .../clang/include/clang/Basic/BuiltinsAArch64.def | 3 + .../include/clang/Basic/riscv_sifive_vector.td | 28 +- .../clang/include/clang/Basic/riscv_vector.td | 8 +- .../include/clang/Basic/riscv_vector_common.td | 2 +- .../Core/BugReporter/CommonBugCategories.h | 1 + .../include/clang/StaticAnalyzer/Core/Checker.h | 14 +- .../clang/StaticAnalyzer/Core/CheckerManager.h | 11 +- contrib/llvm-project/clang/lib/AST/Interp/Interp.h | 1 - .../clang/lib/ASTMatchers/Dynamic/Parser.cpp | 6 +- .../clang/lib/Basic/IdentifierTable.cpp | 3 +- .../clang/lib/Basic/Targets/AArch64.cpp | 3 +- .../llvm-project/clang/lib/Basic/Targets/ARM.cpp | 3 +- .../llvm-project/clang/lib/Basic/Targets/RISCV.cpp | 3 +- .../llvm-project/clang/lib/Basic/Targets/X86.cpp | 3 +- contrib/llvm-project/clang/lib/Basic/Warnings.cpp | 6 +- .../llvm-project/clang/lib/CodeGen/CGBuiltin.cpp | 20 + .../clang/lib/CodeGen/CGStmtOpenMP.cpp | 61 +- .../clang/lib/CodeGen/CodeGenAction.cpp | 3 +- .../clang/lib/CodeGen/Targets/LoongArch.cpp | 7 - contrib/llvm-project/clang/lib/Driver/Driver.cpp | 14 +- .../clang/lib/Driver/ToolChains/Arch/RISCV.cpp | 13 +- .../clang/lib/Driver/ToolChains/Arch/X86.cpp | 4 +- .../clang/lib/Driver/ToolChains/Clang.cpp | 7 +- .../clang/lib/Driver/ToolChains/CommonArgs.cpp | 23 +- .../clang/lib/Driver/ToolChains/Gnu.cpp | 12 +- .../clang/lib/Driver/ToolChains/Solaris.cpp | 3 +- .../clang/lib/Format/ContinuationIndenter.cpp | 2 +- .../clang/lib/Format/MatchFilePath.cpp | 4 +- .../clang/lib/Frontend/DependencyGraph.cpp | 3 +- .../clang/lib/Frontend/LayoutOverrideSource.cpp | 9 +- .../lib/Frontend/VerifyDiagnosticConsumer.cpp | 3 +- .../llvm-project/clang/lib/Headers/usermsrintrin.h | 21 + .../llvm-project/clang/lib/Sema/SemaChecking.cpp | 47 +- .../llvm-project/clang/lib/Sema/SemaDeclAttr.cpp | 3 +- contrib/llvm-project/clang/lib/Sema/SemaInit.cpp | 8 + contrib/llvm-project/clang/lib/Sema/SemaModule.cpp | 3 +- contrib/llvm-project/clang/lib/Sema/SemaOpenMP.cpp | 2 +- .../clang/lib/Serialization/ASTReaderDecl.cpp | 2 +- .../clang/lib/Serialization/ASTWriterDecl.cpp | 11 +- .../StaticAnalyzer/Checkers/ArrayBoundChecker.cpp | 7 +- .../Checkers/BasicObjCFoundationChecks.cpp | 2 +- .../Checkers/BlockInCriticalSectionChecker.cpp | 57 +- .../Checkers/BoolAssignmentChecker.cpp | 7 +- .../lib/StaticAnalyzer/Checkers/CStringChecker.cpp | 382 +++--- .../StaticAnalyzer/Checkers/CXXDeleteChecker.cpp | 24 +- .../Checkers/CallAndMessageChecker.cpp | 9 +- .../StaticAnalyzer/Checkers/CastSizeChecker.cpp | 6 +- .../StaticAnalyzer/Checkers/CheckObjCDealloc.cpp | 48 +- .../Checkers/CheckSecuritySyntaxOnly.cpp | 6 +- .../lib/StaticAnalyzer/Checkers/ChrootChecker.cpp | 6 +- .../lib/StaticAnalyzer/Checkers/CloneChecker.cpp | 15 +- .../StaticAnalyzer/Checkers/ConversionChecker.cpp | 7 +- .../Checkers/DebugContainerModeling.cpp | 15 +- .../Checkers/DebugIteratorModeling.cpp | 15 +- .../lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp | 16 +- .../StaticAnalyzer/Checkers/DynamicTypeChecker.cpp | 10 +- .../Checkers/EnumCastOutOfRangeChecker.cpp | 8 +- .../Checkers/ExprInspectionChecker.cpp | 8 +- .../Checkers/FixedAddressChecker.cpp | 6 +- .../Checkers/InvalidatedIteratorChecker.cpp | 28 +- .../clang/lib/StaticAnalyzer/Checkers/Iterator.cpp | 14 +- .../clang/lib/StaticAnalyzer/Checkers/Iterator.h | 15 +- .../StaticAnalyzer/Checkers/IteratorModeling.cpp | 49 +- .../Checkers/IteratorRangeChecker.cpp | 20 +- .../Checkers/LocalizationChecker.cpp | 12 +- .../Checkers/MPI-Checker/MPIBugReporter.cpp | 6 +- .../Checkers/MPI-Checker/MPIBugReporter.h | 21 +- .../Checkers/MacOSKeychainAPIChecker.cpp | 22 +- .../StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp | 10 +- .../Checkers/MismatchedIteratorChecker.cpp | 49 +- .../Checkers/MmapWriteExecChecker.cpp | 16 +- .../Checkers/NSAutoreleasePoolChecker.cpp | 9 +- .../Checkers/NonNullParamChecker.cpp | 21 +- .../StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp | 17 +- .../Checkers/ObjCContainersChecker.cpp | 11 +- .../Checkers/ObjCSelfInitChecker.cpp | 9 +- .../Checkers/ObjCSuperDeallocChecker.cpp | 19 +- .../lib/StaticAnalyzer/Checkers/PaddingChecker.cpp | 9 +- .../Checkers/PointerArithChecker.cpp | 12 +- .../StaticAnalyzer/Checkers/PointerSubChecker.cpp | 6 +- .../Checkers/ReturnPointerRangeChecker.cpp | 10 +- .../StaticAnalyzer/Checkers/ReturnUndefChecker.cpp | 15 +- .../Checkers/SimpleStreamChecker.cpp | 27 +- .../Checkers/StdLibraryFunctionsChecker.cpp | 16 +- .../StaticAnalyzer/Checkers/TaggedUnionModeling.h | 2 +- .../StaticAnalyzer/Checkers/TaintTesterChecker.cpp | 5 +- .../Checkers/TestAfterDivZeroChecker.cpp | 10 +- .../StaticAnalyzer/Checkers/UndefBranchChecker.cpp | 89 +- .../Checkers/UndefCapturedBlockVarChecker.cpp | 8 +- .../StaticAnalyzer/Checkers/UndefResultChecker.cpp | 8 +- .../Checkers/UndefinedArraySubscriptChecker.cpp | 7 +- .../Checkers/UndefinedAssignmentChecker.cpp | 11 +- .../UninitializedObject/UninitializedObject.h | 2 +- .../UninitializedObjectChecker.cpp | 11 +- .../lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp | 32 +- .../lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp | 20 +- .../lib/StaticAnalyzer/Checkers/VforkChecker.cpp | 7 +- .../StaticAnalyzer/Core/CommonBugCategories.cpp | 1 + .../clang/lib/StaticAnalyzer/Core/Environment.cpp | 2 +- .../clang/lib/StaticAnalyzer/Core/RegionStore.cpp | 6 +- .../clang/lib/Support/RISCVVIntrinsicUtils.cpp | 2 +- .../clang/lib/Tooling/Refactoring/Lookup.cpp | 4 +- contrib/llvm-project/clang/lib/Tooling/Tooling.cpp | 4 +- .../clang/tools/clang-format/ClangFormat.cpp | 69 +- .../clang/utils/TableGen/RISCVVEmitter.cpp | 2 +- .../clang/utils/TableGen/SveEmitter.cpp | 19 + .../compiler-rt/lib/asan/asan_linux.cpp | 13 +- .../compiler-rt/lib/asan/asan_new_delete.cpp | 9 - .../compiler-rt/lib/builtins/cpu_model/x86.c | 2 +- .../llvm-project/compiler-rt/lib/builtins/fp_lib.h | 12 - .../compiler-rt/lib/builtins/int_types.h | 2 +- .../compiler-rt/lib/hwasan/hwasan_report.cpp | 11 +- .../compiler-rt/lib/memprof/memprof_linux.cpp | 1 - .../sanitizer_common_interceptors.inc | 4 +- .../lib/sanitizer_common/sanitizer_flat_map.h | 4 + .../lib/sanitizer_common/sanitizer_freebsd.h | 137 -- .../lib/sanitizer_common/sanitizer_linux.cpp | 9 +- .../sanitizer_common/sanitizer_linux_libcdep.cpp | 8 +- .../sanitizer_platform_interceptors.h | 5 +- .../sanitizer_platform_limits_freebsd.h | 2 + .../sanitizer_platform_limits_posix.h | 1 + .../sanitizer_common/sanitizer_procmaps_bsd.cpp | 11 - .../sanitizer_common/sanitizer_stackdepotbase.h | 22 +- .../compiler-rt/lib/tsan/rtl/tsan_platform.h | 32 + .../lib/tsan/rtl/tsan_platform_linux.cpp | 8 +- contrib/llvm-project/libcxx/include/__config | 10 + .../libcxx/include/__memory/shared_ptr.h | 4 +- .../libcxx/include/__memory/unique_ptr.h | 4 - .../libcxx/include/__ranges/chunk_by_view.h | 3 +- .../libcxx/include/__ranges/drop_view.h | 7 +- .../libcxx/include/__ranges/drop_while_view.h | 3 +- .../libcxx/include/__ranges/filter_view.h | 2 +- .../libcxx/include/__ranges/movable_box.h | 62 +- .../libcxx/include/__ranges/repeat_view.h | 4 +- .../libcxx/include/__ranges/single_view.h | 4 +- .../libcxx/include/__ranges/take_while_view.h | 3 +- .../libcxx/include/__ranges/transform_view.h | 3 +- contrib/llvm-project/libcxx/include/memory | 2 +- contrib/llvm-project/lld/COFF/Driver.cpp | 3 + contrib/llvm-project/lld/COFF/Writer.cpp | 2 +- .../llvm/include/llvm/ADT/GenericUniformityImpl.h | 6 + .../llvm/include/llvm/ADT/SmallString.h | 65 +- .../llvm/include/llvm/Analysis/ConstraintSystem.h | 7 - .../include/llvm/Analysis/TargetTransformInfo.h | 22 + .../llvm/Analysis/TargetTransformInfoImpl.h | 7 + .../llvm/CodeGen/GlobalISel/CombinerHelper.h | 18 +- .../include/llvm/Frontend/OpenMP/OMPIRBuilder.h | 7 + .../llvm/include/llvm/IR/IntrinsicsAMDGPU.td | 10 +- .../include/llvm/Support/AMDHSAKernelDescriptor.h | 44 +- .../llvm/Support/X86DisassemblerDecoderCommon.h | 9 +- .../llvm/include/llvm/Target/GlobalISel/Combine.td | 15 +- .../llvm/lib/Analysis/ConstraintSystem.cpp | 10 +- .../llvm/lib/Analysis/InstructionSimplify.cpp | 32 +- .../llvm/lib/Analysis/LazyValueInfo.cpp | 163 ++- .../llvm/lib/Analysis/TargetTransformInfo.cpp | 9 + .../llvm/lib/Analysis/ValueTracking.cpp | 34 - .../llvm-project/llvm/lib/Analysis/VectorUtils.cpp | 2 + .../llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 3 + .../llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | 353 +++++- .../llvm/lib/CodeGen/MachineCopyPropagation.cpp | 42 +- .../llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 16 +- .../llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp | 9 +- .../lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp | 3 +- .../lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 8 +- .../llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 +- .../lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 3 +- .../Orc/Debugging/DebugInfoSupport.cpp | 3 +- .../llvm/lib/ExecutionEngine/Orc/LLJIT.cpp | 6 +- .../llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp | 12 +- .../llvm-project/llvm/lib/FuzzMutate/FuzzerCLI.cpp | 16 +- contrib/llvm-project/llvm/lib/IR/DebugInfo.cpp | 4 + .../llvm-project/llvm/lib/MC/WasmObjectWriter.cpp | 3 +- .../llvm/lib/Object/WasmObjectFile.cpp | 21 +- .../llvm/lib/ProfileData/InstrProfReader.cpp | 2 +- .../llvm-project/llvm/lib/Support/RISCVISAInfo.cpp | 11 +- .../llvm-project/llvm/lib/Support/Windows/Path.inc | 5 +- .../lib/Target/AArch64/AArch64ISelDAGToDAG.cpp | 39 +- .../lib/Target/AArch64/AArch64ISelLowering.cpp | 59 +- .../AArch64/Disassembler/AArch64Disassembler.cpp | 2 +- .../Target/AArch64/GISel/AArch64LegalizerInfo.cpp | 14 +- .../llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp | 10 +- .../llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp | 18 +- .../llvm/lib/Target/AMDGPU/AMDGPUInstructions.td | 1 + .../lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp | 1 + .../llvm/lib/Target/AMDGPU/AMDGPURegisterBanks.td | 2 +- .../Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp | 3 +- .../lib/Target/AMDGPU/AMDGPURewriteUndefForPHI.cpp | 1 - .../lib/Target/AMDGPU/AMDGPUSearchableTables.td | 1 + .../AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp | 3 - .../Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp | 9 +- .../AMDGPU/Disassembler/AMDGPUDisassembler.cpp | 57 +- .../llvm/lib/Target/AMDGPU/FLATInstructions.td | 11 +- .../AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp | 4 +- .../llvm/lib/Target/AMDGPU/R600ISelLowering.cpp | 6 +- .../llvm/lib/Target/AMDGPU/SIISelLowering.cpp | 58 +- .../llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | 24 +- .../llvm/lib/Target/AMDGPU/SIInstructions.td | 10 + .../llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp | 12 +- .../llvm/lib/Target/AMDGPU/SIRegisterInfo.td | 76 +- .../lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | 2 - .../llvm/lib/Target/AMDGPU/VOP3PInstructions.td | 22 +- .../llvm/lib/Target/ARC/ARCISelLowering.cpp | 2 +- .../llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp | 9 +- .../llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp | 28 +- .../llvm/lib/Target/ARM/ARMISelLowering.cpp | 69 +- .../llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp | 2 +- .../llvm/lib/Target/AVR/AVRISelLowering.cpp | 5 +- .../llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp | 4 +- .../llvm/lib/Target/CSKY/CSKYISelLowering.cpp | 4 +- .../lib/Target/Hexagon/HexagonISelDAGToDAG.cpp | 34 +- .../lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp | 6 +- .../lib/Target/Hexagon/HexagonISelLowering.cpp | 9 +- .../lib/Target/Hexagon/HexagonISelLoweringHVX.cpp | 4 +- .../llvm/lib/Target/Lanai/LanaiISelLowering.cpp | 4 +- .../LoongArch/AsmParser/LoongArchAsmParser.cpp | 12 +- .../lib/Target/LoongArch/LoongArchISelLowering.cpp | 59 +- .../lib/Target/LoongArch/LoongArchISelLowering.h | 1 + .../lib/Target/LoongArch/LoongArchLASXInstrInfo.td | 50 +- .../lib/Target/LoongArch/LoongArchLSXInstrInfo.td | 4 +- .../MCTargetDesc/LoongArchMCCodeEmitter.cpp | 13 + .../LoongArch/MCTargetDesc/LoongArchMCExpr.cpp | 7 +- .../LoongArch/MCTargetDesc/LoongArchMCExpr.h | 8 +- .../llvm/lib/Target/M68k/M68kExpandPseudo.cpp | 10 + .../llvm/lib/Target/M68k/M68kISelLowering.cpp | 243 ++-- .../llvm/lib/Target/M68k/M68kISelLowering.h | 9 + .../llvm/lib/Target/M68k/M68kInstrArithmetic.td | 70 +- .../llvm/lib/Target/M68k/M68kInstrData.td | 3 + .../llvm/lib/Target/M68k/M68kInstrFormats.td | 20 +- .../llvm/lib/Target/M68k/M68kInstrInfo.td | 30 +- .../llvm/lib/Target/MSP430/MSP430ISelLowering.cpp | 6 +- .../llvm/lib/Target/Mips/Mips64InstrInfo.td | 12 +- .../llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp | 20 + .../llvm/lib/Target/Mips/MipsISelDAGToDAG.h | 1 + .../llvm/lib/Target/Mips/MipsISelLowering.cpp | 4 +- .../llvm/lib/Target/Mips/MipsInstrCompiler.td | 33 + .../llvm/lib/Target/Mips/MipsInstrInfo.td | 13 +- .../llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp | 8 +- .../llvm/lib/Target/Mips/MipsSEISelLowering.cpp | 8 +- .../llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp | 6 +- .../llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 5 +- .../llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 134 +- .../lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | 45 +- .../RISCV/Disassembler/RISCVDisassembler.cpp | 31 +- .../lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp | 2 +- .../Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp | 1 - .../lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h | 14 +- .../Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp | 5 +- .../llvm/lib/Target/RISCV/RISCVCallingConv.td | 4 +- .../llvm/lib/Target/RISCV/RISCVFeatures.td | 29 +- .../llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 6 +- .../llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 230 +++- .../llvm/lib/Target/RISCV/RISCVInsertWriteVXRM.cpp | 14 +- .../llvm/lib/Target/RISCV/RISCVInstrInfo.cpp | 11 +- .../llvm/lib/Target/RISCV/RISCVInstrInfo.td | 11 +- .../lib/Target/RISCV/RISCVInstrInfoVPseudos.td | 152 +-- .../lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td | 58 + .../llvm/lib/Target/RISCV/RISCVInstrInfoXSf.td | 83 +- .../llvm/lib/Target/RISCV/RISCVInstrInfoZc.td | 5 +- .../llvm/lib/Target/RISCV/RISCVInstrInfoZcmop.td | 34 + .../llvm/lib/Target/RISCV/RISCVInstrInfoZicfiss.td | 72 ++ .../llvm/lib/Target/RISCV/RISCVInstrInfoZimop.td | 59 + .../llvm/lib/Target/RISCV/RISCVProcessors.td | 3 +- .../llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp | 3 + .../llvm/lib/Target/RISCV/RISCVRegisterInfo.td | 7 + .../llvm/lib/Target/RISCV/RISCVSystemOperands.td | 55 +- .../lib/Target/RISCV/RISCVTargetTransformInfo.h | 3 +- .../llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp | 6 +- .../llvm/lib/Target/Sparc/SparcISelLowering.cpp | 4 +- .../lib/Target/SystemZ/SystemZISelLowering.cpp | 76 +- .../llvm/lib/Target/SystemZ/SystemZOperators.td | 4 +- .../llvm/lib/Target/VE/VEISelLowering.cpp | 14 +- .../llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp | 10 +- .../Target/X86/Disassembler/X86Disassembler.cpp | 6 +- .../X86/Disassembler/X86DisassemblerDecoder.h | 1 + .../llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h | 13 +- .../X86/MCTargetDesc/X86InstPrinterCommon.cpp | 3 + .../Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp | 43 +- contrib/llvm-project/llvm/lib/Target/X86/X86.td | 11 +- .../llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | 4 +- .../llvm/lib/Target/X86/X86ISelLowering.cpp | 10 +- .../llvm/lib/Target/X86/X86InsertPrefetch.cpp | 3 +- .../llvm/lib/Target/X86/X86InstrAMX.td | 68 +- .../llvm/lib/Target/X86/X86InstrAVX512.td | 11 + .../llvm/lib/Target/X86/X86InstrArithmetic.td | 1306 +++++++++----------- .../llvm/lib/Target/X86/X86InstrFormats.td | 2 + .../llvm/lib/Target/X86/X86InstrPredicates.td | 3 +- .../llvm/lib/Target/X86/X86InstrSSE.td | 94 +- .../llvm/lib/Target/X86/X86InstrSystem.td | 4 +- .../llvm/lib/Target/X86/X86InstrUtils.td | 426 ++++++- .../llvm/lib/Target/X86/X86InstrVecCompiler.td | 9 + .../llvm/lib/Target/X86/X86TargetTransformInfo.cpp | 26 +- .../llvm/lib/Target/X86/X86TargetTransformInfo.h | 5 + .../llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp | 2 +- .../llvm/lib/Target/XCore/XCoreISelLowering.cpp | 56 +- .../llvm/lib/TargetParser/ARMTargetParser.cpp | 6 +- .../llvm-project/llvm/lib/TargetParser/Host.cpp | 2 +- .../llvm-project/llvm/lib/TargetParser/Triple.cpp | 3 +- .../llvm/lib/TargetParser/X86TargetParser.cpp | 4 +- .../llvm-project/llvm/lib/TextAPI/TextStubV5.cpp | 7 +- .../llvm/lib/Transforms/Coroutines/CoroFrame.cpp | 6 +- .../llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 46 +- .../Transforms/InstCombine/InstCombineAddSub.cpp | 4 +- .../Transforms/InstCombine/InstCombineAndOrXor.cpp | 14 +- .../Transforms/InstCombine/InstCombineCalls.cpp | 6 + .../Transforms/InstCombine/InstCombineCompares.cpp | 196 ++- .../Transforms/InstCombine/InstCombineInternal.h | 7 +- .../Transforms/InstCombine/InstCombineSelect.cpp | 71 +- .../InstCombine/InstructionCombining.cpp | 58 +- .../Transforms/Scalar/ConstraintElimination.cpp | 64 +- .../Transforms/Utils/CanonicalizeFreezeInLoops.cpp | 60 +- .../llvm/lib/Transforms/Utils/Local.cpp | 5 +- .../lib/Transforms/Vectorize/LoopVectorize.cpp | 63 +- .../lib/Transforms/Vectorize/SLPVectorizer.cpp | 146 ++- .../llvm/lib/Transforms/Vectorize/VPlan.h | 30 + .../llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp | 65 +- .../llvm/lib/Transforms/Vectorize/VPlanValue.h | 1 + .../llvm-project/llvm/tools/llvm-ar/llvm-ar.cpp | 3 +- .../llvm/tools/llvm-diff/llvm-diff.cpp | 3 +- .../llvm/utils/TableGen/X86DisassemblerTables.cpp | 21 +- .../llvm/utils/TableGen/X86FoldTablesEmitter.cpp | 18 +- .../llvm/utils/TableGen/X86RecognizableInstr.cpp | 37 +- .../llvm/utils/TableGen/X86RecognizableInstr.h | 4 +- lib/clang/include/Plugins/Plugins.def | 1 + lib/clang/include/VCSVersion.inc | 6 +- lib/clang/include/lld/Common/Version.inc | 2 +- lib/clang/include/llvm/Config/AsmParsers.def | 23 + lib/clang/include/llvm/Config/AsmPrinters.def | 23 + lib/clang/include/llvm/Config/Disassemblers.def | 23 + lib/clang/include/llvm/Config/TargetMCAs.def | 23 + lib/clang/include/llvm/Config/Targets.def | 22 + lib/clang/include/llvm/Support/VCSRevision.h | 2 +- lib/clang/liblldb/Makefile | 1 + lib/clang/libllvm/Makefile | 1 + 335 files changed, 5221 insertions(+), 3749 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index f1db90f37d48..55479a7f6bfc 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -136,11 +136,14 @@ OLD_FILES+=usr/lib/clang/17/include/cmpccxaddintrin.h OLD_FILES+=usr/lib/clang/17/include/cpuid.h OLD_FILES+=usr/lib/clang/17/include/crc32intrin.h OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/algorithm +OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/bits/basic_string.h +OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/bits/basic_string.tcc OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/bits/shared_ptr_base.h OLD_DIRS+=usr/lib/clang/17/include/cuda_wrappers/bits OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/cmath OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/complex OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/new +OLD_FILES+=usr/lib/clang/17/include/cuda_wrappers/shared_ptr_base.h OLD_DIRS+=usr/lib/clang/17/include/cuda_wrappers OLD_FILES+=usr/lib/clang/17/include/emmintrin.h OLD_FILES+=usr/lib/clang/17/include/enqcmdintrin.h @@ -440,57 +443,57 @@ OLD_DIRS+=usr/lib/clang/17/share OLD_DIRS+=usr/lib/clang/17 # 20240419: new libc++ import which bumps version from 17 to 18 -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/algorithm_fwd.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/algorithm_impl.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/execution_defs.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/execution_impl.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/glue_algorithm_defs.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/glue_algorithm_impl.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/glue_memory_defs.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/glue_memory_impl.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/glue_numeric_defs.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/glue_numeric_impl.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/memory_impl.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/numeric_fwd.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/numeric_impl.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_for.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_for_each.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_invoke.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_merge.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_scan.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_stable_partial_sort.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_stable_sort.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_transform_reduce.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/parallel_transform_scan.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/omp/util.h -OLD_DIRS+=usr/include/include/c++/v1/__pstl/internal/omp -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/parallel_backend.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/parallel_backend_omp.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/parallel_backend_serial.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/parallel_backend_tbb.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/parallel_backend_utils.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/unseq_backend_simd.h -OLD_FILES+=usr/include/include/c++/v1/__pstl/internal/utils.h -OLD_DIRS+=usr/include/include/c++/v1/__pstl/internal -OLD_DIRS+=usr/include/include/c++/v1/__pstl -OLD_FILES+=usr/include/include/c++/v1/__pstl_algorithm -OLD_FILES+=usr/include/include/c++/v1/__pstl_memory -OLD_FILES+=usr/include/include/c++/v1/__pstl_numeric -OLD_FILES+=usr/include/include/c++/v1/__type_traits/predicate_traits.h -OLD_FILES+=usr/include/include/c++/v1/__utility/terminate_on_exception.h -OLD_FILES+=usr/include/include/c++/v1/experimental/deque -OLD_FILES+=usr/include/include/c++/v1/experimental/forward_list -OLD_FILES+=usr/include/include/c++/v1/experimental/list -OLD_FILES+=usr/include/include/c++/v1/experimental/map -OLD_FILES+=usr/include/include/c++/v1/experimental/memory_resource -OLD_FILES+=usr/include/include/c++/v1/experimental/regex -OLD_FILES+=usr/include/include/c++/v1/experimental/set -OLD_FILES+=usr/include/include/c++/v1/experimental/string -OLD_FILES+=usr/include/include/c++/v1/experimental/unordered_map -OLD_FILES+=usr/include/include/c++/v1/experimental/unordered_set -OLD_FILES+=usr/include/include/c++/v1/experimental/vector -OLD_FILES+=usr/include/include/c++/v1/limits.h -OLD_FILES+=usr/include/include/c++/v1/setjmp.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/algorithm_fwd.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/algorithm_impl.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/execution_defs.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/execution_impl.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/glue_algorithm_defs.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/glue_algorithm_impl.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/glue_memory_defs.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/glue_memory_impl.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/glue_numeric_defs.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/glue_numeric_impl.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/memory_impl.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/numeric_fwd.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/numeric_impl.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_for.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_for_each.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_invoke.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_merge.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_scan.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_stable_partial_sort.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_stable_sort.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_transform_reduce.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/parallel_transform_scan.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/omp/util.h +OLD_DIRS+=usr/include/c++/v1/__pstl/internal/omp +OLD_FILES+=usr/include/c++/v1/__pstl/internal/parallel_backend.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/parallel_backend_omp.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/parallel_backend_serial.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/parallel_backend_tbb.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/parallel_backend_utils.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/unseq_backend_simd.h +OLD_FILES+=usr/include/c++/v1/__pstl/internal/utils.h +OLD_DIRS+=usr/include/c++/v1/__pstl/internal +OLD_DIRS+=usr/include/c++/v1/__pstl +OLD_FILES+=usr/include/c++/v1/__pstl_algorithm +OLD_FILES+=usr/include/c++/v1/__pstl_memory +OLD_FILES+=usr/include/c++/v1/__pstl_numeric +OLD_FILES+=usr/include/c++/v1/__type_traits/predicate_traits.h +OLD_FILES+=usr/include/c++/v1/__utility/terminate_on_exception.h +OLD_FILES+=usr/include/c++/v1/experimental/deque +OLD_FILES+=usr/include/c++/v1/experimental/forward_list +OLD_FILES+=usr/include/c++/v1/experimental/list +OLD_FILES+=usr/include/c++/v1/experimental/map +OLD_FILES+=usr/include/c++/v1/experimental/memory_resource +OLD_FILES+=usr/include/c++/v1/experimental/regex +OLD_FILES+=usr/include/c++/v1/experimental/set +OLD_FILES+=usr/include/c++/v1/experimental/string +OLD_FILES+=usr/include/c++/v1/experimental/unordered_map +OLD_FILES+=usr/include/c++/v1/experimental/unordered_set +OLD_FILES+=usr/include/c++/v1/experimental/vector +OLD_FILES+=usr/include/c++/v1/limits.h +OLD_FILES+=usr/include/c++/v1/setjmp.h # 20240213: caroot bundle updated OLD_FILES+=usr/share/certs/trusted/Security_Communication_Root_CA.pem diff --git a/contrib/llvm-project/clang/include/clang/AST/Type.h b/contrib/llvm-project/clang/include/clang/AST/Type.h index b3ae66e6e769..1afa69367286 100644 --- a/contrib/llvm-project/clang/include/clang/AST/Type.h +++ b/contrib/llvm-project/clang/include/clang/AST/Type.h @@ -2383,10 +2383,6 @@ public: /// Check if the type is the CUDA device builtin texture type. bool isCUDADeviceBuiltinTextureType() const; - bool isRVVType(unsigned ElementCount) const; - - bool isRVVType(unsigned Bitwidth, bool IsFloat, bool IsBFloat = false) const; - /// Return the implicit lifetime for this type, which must not be dependent. Qualifiers::ObjCLifetime getObjCARCImplicitLifetime() const; @@ -7283,28 +7279,6 @@ inline bool Type::isOpenCLSpecificType() const { isQueueT() || isReserveIDT() || isPipeType() || isOCLExtOpaqueType(); } -inline bool Type::isRVVType(unsigned ElementCount) const { - bool Ret = false; -#define RVV_VECTOR_TYPE(Name, Id, SingletonId, NumEls, ElBits, NF, IsSigned, \ - IsFP, IsBF) \ - if (NumEls == ElementCount) \ - Ret |= isSpecificBuiltinType(BuiltinType::Id); -#include "clang/Basic/RISCVVTypes.def" - return Ret; -} - -inline bool Type::isRVVType(unsigned Bitwidth, bool IsFloat, - bool IsBFloat) const { - bool Ret = false; -#define RVV_TYPE(Name, Id, SingletonId) -#define RVV_VECTOR_TYPE(Name, Id, SingletonId, NumEls, ElBits, NF, IsSigned, \ - IsFP, IsBF) \ - if (ElBits == Bitwidth && IsFloat == IsFP && IsBFloat == IsBF) \ - Ret |= isSpecificBuiltinType(BuiltinType::Id); -#include "clang/Basic/RISCVVTypes.def" - return Ret; -} - inline bool Type::isTemplateTypeParmType() const { return isa<TemplateTypeParmType>(CanonicalType); } diff --git a/contrib/llvm-project/clang/include/clang/Basic/BuiltinsAArch64.def b/contrib/llvm-project/clang/include/clang/Basic/BuiltinsAArch64.def index 82a1ba3c82ad..31ec84143f65 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/BuiltinsAArch64.def +++ b/contrib/llvm-project/clang/include/clang/Basic/BuiltinsAArch64.def @@ -68,6 +68,9 @@ TARGET_BUILTIN(__builtin_arm_ldg, "v*v*", "t", "mte") TARGET_BUILTIN(__builtin_arm_stg, "vv*", "t", "mte") TARGET_BUILTIN(__builtin_arm_subp, "Uiv*v*", "t", "mte") +// SME state function +BUILTIN(__builtin_arm_get_sme_state, "vULi*ULi*", "n") + // Memory Operations TARGET_BUILTIN(__builtin_arm_mops_memset_tag, "v*v*iz", "", "mte,mops") diff --git a/contrib/llvm-project/clang/include/clang/Basic/riscv_sifive_vector.td b/contrib/llvm-project/clang/include/clang/Basic/riscv_sifive_vector.td index bb54e2664186..0d471f6c554c 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/riscv_sifive_vector.td +++ b/contrib/llvm-project/clang/include/clang/Basic/riscv_sifive_vector.td @@ -109,10 +109,10 @@ multiclass RVVVFWMACCBuiltinSet<list<list<string>> suffixes_prototypes> { Name = NAME, HasMasked = false, Log2LMUL = [-2, -1, 0, 1, 2] in - defm NAME : RVVOutOp1Op2BuiltinSet<NAME, "b", suffixes_prototypes>; + defm NAME : RVVOutOp1Op2BuiltinSet<NAME, "y", suffixes_prototypes>; } -multiclass RVVVQMACCBuiltinSet<list<list<string>> suffixes_prototypes> { +multiclass RVVVQMACCDODBuiltinSet<list<list<string>> suffixes_prototypes> { let OverloadedName = NAME, Name = NAME, HasMasked = false, @@ -120,6 +120,14 @@ multiclass RVVVQMACCBuiltinSet<list<list<string>> suffixes_prototypes> { defm NAME : RVVOutOp1Op2BuiltinSet<NAME, "i", suffixes_prototypes>; } +multiclass RVVVQMACCQOQBuiltinSet<list<list<string>> suffixes_prototypes> { + let OverloadedName = NAME, + Name = NAME, + HasMasked = false, + Log2LMUL = [-1, 0, 1, 2] in + defm NAME : RVVOutOp1Op2BuiltinSet<NAME, "s", suffixes_prototypes>; +} + multiclass RVVVFNRCLIPBuiltinSet<string suffix, string prototype, string type_range> { let Log2LMUL = [-3, -2, -1, 0, 1, 2], Name = NAME, @@ -130,18 +138,18 @@ multiclass RVVVFNRCLIPBuiltinSet<string suffix, string prototype, string type_ra let UnMaskedPolicyScheme = HasPolicyOperand in let RequiredFeatures = ["Xsfvqmaccdod"] in { - defm sf_vqmaccu_2x8x2 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)SUv(FixedSEW:8)Uv"]]>; - defm sf_vqmacc_2x8x2 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)Sv(FixedSEW:8)v"]]>; - defm sf_vqmaccus_2x8x2 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)SUv(FixedSEW:8)v"]]>; - defm sf_vqmaccsu_2x8x2 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)Sv(FixedSEW:8)Uv"]]>; + defm sf_vqmaccu_2x8x2 : RVVVQMACCDODBuiltinSet<[["", "v", "vv(FixedSEW:8)SUv(FixedSEW:8)Uv"]]>; + defm sf_vqmacc_2x8x2 : RVVVQMACCDODBuiltinSet<[["", "v", "vv(FixedSEW:8)Sv(FixedSEW:8)v"]]>; + defm sf_vqmaccus_2x8x2 : RVVVQMACCDODBuiltinSet<[["", "v", "vv(FixedSEW:8)SUv(FixedSEW:8)v"]]>; + defm sf_vqmaccsu_2x8x2 : RVVVQMACCDODBuiltinSet<[["", "v", "vv(FixedSEW:8)Sv(FixedSEW:8)Uv"]]>; } let UnMaskedPolicyScheme = HasPolicyOperand in let RequiredFeatures = ["Xsfvqmaccqoq"] in { - defm sf_vqmaccu_4x8x4 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)SUv(FixedSEW:8)Uv"]]>; - defm sf_vqmacc_4x8x4 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)Sv(FixedSEW:8)v"]]>; - defm sf_vqmaccus_4x8x4 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)SUv(FixedSEW:8)v"]]>; - defm sf_vqmaccsu_4x8x4 : RVVVQMACCBuiltinSet<[["", "v", "vv(FixedSEW:8)Sv(FixedSEW:8)Uv"]]>; + defm sf_vqmaccu_4x8x4 : RVVVQMACCQOQBuiltinSet<[["", "w", "ww(FixedSEW:8)SUv(FixedSEW:8)Uv"]]>; + defm sf_vqmacc_4x8x4 : RVVVQMACCQOQBuiltinSet<[["", "w", "ww(FixedSEW:8)Sv(FixedSEW:8)v"]]>; + defm sf_vqmaccus_4x8x4 : RVVVQMACCQOQBuiltinSet<[["", "w", "ww(FixedSEW:8)SUv(FixedSEW:8)v"]]>; + defm sf_vqmaccsu_4x8x4 : RVVVQMACCQOQBuiltinSet<[["", "w", "ww(FixedSEW:8)Sv(FixedSEW:8)Uv"]]>; } let UnMaskedPolicyScheme = HasPolicyOperand in 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 f2dde7f540fb..e7d78b03511f 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td +++ b/contrib/llvm-project/clang/include/clang/Basic/riscv_vector.td @@ -2441,11 +2441,9 @@ let HasMasked = false, HasVL = false, IRName = "" in { return Builder.CreateInsertVector(ResultType, Ops[0], Ops[2], Ops[1]); } }] in { - let Log2LMUL = [0, 1, 2] in { - foreach dst_lmul = ["(LFixedLog2LMUL:1)", "(LFixedLog2LMUL:2)", "(LFixedLog2LMUL:3)"] in { - def : RVVBuiltin<"v" # dst_lmul # "v", dst_lmul # "v" # dst_lmul # "vKzv", "csilxfd">; - def : RVVBuiltin<"Uv" # dst_lmul # "Uv", dst_lmul # "Uv" # dst_lmul #"UvKzUv", "csil">; - } + foreach dst_lmul = ["(LFixedLog2LMUL:1)", "(LFixedLog2LMUL:2)", "(LFixedLog2LMUL:3)"] in { + def : RVVBuiltin<"v" # dst_lmul # "v", dst_lmul # "v" # dst_lmul # "vKzv", "csilxfd">; + def : RVVBuiltin<"Uv" # dst_lmul # "Uv", dst_lmul # "Uv" # dst_lmul #"UvKzUv", "csil">; } foreach nf = NFList in { defvar T = "(Tuple:" # nf # ")"; diff --git a/contrib/llvm-project/clang/include/clang/Basic/riscv_vector_common.td b/contrib/llvm-project/clang/include/clang/Basic/riscv_vector_common.td index 4036ce8e6903..040db6f0cdbf 100644 --- a/contrib/llvm-project/clang/include/clang/Basic/riscv_vector_common.td +++ b/contrib/llvm-project/clang/include/clang/Basic/riscv_vector_common.td @@ -41,7 +41,7 @@ // x: float16_t (half) // f: float32_t (float) // d: float64_t (double) -// b: bfloat16_t (bfloat16) +// y: bfloat16_t (bfloat16) // // This way, given an LMUL, a record with a TypeRange "sil" will cause the // definition of 3 builtins. Each type "t" in the TypeRange (in this example diff --git a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h index 5d2c96e5bc9d..45187433c069 100644 --- a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h +++ b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h @@ -13,6 +13,7 @@ namespace clang { namespace ento { namespace categories { +extern const char *const AppleAPIMisuse; extern const char *const CoreFoundationObjectiveC; extern const char *const LogicError; extern const char *const MemoryRefCount; diff --git a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/Checker.h b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/Checker.h index 8a46282a595e..2ec54a837c42 100644 --- a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/Checker.h +++ b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/Checker.h @@ -193,9 +193,8 @@ public: class Location { template <typename CHECKER> - static void _checkLocation(void *checker, - const SVal &location, bool isLoad, const Stmt *S, - CheckerContext &C) { + static void _checkLocation(void *checker, SVal location, bool isLoad, + const Stmt *S, CheckerContext &C) { ((const CHECKER *)checker)->checkLocation(location, isLoad, S, C); } @@ -209,8 +208,7 @@ public: class Bind { template <typename CHECKER> - static void _checkBind(void *checker, - const SVal &location, const SVal &val, const Stmt *S, + static void _checkBind(void *checker, SVal location, SVal val, const Stmt *S, CheckerContext &C) { ((const CHECKER *)checker)->checkBind(location, val, S, C); } @@ -456,10 +454,8 @@ namespace eval { class Assume { template <typename CHECKER> - static ProgramStateRef _evalAssume(void *checker, - ProgramStateRef state, - const SVal &cond, - bool assumption) { + static ProgramStateRef _evalAssume(void *checker, ProgramStateRef state, + SVal cond, bool assumption) { return ((const CHECKER *)checker)->evalAssume(state, cond, assumption); } diff --git a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h index 39583c443eda..a45ba1bc573e 100644 --- a/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h +++ b/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h @@ -488,13 +488,11 @@ public: using CheckCallFunc = CheckerFn<void (const CallEvent &, CheckerContext &)>; - using CheckLocationFunc = - CheckerFn<void (const SVal &location, bool isLoad, const Stmt *S, - CheckerContext &)>; + using CheckLocationFunc = CheckerFn<void(SVal location, bool isLoad, + const Stmt *S, CheckerContext &)>; using CheckBindFunc = - CheckerFn<void (const SVal &location, const SVal &val, const Stmt *S, - CheckerContext &)>; + CheckerFn<void(SVal location, SVal val, const Stmt *S, CheckerContext &)>; using CheckEndAnalysisFunc = CheckerFn<void (ExplodedGraph &, BugReporter &, ExprEngine &)>; @@ -530,8 +528,7 @@ public: RegionAndSymbolInvalidationTraits *ITraits)>; using EvalAssumeFunc = - CheckerFn<ProgramStateRef (ProgramStateRef, const SVal &cond, - bool assumption)>; + CheckerFn<ProgramStateRef(ProgramStateRef, SVal cond, bool assumption)>; using EvalCallFunc = CheckerFn<bool (const CallEvent &, CheckerContext &)>; diff --git a/contrib/llvm-project/clang/lib/AST/Interp/Interp.h b/contrib/llvm-project/clang/lib/AST/Interp/Interp.h index a240d74d6342..828d4ea35526 100644 --- a/contrib/llvm-project/clang/lib/AST/Interp/Interp.h +++ b/contrib/llvm-project/clang/lib/AST/Interp/Interp.h @@ -37,7 +37,6 @@ namespace clang { namespace interp { -using APInt = llvm::APInt; using APSInt = llvm::APSInt; /// Convert a value to an APValue. diff --git a/contrib/llvm-project/clang/lib/ASTMatchers/Dynamic/Parser.cpp b/contrib/llvm-project/clang/lib/ASTMatchers/Dynamic/Parser.cpp index 27096a83b8dd..6a16c2184fcf 100644 --- a/contrib/llvm-project/clang/lib/ASTMatchers/Dynamic/Parser.cpp +++ b/contrib/llvm-project/clang/lib/ASTMatchers/Dynamic/Parser.cpp @@ -299,10 +299,8 @@ private: /// Consume all leading whitespace from \c Code. void consumeWhitespace() { - Code = Code.drop_while([](char c) { - // Don't trim newlines. - return StringRef(" \t\v\f\r").contains(c); - }); + // Don't trim newlines. + Code = Code.ltrim(" \t\v\f\r"); } SourceLocation currentLocation() { diff --git a/contrib/llvm-project/clang/lib/Basic/IdentifierTable.cpp b/contrib/llvm-project/clang/lib/Basic/IdentifierTable.cpp index 5902c6dc3ce0..d0d8316385b4 100644 --- a/contrib/llvm-project/clang/lib/Basic/IdentifierTable.cpp +++ b/contrib/llvm-project/clang/lib/Basic/IdentifierTable.cpp @@ -628,8 +628,7 @@ ObjCMethodFamily Selector::getMethodFamilyImpl(Selector sel) { return OMF_performSelector; // The other method families may begin with a prefix of underscores. - while (!name.empty() && name.front() == '_') - name = name.substr(1); + name = name.ltrim('_'); if (name.empty()) return OMF_None; switch (name.front()) { diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.cpp index 3ee39133fcee..2f8395cb8932 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/AArch64.cpp @@ -1365,8 +1365,7 @@ bool AArch64TargetInfo::validateConstraintModifier( StringRef Constraint, char Modifier, unsigned Size, std::string &SuggestedModifier) const { // Strip off constraint modifiers. - while (Constraint[0] == '=' || Constraint[0] == '+' || Constraint[0] == '&') - Constraint = Constraint.substr(1); + Constraint = Constraint.ltrim("=+&"); switch (Constraint[0]) { default: diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp index 6e1842fc64e5..01f9e844da12 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/ARM.cpp @@ -1230,8 +1230,7 @@ bool ARMTargetInfo::validateConstraintModifier( bool isInOut = (Constraint[0] == '+'); // Strip off constraint modifiers. - while (Constraint[0] == '=' || Constraint[0] == '+' || Constraint[0] == '&') - Constraint = Constraint.substr(1); + Constraint = Constraint.ltrim("=+&"); switch (Constraint[0]) { default: diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp index 685462961ee3..6bc57a83a2d5 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp @@ -416,8 +416,7 @@ static void handleFullArchString(StringRef FullArchStr, Features.push_back("__RISCV_TargetAttrNeedOverride"); auto RII = llvm::RISCVISAInfo::parseArchString( FullArchStr, /* EnableExperimentalExtension */ true); - if (!RII) { - consumeError(RII.takeError()); + if (llvm::errorToBool(RII.takeError())) { // Forward the invalid FullArchStr. Features.push_back("+" + FullArchStr.str()); } else { diff --git a/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp b/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp index b97f88647fa4..3deaa19f8d4f 100644 --- a/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Targets/X86.cpp @@ -1613,8 +1613,7 @@ bool X86TargetInfo::validateOutputSize(const llvm::StringMap<bool> &FeatureMap, StringRef Constraint, unsigned Size) const { // Strip off constraint modifiers. - while (Constraint[0] == '=' || Constraint[0] == '+' || Constraint[0] == '&') - Constraint = Constraint.substr(1); + Constraint = Constraint.ltrim("=+&"); return validateOperandSize(FeatureMap, Constraint, Size); } diff --git a/contrib/llvm-project/clang/lib/Basic/Warnings.cpp b/contrib/llvm-project/clang/lib/Basic/Warnings.cpp index bab1af4f03b6..92954cab6fb0 100644 --- a/contrib/llvm-project/clang/lib/Basic/Warnings.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Warnings.cpp @@ -96,11 +96,7 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, // Check to see if this warning starts with "no-", if so, this is a // negative form of the option. - bool isPositive = true; - if (Opt.starts_with("no-")) { - isPositive = false; - Opt = Opt.substr(3); - } + bool isPositive = !Opt.consume_front("no-"); // Figure out how this option affects the warning. If -Wfoo, map the // diagnostic to a warning, if -Wno-foo, map it to ignore. diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp index 5081062da286..f71dbf1729a1 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp @@ -10430,6 +10430,26 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID, return Builder.CreateCall(F, llvm::ConstantInt::get(Int32Ty, HintID)); } + if (BuiltinID == clang::AArch64::BI__builtin_arm_get_sme_state) { + // Create call to __arm_sme_state and store the results to the two pointers. + CallInst *CI = EmitRuntimeCall(CGM.CreateRuntimeFunction( + llvm::FunctionType::get(StructType::get(CGM.Int64Ty, CGM.Int64Ty), {}, + false), + "__arm_sme_state")); + auto Attrs = + AttributeList() + .addFnAttribute(getLLVMContext(), "aarch64_pstate_sm_compatible") + .addFnAttribute(getLLVMContext(), "aarch64_pstate_za_preserved"); + CI->setAttributes(Attrs); + CI->setCallingConv( + llvm::CallingConv:: + AArch64_SME_ABI_Support_Routines_PreserveMost_From_X2); + Builder.CreateStore(Builder.CreateExtractValue(CI, 0), + EmitPointerWithAlignment(E->getArg(0))); + return Builder.CreateStore(Builder.CreateExtractValue(CI, 1), + EmitPointerWithAlignment(E->getArg(1))); + } + if (BuiltinID == clang::AArch64::BI__builtin_arm_rbit) { assert((getContext().getTypeSize(E->getType()) == 32) && "rbit of unusual size!"); diff --git a/contrib/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp b/contrib/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp index ed426098ac69..e362c9da51fe 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -6406,13 +6406,11 @@ static void emitOMPAtomicCaptureExpr(CodeGenFunction &CGF, } } -static void emitOMPAtomicCompareExpr(CodeGenFunction &CGF, - llvm::AtomicOrdering AO, const Expr *X, - const Expr *V, const Expr *R, - const Expr *E, const Expr *D, - const Expr *CE, bool IsXBinopExpr, - bool IsPostfixUpdate, bool IsFailOnly, - SourceLocation Loc) { +static void emitOMPAtomicCompareExpr( + CodeGenFunction &CGF, llvm::AtomicOrdering AO, llvm::AtomicOrdering FailAO, + const Expr *X, const Expr *V, const Expr *R, const Expr *E, const Expr *D, + const Expr *CE, bool IsXBinopExpr, bool IsPostfixUpdate, bool IsFailOnly, + SourceLocation Loc) { llvm::OpenMPIRBuilder &OMPBuilder = CGF.CGM.getOpenMPRuntime().getOMPBuilder(); @@ -6477,13 +6475,21 @@ static void emitOMPAtomicCompareExpr(CodeGenFunction &CGF, R->getType().isVolatileQualified()}; } - CGF.Builder.restoreIP(OMPBuilder.createAtomicCompare( - CGF.Builder, XOpVal, VOpVal, ROpVal, EVal, DVal, AO, Op, IsXBinopExpr, - IsPostfixUpdate, IsFailOnly)); + if (FailAO == llvm::AtomicOrdering::NotAtomic) { + // fail clause was not mentionend on the + // "#pragma omp atomic compare" construct. + CGF.Builder.restoreIP(OMPBuilder.createAtomicCompare( + CGF.Builder, XOpVal, VOpVal, ROpVal, EVal, DVal, AO, Op, IsXBinopExpr, + IsPostfixUpdate, IsFailOnly)); + } else + CGF.Builder.restoreIP(OMPBuilder.createAtomicCompare( + CGF.Builder, XOpVal, VOpVal, ROpVal, EVal, DVal, AO, Op, IsXBinopExpr, + IsPostfixUpdate, IsFailOnly, FailAO)); } static void emitOMPAtomicExpr(CodeGenFunction &CGF, OpenMPClauseKind Kind, - llvm::AtomicOrdering AO, bool IsPostfixUpdate, + llvm::AtomicOrdering AO, + llvm::AtomicOrdering FailAO, bool IsPostfixUpdate, const Expr *X, const Expr *V, const Expr *R, const Expr *E, const Expr *UE, const Expr *D, const Expr *CE, bool IsXLHSInRHSPart, @@ -6504,12 +6510,8 @@ static void emitOMPAtomicExpr(CodeGenFunction &CGF, OpenMPClauseKind Kind, IsXLHSInRHSPart, Loc); break; case OMPC_compare: { - emitOMPAtomicCompareExpr(CGF, AO, X, V, R, E, D, CE, IsXLHSInRHSPart, - IsPostfixUpdate, IsFailOnly, Loc); - break; - } - case OMPC_fail: { - //TODO + emitOMPAtomicCompareExpr(CGF, AO, FailAO, X, V, R, E, D, CE, + IsXLHSInRHSPart, IsPostfixUpdate, IsFailOnly, Loc); break; } default: @@ -6519,6 +6521,8 @@ static void emitOMPAtomicExpr(CodeGenFunction &CGF, OpenMPClauseKind Kind, void CodeGenFunction::EmitOMPAtomicDirective(const OMPAtomicDirective &S) { llvm::AtomicOrdering AO = llvm::AtomicOrdering::Monotonic; + // Fail Memory Clause Ordering. + llvm::AtomicOrdering FailAO = llvm::AtomicOrdering::NotAtomic; bool MemOrderingSpecified = false; if (S.getSingleClause<OMPSeqCstClause>()) { AO = llvm::AtomicOrdering::SequentiallyConsistent; @@ -6572,12 +6576,27 @@ void CodeGenFunction::EmitOMPAtomicDirective(const OMPAtomicDirective &S) { } } + if (KindsEncountered.contains(OMPC_compare) && + KindsEncountered.contains(OMPC_fail)) { + Kind = OMPC_compare; + const auto *FailClause = S.getSingleClause<OMPFailClause>(); + if (FailClause) { + OpenMPClauseKind FailParameter = FailClause->getFailParameter(); + if (FailParameter == llvm::omp::OMPC_relaxed) + FailAO = llvm::AtomicOrdering::Monotonic; + else if (FailParameter == llvm::omp::OMPC_acquire) + FailAO = llvm::AtomicOrdering::Acquire; + else if (FailParameter == llvm::omp::OMPC_seq_cst) + FailAO = llvm::AtomicOrdering::SequentiallyConsistent; + } + } + LexicalScope Scope(*this, S.getSourceRange()); EmitStopPoint(S.getAssociatedStmt()); - emitOMPAtomicExpr(*this, Kind, AO, S.isPostfixUpdate(), S.getX(), S.getV(), - S.getR(), S.getExpr(), S.getUpdateExpr(), S.getD(), - S.getCondExpr(), S.isXLHSInRHSPart(), S.isFailOnly(), - S.getBeginLoc()); + emitOMPAtomicExpr(*this, Kind, AO, FailAO, S.isPostfixUpdate(), S.getX(), + S.getV(), S.getR(), S.getExpr(), S.getUpdateExpr(), + S.getD(), S.getCondExpr(), S.isXLHSInRHSPart(), + S.isFailOnly(), S.getBeginLoc()); } static void emitCommonOMPTargetDirective(CodeGenFunction &CGF, diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp index 753a8fd74fa6..f8038497d90a 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp @@ -1139,8 +1139,7 @@ CodeGenAction::loadModule(MemoryBufferRef MBRef) { // Strip off a leading diagnostic code if there is one. StringRef Msg = Err.getMessage(); - if (Msg.starts_with("error: ")) - Msg = Msg.substr(7); + Msg.consume_front("error: "); unsigned DiagID = CI.getDiagnostics().getCustomDiagID(DiagnosticsEngine::Error, "%0"); diff --git a/contrib/llvm-project/clang/lib/CodeGen/Targets/LoongArch.cpp b/contrib/llvm-project/clang/lib/CodeGen/Targets/LoongArch.cpp index 7b2c31139b0b..63b9a1fdb988 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/Targets/LoongArch.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/Targets/LoongArch.cpp *** 18251 LINES SKIPPED ***