LLVM/project b043479orc-rt/lib/executor Session.cpp, orc-rt/unittests SessionTest.cpp

[orc-rt] Fix some Session::shutdown bugs. (#177528)

All calls to Session::shutdown were enquing their on-shutdown-complete
callbacks in Session's ShutdownInfo struct, but this queue is only
drained once by the thread that initiates shutdown. After the queue is
drained, subsequent calls to Session::shutdown were enquing their
callbacks in a queue that would never be drained.

This patch updates Session::shutdown to check whether shutdown has
completed already and, if so, run the on-shutdown-complete immediately.

This patch also fixes a concurrency bug: Session::shutdownComplete was
accessing SI->OnCompletes outside the session mutex, but this could lead
to corruption of SI->OnCompletes if a concurrent call to
Session::shutdown tried to enqueue a new callback to SI->OnCompletes
concurrently. This has been fixed by moving the SI->OnCompletes queue to
a new variable under the Session mutex, then draining the new queue
outside the mutex. (No testcase yet: this was discovered by observation,
and replicating the bug would depend on timing).
DeltaFile
+29-8orc-rt/lib/executor/Session.cpp
+11-0orc-rt/unittests/SessionTest.cpp
+40-82 files

LLVM/project 95c82ccflang/lib/Lower/OpenMP ClauseProcessor.cpp Clauses.cpp, llvm/include/llvm/Frontend/OpenMP ClauseT.h

Update NumTeamsT clause to accept upper bound list
DeltaFile
+14-16flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+9-14flang/lib/Lower/OpenMP/Clauses.cpp
+4-11llvm/include/llvm/Frontend/OpenMP/ClauseT.h
+27-413 files

LLVM/project dcd6468llvm/lib/Target/RISCV RISCVInstrInfoVPseudos.td RISCVInstrInfo.h, llvm/lib/Target/RISCV/MCTargetDesc RISCVBaseInfo.h

[RISCV] Improve vector pseudo table's experiences on translating between two different pseudo opcodes. NFC (#177232)

Sometimes we might need to translate from one vector pseudo -- like
`PseudoVFMUL_ALT_VV_M8_E16` -- to its `VFSUB_VV` counterpart, namely
`PseudoVFSUB_ALT_VV_M8_E16`. It's difficult to do this efficiently with
the current vector pseudo search table infrastructure. So I propose two
changes in this patch:
1. Currently both `RISCVVInversePseudosTable` and `RISCVVPseudosTable`
does not distinguish between F16 and BF16. This will be problematic
during lookup -- especially for `RISCVVInversePseudosTable`. So I added
a new single-bit field `IsAltFmt` into both tables.
2. It'd be great for `RISCVVPseudosTable` to return not just the base
instruction opcode but also LMUL & SEW (if there is any). Because the
alternative will require multiple additional steps (e.g. calling
`getLMul(TSFlags)`) -- especially for the SEW-specific pseudos -- that
are not really ergonomic. So I added `VLMul`, `SEW`, and `IsAltFmt` to
the result of `RISCVVPseudosTable::getPseudoInfo`. The downside of this
is of course bloating the table size, which is why I tried to mitigate
it with using bit fields.

This should be a NFC
DeltaFile
+8-2llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
+5-4llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
+3-0llvm/lib/Target/RISCV/RISCVInstrInfo.h
+16-63 files

LLVM/project 3781a08llvm/docs LangRef.rst

[LangRef] Clarify semantics of undef in shufflevector masks (#171453)

The current phrasing of `shufflevector` in the language reference
states:

> A poison element in the mask vector specifies that the resulting
element is poison. For backwards-compatibility reasons, LLVM temporarily
also accepts undef mask elements, which will be interpreted the same way
as poison elements.

This is a bit ambiguous. Does it mean that an undef mask element
produces a poison result element, or an undef result element?

Per https://reviews.llvm.org/D148637, the answer is the former. I've
updated the docs to make this explicit.

As part of the same paragraph, the language reference also currently
states:


    [7 lines not shown]
DeltaFile
+5-4llvm/docs/LangRef.rst
+5-41 files

LLVM/project b960ef3llvm/lib/Target/AArch64 AArch64ExpandPseudoInsts.cpp

[AArch64] Stop using TargetFlags as RegState for LOADgot (#177411)

The register state flags have been represented using `unsigned`, but we
intend to make this an `enum class` in llvm/llvm-project#177090.

That change has shown there is some strange behaviour in this AArch64
function, which uses operand TargetFlags (usually used for representing
some abstract form of relocation information to clarify global accesses,
also represented with `unsigned`) to initialise the register state flags
(used for representing how the register operand is used by an
instruction). These TargetFlags are always 0 in the tests, so remove the
variable and assignment.
DeltaFile
+1-2llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
+1-21 files

LLVM/project bf43c98llvm/lib/Transforms/Instrumentation MemorySanitizer.cpp

[msan][NFCI] Check number of operands in handleVectorComparePackedIntrinsic() (#177291)

handleVectorComparePackedIntrinsic() can currently handle x86 and Arm
NEON vector comparisons, but is a bit lax about checking the number of
operands. This patch parameterizes the handler to check for the correct
number of operands, and also that the 3rd operand in x86 vector
comparisons is an ImmArg.
DeltaFile
+22-4llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+22-41 files

LLVM/project c6358f5clang/lib/AST ASTContext.cpp, clang/lib/CodeGen CodeGenFunction.cpp CodeGenModule.cpp

clang-format
DeltaFile
+18-13clang/lib/CodeGen/CodeGenFunction.cpp
+16-13clang/lib/CodeGen/CodeGenModule.cpp
+7-7clang/lib/CodeGen/TargetBuiltins/PPC.cpp
+3-2clang/lib/CodeGen/CodeGenFunction.h
+4-1clang/lib/AST/ASTContext.cpp
+2-3clang/lib/CodeGen/Targets/PPC.cpp
+50-391 files not shown
+51-417 files

LLVM/project 1ab4d67clang/test/Sema attr-target.c

fix Sema/attr-target.c
DeltaFile
+5-7clang/test/Sema/attr-target.c
+5-71 files

LLVM/project f9ed73bclang/lib/CodeGen CodeGenFunction.h, clang/lib/CodeGen/TargetBuiltins PPC.cpp

refactor EmitPPCBuiltinCpu
DeltaFile
+35-27clang/lib/CodeGen/TargetBuiltins/PPC.cpp
+1-0clang/lib/CodeGen/CodeGenFunction.h
+36-272 files

LLVM/project 6ec855bclang/lib/Basic/Targets PPC.cpp PPC.h, clang/lib/CodeGen CodeGenFunction.cpp CodeGenModule.cpp

clang codegen for target_clones
DeltaFile
+68-2clang/lib/CodeGen/CodeGenFunction.cpp
+56-0clang/lib/Sema/SemaPPC.cpp
+47-0clang/lib/CodeGen/Targets/PPC.cpp
+36-0clang/lib/Basic/Targets/PPC.cpp
+6-4clang/lib/CodeGen/CodeGenModule.cpp
+4-0clang/lib/Basic/Targets/PPC.h
+217-65 files not shown
+231-711 files

LLVM/project de08e99clang/lib/Basic/Targets PPC.cpp

fix PPCTargetInfo::parseTargetAttr
DeltaFile
+14-12clang/lib/Basic/Targets/PPC.cpp
+14-121 files

LLVM/project ae54a32clang/lib/CodeGen CodeGenModule.cpp

ignore target_clones on a declaration and internalize the resolver and the clones
DeltaFile
+34-6clang/lib/CodeGen/CodeGenModule.cpp
+34-61 files

LLVM/project ef7ca95clang/test/CodeGenCXX externc-ifunc-resolver.cpp

enable more tests on AIX
DeltaFile
+1-0clang/test/CodeGenCXX/externc-ifunc-resolver.cpp
+1-01 files

LLVM/project 66e4473clang/include/clang/Basic AttrDocs.td

add ifunc documentation
DeltaFile
+7-0clang/include/clang/Basic/AttrDocs.td
+7-01 files

LLVM/project 2a103c1llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_long_composites long-spec-const-composite.ll

Rebase and add new tests

Created using spr 1.3.6-beta.1
DeltaFile
+241,310-0llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+95,651-0llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+42,349-42,348llvm/test/MC/AMDGPU/gfx8_asm_vop3.s
+41,419-41,418llvm/test/MC/AMDGPU/gfx7_asm_vop3.s
+36,428-36,427llvm/test/MC/AMDGPU/gfx9_asm_vop3.s
+65,599-0llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_long_composites/long-spec-const-composite.ll
+522,756-120,19391,427 files not shown
+13,477,857-5,204,35691,433 files

LLVM/project 37bc1dbllvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_long_composites long-spec-const-composite.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.6-beta.1

[skip ci]
DeltaFile
+241,310-0llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+95,651-0llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+42,349-42,348llvm/test/MC/AMDGPU/gfx8_asm_vop3.s
+41,419-41,418llvm/test/MC/AMDGPU/gfx7_asm_vop3.s
+36,428-36,427llvm/test/MC/AMDGPU/gfx9_asm_vop3.s
+65,599-0llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_long_composites/long-spec-const-composite.ll
+522,756-120,19391,426 files not shown
+13,476,950-5,204,15991,432 files

LLVM/project c961174clang-tools-extra/clangd FindSymbols.cpp SemanticHighlighting.cpp, clang-tools-extra/clangd/test symbol-tags.test

[clangd] Add support for additional symbol tags proposed for LSP 3.18 (#167536)

Implements support for symbol tags proposed for LSP 3.18 in
https://github.com/microsoft/language-server-protocol/pull/2003,
in the `documentSymbols` and `workspace/symbols` requests.

Fixes https://github.com/clangd/clangd/issues/2123.

---------

Co-authored-by: chouzz <zhouhua258 at outlook.com>
Co-authored-by: Dimitri Ratz <dimitri.ratz at thinkdigital.cc>
DeltaFile
+200-1clang-tools-extra/clangd/FindSymbols.cpp
+41-134clang-tools-extra/clangd/SemanticHighlighting.cpp
+85-0clang-tools-extra/clangd/test/symbol-tags.test
+69-0clang-tools-extra/clangd/unittests/FindSymbolsTests.cpp
+44-12clang-tools-extra/clangd/Protocol.h
+22-0clang-tools-extra/clangd/FindSymbols.h
+461-1472 files not shown
+472-1498 files

LLVM/project 700b5f1llvm/test/CodeGen/AArch64 round-fptosi-sat-scalar.ll round-fptoui-sat-scalar.ll

[AArch64] Add test coverage for roundeven + float-to-int conversions (#173515)

Split off from https://github.com/llvm/llvm-project/pull/170018, which
was becoming a bit of a rats' nest.

This PR:
- Cleans up the `arm64-cvt-simd-fptoi.ll`, `round-conv.ll`,
`round-fptosi-sat-scalar.ll`, and `round-fptoui-sat-scalar.ll`
regression tests, removing `nounwind readnone` annotations from the
rounding function calls. These were changed in #171288 to be LLVM
intrinsics instead of libcalls, so we no longer need to annotate them in
order for them to be compiled to native instructions. I've also removed
the declaration blocks at the end of the files, since they're no longer
necessary.

- Adds `roundeven` tests to the 4 regression tests mentioned above, to
go along with the other rounding functions currently tested.

- Changes `round-conv.ll` to have autogenerated CHECK lines/assertions,

    [8 lines not shown]
DeltaFile
+909-116llvm/test/CodeGen/AArch64/round-fptosi-sat-scalar.ll
+833-106llvm/test/CodeGen/AArch64/round-fptoui-sat-scalar.ll
+388-16llvm/test/CodeGen/AArch64/arm64-cvt-simd-fptoi.ll
+265-135llvm/test/CodeGen/AArch64/round-conv.ll
+2,395-3734 files

LLVM/project e028b21llvm/test/CodeGen/AArch64 arm64-vcvt-fptoi.ll

[AArch64] Add tests for vector rounding + float-to-int conversions (#173516)

Right now we only have tests for the scalar versions of these
intrinsics.
DeltaFile
+2,462-0llvm/test/CodeGen/AArch64/arm64-vcvt-fptoi.ll
+2,462-01 files

LLVM/project af0964f.github/workflows prune-unused-branches.py

fix

Created using spr 1.3.7
DeltaFile
+1-1.github/workflows/prune-unused-branches.py
+1-11 files

LLVM/project 1ec48dbllvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.960bit.ll

rebase

Created using spr 1.3.7
DeltaFile
+47,697-51,378llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+14,474-16,242llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+16,328-12,881llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+13,036-14,705llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+11,668-13,311llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.832bit.ll
+10,558-11,908llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.768bit.ll
+113,761-120,425986 files not shown
+263,133-237,200992 files

LLVM/project 11f64e9llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeHelper.cpp

[AMDGPU] Silence a warning (NFC)

llvm-project/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp:686:7:
 error: unused variable 'DstTy' [-Werror,-Wunused-variable]
  LLT DstTy = MRI.getType(Dst);
      ^
1 error generated.
DeltaFile
+1-2llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp
+1-21 files

LLVM/project 8a94708clang/lib/Sema SemaDeclAttr.cpp, clang/test/PlatformSpecific/xrOS/Sema infer-ios-availability.c infer-unavailable-from-missing-ios-availability-mapping.c

Infer visionOS availability from iOS availability (#176990)

Automatically infer and apply availability or unavailable attributes for
visionOS based on the corresponding iOS availability of the same
declaration using the version mapping information provided in
SDKSettings.json.

rdar://162148639
DeltaFile
+117-0clang/test/PlatformSpecific/xrOS/Sema/infer-ios-availability.c
+93-0clang/lib/Sema/SemaDeclAttr.cpp
+21-0clang/test/PlatformSpecific/xrOS/Sema/Inputs/XROS.sdk/SDKSettings.json
+12-0clang/test/PlatformSpecific/xrOS/Sema/infer-unavailable-from-missing-ios-availability-mapping.c
+243-04 files

LLVM/project 33c301eclang-tools-extra/clang-tidy/llvm UseRangesCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Add replace_ to llvm-use-ranges (#177457)

Also sort the list of known algorithm wrappers.
DeltaFile
+32-17clang-tools-extra/clang-tidy/llvm/UseRangesCheck.cpp
+20-4clang-tools-extra/test/clang-tidy/checkers/llvm/use-ranges.cpp
+9-5clang-tools-extra/docs/clang-tidy/checks/llvm/use-ranges.rst
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+65-264 files

LLVM/project c0227b6llvm/lib/Target/RISCV RISCVInstrInfoY.td, llvm/lib/Target/RISCV/AsmParser RISCVAsmParser.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.8-beta.1

[skip ci]
DeltaFile
+229-0llvm/test/MC/RISCV/rvy/rvy-valid-mode-independent.s
+172-0llvm/lib/Target/RISCV/RISCVInstrInfoY.td
+55-0llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+49-0llvm/test/MC/RISCV/rvy/rvy-invalid-mode-independent.s
+29-0llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
+23-0llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
+557-07 files not shown
+572-013 files

LLVM/project e3e34a5llvm/lib/Target/RISCV RISCVInstrInfoY.td RISCVFeatures.td, llvm/lib/Target/RISCV/AsmParser RISCVAsmParser.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.8-beta.1
DeltaFile
+239-0llvm/test/MC/RISCV/rvy/rvy-valid-mode-independent.s
+192-0llvm/lib/Target/RISCV/RISCVInstrInfoY.td
+55-0llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+49-0llvm/test/MC/RISCV/rvy/rvy-invalid-mode-independent.s
+44-0llvm/test/MC/RISCV/rvy/rvy-valid-zyhybrid.s
+28-1llvm/lib/Target/RISCV/RISCVFeatures.td
+607-18 files not shown
+682-814 files

LLVM/project 705a940llvm/lib/Target/RISCV RISCVFeatures.td, llvm/test/CodeGen/RISCV attributes.ll features-info.ll

rebase after cap-mode removal

Created using spr 1.3.8-beta.1
DeltaFile
+5-18llvm/test/MC/RISCV/rvy/rvy-valid-mode-independent.s
+0-15llvm/lib/Target/RISCV/RISCVFeatures.td
+2-0llvm/test/CodeGen/RISCV/attributes.ll
+0-1llvm/test/CodeGen/RISCV/features-info.ll
+7-344 files

LLVM/project 078bc61llvm/lib/Target/RISCV RISCVFeatures.td, llvm/test/CodeGen/RISCV attributes.ll features-info.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.8-beta.1

[skip ci]
DeltaFile
+0-15llvm/lib/Target/RISCV/RISCVFeatures.td
+2-0llvm/test/CodeGen/RISCV/attributes.ll
+0-1llvm/test/CodeGen/RISCV/features-info.ll
+2-163 files

LLVM/project b038b0allvm/lib/Target/AMDGPU R600Processors.td AMDGPUSubtarget.h

[NFCI][AMDGPU] Add `FeatureMadMacF32Insts` to all R600 processors

In this way, we don't need to use a custom getter in `hasMadMacF32Insts`.
DeltaFile
+10-4llvm/lib/Target/AMDGPU/R600Processors.td
+1-10llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
+11-142 files

LLVM/project 6f69979llvm/test/CodeGen/RISCV attributes.ll

update one more test

Created using spr 1.3.8-beta.1
DeltaFile
+2-0llvm/test/CodeGen/RISCV/attributes.ll
+2-01 files