SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [lldb/DWARF] Add a utility function for (forceful) completion of types (details)
  2. [NFC] Adding the align attribute on Atomic{CmpXchg|RMW}Inst (details)
  3. Hand Allocator and IdentifierTable into FormatTokenLexer. (details)
  4. [SVE][CodeGen] Legalisation of unpredicated load instructions (details)
  5. [llvm-readobj] - Allow dumping partially corrupted SHT_LLVM_CALL_GRAPH_PROFILE sections. (details)
  6. [llvm-readobj] - Refactor ELFDumper<ELFT>::getStaticSymbolName. (details)
  7. [SVE][CodeGen] Legalisation of unpredicated store instructions (details)
  8. [llvm-readobj] - Split the printHashSymbols. NFCI. (details)
  9. [llvm-readobj] - Refine the error reporting in LLVMStyle<ELFT>::printELFLinkerOptions. (details)
  10. [clang-tidy] Fix an unused-raii check crash on objective-c++. (details)
  11. [llvm-readobj] - Add prepending # to mips-got.test and mips-plt.test. NFC. (details)
  12. [lldb] Make TestIOHandlerResizeNoEditline pass with Python 2 (details)
  13. [LV] Vectorize without versioning-for-unit-stride under -Os/-Oz (details)
  14. [mlir][spirv] Introduce OwningSPIRVModuleRef for ownership (details)
  15. [mlir][VectorOps] Lower vector.outerproduct of int vectors (details)
  16. [clangd] Store index in '.cache/clangd/index' instead of '.clangd/index' (details)
  17. [llvm-readobj] - Don't abort when dumping dynamic relocations when an object has both REL and RELA. (details)
  18. [llvm-readobj] - Fix indentation in broken-dynamic-reloc.test. NFC. (details)
  19. [NFC] Use hasAnyName matcher in place of anyOf(hasName()...) (details)
  20. [llvm-readobj] - Refactor the MipsGOTParser<ELFT> to stop using report_fatal_error(). (details)
  21. [OpenMP][NFC] Remove hard-coded line numbers from more tests (details)
  22. [X86] Fix a bug that when lowering byval argument (details)
  23. [Scalarizer] When gathering scattered scalar, don't replace it with itself (details)
  24. [lldb/test] Fix lldbutil.run_to_***_breakpoint for shared libraries (details)
  25. [DEBUGINFO]Add dwarf versions to the test, NFC. (details)
  26. [OpenMP] Use primary context in CUDA plugin (details)
  27. [ASTImporter] Corrected import of repeated friend declarations. (details)
  28. [flang] Add lowering of I/O statements. (details)
  29. [Bitfields][NFC] Make sure bitfields are contiguous (details)
  30. [CodeMoverUtils] Make specific analysis dependent checks optional (details)
  31. [lldb/Utility] Fix float->integral conversions in Scalar APInt getters (details)
  32. [ASTMatchers] Added hasDirectBase Matcher (details)
  33. [Clang] Handle AIX Include management in the driver (details)
  34. Combine multiple defs of arm64 register sets (details)
  35. Revert "Create the framework and testing environment for MLIR Reduce - a tool" (details)
  36. [x86] add test for buildvector lowering miscompile (PR46586); NFC (details)
  37. [HIP] Use default triple in llvm-mc for system ld (details)
  38. [ELF] Ignore --no-relax for RISC-V (details)
  39. [NativeSession] Add column numbers to NativeLineNumber. (details)
  40. [x86] fix miscompile in buildvector v16i8 lowering (details)
  41. [GlobalOpt] Don't remove inalloca from musttail-called functions (details)
  42. [lldb] Fix unaligned load in DataExtractor (details)
  43. Disable interception of sigaltstack on i386 macOS. (details)
  44. Revert "Temporarily disable the following failing tests on Darwin:" (details)
  45. orrectly generate invert xor value for Binary Atomics of int size > 64 (details)
  46. [PowerPC] Implement Vector Replace Builtins in LLVM (details)
  47. [SemaObjC] Add a warning for @selector expressions that potentially refer to objc_direct methods (details)
  48. [SemaObjC] Fix a -Wobjc-signed-char-bool false-positive with binary conditional operator (details)
  49. Expand the LLVM Developer Policy to include new sections on adding (details)
  50. Warn pointer captured in async block (details)
  51. [X86][AVX] Add AVX2 tests to extractelement-load.ll (details)
  52. [X86][AVX] Add test case showing incorrect extraction from VBROADCAST_LOAD on AVX2 targets (details)
  53. [mlir] Convert function signatures before converting globals (details)
  54. [NewPM][LoopFusion] Rename loop-fuse -> loop-fusion (details)
  55. [mlir] Support unranked types in func signature conversion in BufferPlacement. (details)
  56. [BasicAA] Remove -basicaa alias (details)
  57. [WebAssembly] Avoid scalarizing vector shifts in more cases (details)
  58. [gn build] Port dfa0db79d0e (details)
  59. Speculatively fix the sphinx build. (details)
  60. [SystemZ ABI] Allow class types in GetSingleElementType (details)
  61. [x86][lvi][seses] Use SESES at O0 for LVI mitigation (details)
  62. [X86][AVX] Don't fold PEXTR(VBROADCAST_LOAD(X)) -> LOAD(X). (details)
  63. [SCCP] Handle assume predicates (details)
  64. [lldb/Core] Fix crash in ValueObject::CreateChildAtIndex (details)
  65. Clang crashed while checking for deletion of copy and move ctors (details)
  66. LIS: fix handleMove to properly extend main range (details)
  67. [llvm] [docs] Do not require recommonmark for manpage build (details)
  68. [SCCP] Use range metadata for loads and calls (details)
  69. [flang] Make 'num_images()' intrinsic (details)
  70. [flang] Added missing runtime I/O definitions (details)
  71. [mlir] [VectorOps] [integration-test] Add i64 typed outer product (details)
Commit 2cdf108d329bda280948ad634aa0a070337a5f88 by pavel
[lldb/DWARF] Add a utility function for (forceful) completion of types

Summary:
Unify the code for requiring a complete type and move it into a single
place. The only functional change is that the "cannot start a definition
of an incomplete type" is upgrated from a runtime error/warning to an
lldbassert. An plain assert might also be fine, since (AFAICT) this can
only happen in case of a programmer error.

Reviewers: teemperor, aprantl, shafik

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D83199
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
Commit 74c723757e69fbe7d85e42527d07b728113699ae by gchatelet
[NFC] Adding the align attribute on Atomic{CmpXchg|RMW}Inst

This is the first step to add support for the align attribute to AtomicRMWInst and AtomicCmpXchgInst.
Next step is to add support in IRBuilder and BitcodeReader.
Bug: https://bugs.llvm.org/show_bug.cgi?id=27168

Differential Revision: https://reviews.llvm.org/D83136
The file was modifiedllvm/include/llvm/IR/Instructions.h
The file was modifiedllvm/lib/AsmParser/LLParser.cpp
The file was modifiedllvm/unittests/Analysis/AliasAnalysisTest.cpp
The file was modifiedllvm/lib/IR/Instructions.cpp
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeReader.cpp
The file was modifiedllvm/include/llvm/IR/IRBuilder.h
Commit 8c2a613976075368a1f6e3ac3c9c8b1927b465ec by klimek
Hand Allocator and IdentifierTable into FormatTokenLexer.

This allows us to share the allocator in the future so we can create tokens while parsing.

Differential Revision: https://reviews.llvm.org/D83218
The file was modifiedclang/lib/Format/FormatTokenLexer.cpp
The file was modifiedclang/lib/Format/FormatTokenLexer.h
The file was modifiedclang/lib/Format/TokenAnalyzer.cpp
Commit 5e8084beba20f27ce14536168087e5c6971e292d by kerry.mclaughlin
[SVE][CodeGen] Legalisation of unpredicated load instructions

Summary:
When splitting a load of a scalable type, the new address is
calculated in SplitVecRes_LOAD using a vscale and an add instruction.

This patch also adds a DAG combiner fold to visitADD for vscale:
- Fold (add (vscale(C0)), (vscale(C1))) to (add (vscale(C0 + C1)))

Reviewers: sdesmalen, efriedma, david-arm

Reviewed By: david-arm

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82792
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
The file was addedllvm/test/CodeGen/AArch64/sve-split-load.ll
The file was modifiedllvm/include/llvm/CodeGen/SelectionDAG.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit 2d9bd448c9f051de088b53592f89871e9b390fba by grimar
[llvm-readobj] - Allow dumping partially corrupted SHT_LLVM_CALL_GRAPH_PROFILE sections.

The code we have currently reports an error if something is not right with the
profile section. Instead we can report a warning and continue dumping when it is possible.
This patch does it.

Differential revision: https://reviews.llvm.org/D83129
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/test/tools/llvm-readobj/ELF/call-graph-profile.test
Commit 2953ac0975bc7e5dbe61fbd6538f02487efa62d2 by grimar
[llvm-readobj] - Refactor ELFDumper<ELFT>::getStaticSymbolName.

This is a followup for D83129.
It is possible to make `getStaticSymbolName` report warnings inside
and return the "<?>" on a error. This allows to encapsulate errors handling
and slightly simplifies the logic in callers code.

Differential revision: https://reviews.llvm.org/D83208
The file was modifiedllvm/test/tools/llvm-readobj/ELF/addrsig.test
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit cdf2eef613f7d6949e2929b316925c3553a8e3d0 by kerry.mclaughlin
[SVE][CodeGen] Legalisation of unpredicated store instructions

Summary:
When splitting a store of a scalable type, the new address is
calculated in SplitVecOp_STORE using a vscale and an add instruction.

Reviewers: sdesmalen, efriedma, david-arm

Reviewed By: david-arm

Subscribers: tschuett, hiraditya, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83041
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
The file was addedllvm/test/CodeGen/AArch64/sve-split-store.ll
Commit 8f0f7dbcea34e2e89fb0946067af3488c20c4532 by grimar
[llvm-readobj] - Split the printHashSymbols. NFCI.

This introduces `printHashTableSymbols` and
`printGNUHashTableSymbols` to split the `printHashSymbols`.

It makes the code more readable and consistent.

Differential revision: https://reviews.llvm.org/D83040
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit 0d656cb25dc760cdfe0adfdd7256651b7bd0bcab by grimar
[llvm-readobj] - Refine the error reporting in LLVMStyle<ELFT>::printELFLinkerOptions.

It is possible to:
1) Avoid using the `unwrapOrError` calls and hence allow to continue dumping even when
   something is not OK with one of SHT_LLVM_LINKER_OPTIONS sections.
2) replace `reportWarning` with `reportUniqueWarning` calls. In this method it is no-op,
   because it is not possible to have a duplicated warnings anyways, but since we probably
   want to switch to `reportUniqueWarning` globally, this is a good thing to do.

This patch addresses both these points.

Differential revision: https://reviews.llvm.org/D83131
The file was modifiedllvm/test/tools/llvm-readobj/ELF/linker-options.test
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit 3b1e3d22735b37eea3ce52d655009f5cd4ad2262 by hokein.wu
[clang-tidy] Fix an unused-raii check crash on objective-c++.

Differential Revision: https://reviews.llvm.org/D83293
The file was modifiedclang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp
The file was addedclang-tools-extra/test/clang-tidy/checkers/bugprone-unused-raii-crash.mm
Commit a256193afa4869ae749eaeec7548244772843da3 by grimar
[llvm-readobj] - Add prepending # to mips-got.test and mips-plt.test. NFC.

It was requested in D83225 review to do it separately.
The file was modifiedllvm/test/tools/llvm-readobj/ELF/mips-plt.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/mips-got.test
Commit de0175d04bc3679c7bd8dc64520e790bf38f30b0 by Raphael Isemann
[lldb] Make TestIOHandlerResizeNoEditline pass with Python 2

io.BytesIO seems to produce a stream in Python 2 which isn't recognized
as a file object in the SWIG API, so this test fails for Python 2 (and I assume
also an old SWIG version needs to be involved).

Instead just open an empty input file which is a file object in all Python
versions to make this test pass everywhere.
The file was addedlldb/test/API/iohandler/resize/input_file
The file was modifiedlldb/test/API/iohandler/resize/TestIOHandlerResizeNoEditline.py
Commit 7bf299c8d8d59304fb821f8811618cdeb1d1f1fd by ayal.zaks
[LV] Vectorize without versioning-for-unit-stride under -Os/-Oz

If a loop is in a function marked OptSize, Loop Access Analysis should refrain
from generating runtime checks for unit strides that will version the loop.

If a loop is in a function marked OptSize and its vectorization is enabled, it
should be vectorized w/o any versioning.

Fixes PR46228.

Differential Revision: https://reviews.llvm.org/D81345
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/optsize.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/optsize.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/tail_loop_folding.ll
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/runtime-check.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/pr39417-optsize-scevchecks.ll
The file was modifiedllvm/lib/Analysis/LoopAccessAnalysis.cpp
Commit b80508703fd7f88a7922c9c8f02c696be1db8034 by antiagainst
[mlir][spirv] Introduce OwningSPIRVModuleRef for ownership

Similar to OwningModuleRef, OwningSPIRVModuleRef signals ownership
transfer clearly. This is useful for APIs like spirv::deserialize,
where a spirv::ModuleOp is returned by deserializing SPIR-V binary
module.

This addresses the ASAN error as reported in
https://bugs.llvm.org/show_bug.cgi?id=46272

Differential Revision: https://reviews.llvm.org/D81652
The file was addedmlir/include/mlir/IR/OwningOpRefBase.h
The file was modifiedmlir/include/mlir/IR/Module.h
The file was modifiedmlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
The file was addedmlir/include/mlir/Dialect/SPIRV/SPIRVModule.h
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/Serialization.h
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp
Commit cca4ac523e183b33be3d4c7da68d45b697a081bd by benny.kra
[mlir][VectorOps] Lower vector.outerproduct of int vectors

vector.fma and mulf don't work on integers. Use a muli/addi pair or
plain muli instead.

Differential Revision: https://reviews.llvm.org/D83292
The file was modifiedmlir/lib/Dialect/Vector/VectorTransforms.cpp
The file was modifiedmlir/test/Dialect/Vector/vector-contract-transforms.mlir
Commit 9b55bc4d1197aedd76b0f4e04270265cb74cd0b8 by sam.mccall
[clangd] Store index in '.cache/clangd/index' instead of '.clangd/index'

Summary:
.clangd/index was well-intentioned in 2754942cbaef, but `.clangd` is the best
filename for the clangd config file (matching .clang-format and .clang-tidy).
And of course we can't have both .clangd/index and .clangd...

There are a few overlapping goals to satisfy:
- it should be clear from the directory name that this is transient
   data that is safe to delete at the cost of recomputation, i.e. a cache
- it should be easy and self-documenting to blacklist these files in .gitignore
- we should have some consistency between filenames in-tree and
   corresponding files in user storage (e.g. under XDG's ~/.cache/)
- we should be consistent across platforms (including windows, which
   doesn't have distinct cache vs config directories)

So the plan is:
  $PROJECT/.clangd                    (project config)
  $PROJECT/.cache/clangd/index/       (project index)
  $PROJECT/.cache/clangd/modules/     (maybe in future)
  $XDG_CONFIG_HOME/clangd/config.yaml (user config)
  $XDG_CACHE_HOME/clangd/index/       (index of non-project files)
  $XDG_CACHE_HOME/clangd/modules/     (maybe in future)
This is sensible if XDG_{CONFIG,CACHE}_HOME coincide, and has a simple
.gitignore rule going forward: `.cache/`.

The monorepo gitignore is updated to reflect the backwards-compatible practice:
  ignore .clangd/ (with trailing slash) matching index files from clangd 9/10
  ignore .cache matching index from clangd 11+, and potentially other tools.
The entries from llvm-project/llvm gitignore are removed (obsolete).

Reviewers: kadircet, hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, omtcyfz, arphaman, usaxena95, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D83099
The file was modifiedclang-tools-extra/clangd/test/background-index.test
The file was modifiedllvm/.gitignore
The file was modifiedclang-tools-extra/clangd/index/BackgroundIndexStorage.cpp
The file was modified.gitignore
The file was modifiedclang-tools-extra/clangd/index/Background.h
Commit 4a3c3d741a1711e0da618e4fdaee0b74dd2d6ace by grimar
[llvm-readobj] - Don't abort when dumping dynamic relocations when an object has both REL and RELA.

Currently, llvm-readobj calls `report_fatal_error` when an object has
both REL and RELA dynamic relocations.

llvm-readelf is able to handle this case properly. This patch adds such a test case
and adjusts the llvm-readobj code to follow (and be consistent with its own RELR and PLTREL cases).

Differential revision: https://reviews.llvm.org/D83232
The file was modifiedllvm/test/tools/llvm-readobj/ELF/broken-dynamic-reloc.test
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit f7522a5823d66303edfd8d872232dd6b07190f42 by grimar
[llvm-readobj] - Fix indentation in broken-dynamic-reloc.test. NFC.

Fix a broken indentation introduced my myself in rG4a3c3d741a17.
The file was modifiedllvm/test/tools/llvm-readobj/ELF/broken-dynamic-reloc.test
Commit 41bbb875e4da392ae37300d3a6282b6595f14503 by n.james93
[NFC] Use hasAnyName matcher in place of anyOf(hasName()...)
The file was modifiedclang-tools-extra/clang-tidy/bugprone/MisplacedPointerArithmeticInAllocCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/cert/CommandProcessorCheck.cpp
The file was modifiedclang-tools-extra/clang-move/Move.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/SpuriouslyWakeUpFunctionsCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/cert/DontModifyStdNamespaceCheck.cpp
Commit e7abed3d48ec40350006bc76ad5c6c1f64b1bfad by grimar
[llvm-readobj] - Refactor the MipsGOTParser<ELFT> to stop using report_fatal_error().

`MipsGOTParser` is a helper class that is used to dump MIPS GOT and PLT.
There is a problem with it: it might call report_fatal_error() on invalid input.
When this happens, the tool reports a crash:

```
# command stderr:
LLVM ERROR: Cannot find PLTGOT dynamic table tag.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backt
race.
Stack dump:
...
```

Such error were not tested. In this patch I've refactored `MipsGOTParser`:

I've splitted handling of GOT and PLT to separate methods. This allows to propagate
any possible errors to caller and should allow to dump the PLT when something is wrong
with the GOT and vise versa in the future.

I've added tests for each `report_fatal_error()`
and now calling the `reportError` instead. In the future we might want to switch to
reporting warnings, but it requres the additional testing and should
be performed independently.

I've kept `unwrapOrError` calls untouched for now as I'd like to focus on eliminating
`report_fatal_error` calls in this patch only.

Differential revision: https://reviews.llvm.org/D83225
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/test/tools/llvm-readobj/ELF/mips-got.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/mips-plt.test
Commit ed39becd274dae5537c24b2107737d718527e718 by jdenny.ornl
[OpenMP][NFC] Remove hard-coded line numbers from more tests

This is a continuation of D82224.

Reviewed By: grokos

Differential Revision: https://reviews.llvm.org/D83057
The file was modifiedclang/test/OpenMP/target_map_codegen.cpp
The file was modifiedclang/test/OpenMP/target_defaultmap_codegen.cpp
Commit ea85ff82c82687496453bc14c4ac60548a42d8f3 by chen3.liu
[X86] Fix a bug that when lowering byval argument

When an argument has 'byval' attribute and should be
passed on the stack according calling convention,
a stack copy would be emitted twice. This will cause
the real value will be put into stack where the pointer
should be passed.

Differential Revision: https://reviews.llvm.org/D83175
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.h
The file was modifiedllvm/test/CodeGen/X86/win64-byval.ll
Commit 16266e63963ad6ee27ad21983a9366ab313dfd03 by lebedev.ri
[Scalarizer] When gathering scattered scalar, don't replace it with itself

The (previously-crashing) test-case would cause us to seemingly-harmlessly
replace some use with something else, but we can't replace it with itself,
so we would crash.
The file was modifiedllvm/test/Transforms/Scalarizer/crash-bug.ll
The file was modifiedllvm/lib/Transforms/Scalar/Scalarizer.cpp
Commit 72ae70032ca3fa3e3bd9a3524bf245d5978c0467 by pavel
[lldb/test] Fix lldbutil.run_to_***_breakpoint for shared libraries

Even non-remote targets may need to set the launch environment
((DY)LD_LIBRARY_PATH, specifically) to run successfully.

Also, add an assertion to better detect the case when launching a target
fails and the breakpoint is never hit.
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbutil.py
Commit c9fb7f81715a321a00096e0463b0e8635204641e by a.bataev
[DEBUGINFO]Add dwarf versions to the test, NFC.
The file was modifiedllvm/test/DebugInfo/X86/packed_bitfields.ll
Commit c5348aecd7723e7aa7b18406d0c97724c0659f34 by tianshilei1992
[OpenMP] Use primary context in CUDA plugin

Summary:
Retaining per device primary context is preferred to creating a context owned by the plugin.

From CUDA documentation
1. Note that the use of multiple CUcontext s per device within a single process will substantially degrade performance and is strongly discouraged. Instead, it is highly recommended that the implicit one-to-one device-to-context mapping for the process provided by the CUDA Runtime API be used." from https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__DRIVER.html
2. Right under cuCtxCreate. In most cases it is recommended to use cuDevicePrimaryCtxRetain. https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf
3. The primary context is unique per device and shared with the CUDA runtime API. These functions allow integration with other libraries using CUDA.  https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__PRIMARY__CTX.html#group__CUDA__PRIMARY__CTX

Two issues are addressed by this patch:
1. Not using the primary context caused interoperability issue with libraries like cublas, cusolver. CUBLAS_STATUS_EXECUTION_FAILED and cudaErrorInvalidResourceHandle
2. On OLCF summit, "Error returned from cuCtxCreate" and "CUDA error is: invalid device ordinal"

Regarding the flags of the primary context. If it is inactive, we set CU_CTX_SCHED_BLOCKING_SYNC. If it is already active, we respect the current flags.

Reviewers: grokos, ABataev, jdoerfert, protze.joachim, AndreyChurbanov, Hahnfeld

Reviewed By: jdoerfert

Subscribers: openmp-commits, yaxunl, guansong, sstefan1, tianshilei1992

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D82718
The file was modifiedopenmp/libomptarget/plugins/cuda/src/rtl.cpp
Commit 85f5d1261c9a3f0abc4ae370005a1127174f2ce1 by 1.int32
[ASTImporter] Corrected import of repeated friend declarations.

Summary:
Import declarations in correct order if a class contains
multiple redundant friend (type or decl) declarations.
If the order is incorrect this could cause false structural
equivalences and wrong declaration chains after import.

Reviewers: a.sidorin, shafik, a_sidorin

Reviewed By: shafik

Subscribers: dkrupp, Szelethus, gamesh411, teemperor, martong, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D75740
The file was modifiedclang/unittests/AST/StructuralEquivalenceTest.cpp
The file was modifiedclang/lib/AST/ASTImporter.cpp
The file was modifiedclang/unittests/AST/ASTImporterTest.cpp
Commit 216a54a04b9b25fe6d1bcf7f516befd87bc0d976 by eschweitz
[flang] Add lowering of I/O statements.

The IO module is where I/O related statements are lowered to calls to the runtime library.

Differential revision: https://reviews.llvm.org/D83267
The file was modifiedflang/lib/Lower/CMakeLists.txt
The file was addedflang/include/flang/Lower/IO.h
The file was addedflang/lib/Lower/IO.cpp
Commit abdd367b200a0bf4176dbdaf200b23f750a35cb0 by gchatelet
[Bitfields][NFC] Make sure bitfields are contiguous

Differential Revision: https://reviews.llvm.org/D83202
The file was modifiedllvm/include/llvm/IR/InstrTypes.h
The file was modifiedllvm/include/llvm/ADT/Bitfields.h
The file was modifiedllvm/include/llvm/IR/Instructions.h
The file was modifiedllvm/unittests/ADT/BitFieldsTest.cpp
The file was modifiedllvm/include/llvm/IR/Instruction.h
Commit 082e3952300003ecf2eaa6bf346ae2e783b7a02e by rithiksh02
[CodeMoverUtils] Make specific analysis dependent checks optional

Summary: This patch makes code motion checks optional which are dependent on
specific analysis example, dominator tree, post dominator tree and dependence
info. The aim is to make the adoption of CodeMoverUtils easier for clients that
don't use analysis which were strictly required by CodeMoverUtils. This will
also help in diversifying code motion checks using other analysis example MSSA.
Authored By: RithikSharma
Reviewer: Whitney, bmahjour, etiotto
Reviewed By: Whitney
Subscribers: Prazek, hiraditya, george.burgess.iv, asbirlea, llvm-commits
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D82566
The file was modifiedllvm/include/llvm/Transforms/Utils/CodeMoverUtils.h
The file was modifiedllvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp
The file was modifiedllvm/lib/Transforms/Utils/CodeMoverUtils.cpp
The file was modifiedllvm/lib/Transforms/Scalar/LoopFuse.cpp
Commit 52495b98eecefcbaea2e30edec6816e43653d175 by pavel
[lldb/Utility] Fix float->integral conversions in Scalar APInt getters

These functions were doing a bitcast on the float value, which is not
consistent with the other getters, which were doing a numeric conversion
(47.0 -> 47). Change these to do numeric conversions too.
The file was modifiedlldb/source/Utility/Scalar.cpp
The file was modifiedlldb/unittests/Utility/ScalarTest.cpp
Commit b0d3ea171bd56b3b079be9213935925e1499df15 by n.james93
[ASTMatchers] Added hasDirectBase Matcher

Adds a matcher called `hasDirectBase` for matching the `CXXBaseSpecifier` of a class that directly derives from another class.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D81552
The file was modifiedclang/docs/LibASTMatchersReference.html
The file was modifiedclang/lib/ASTMatchers/Dynamic/Registry.cpp
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h
Commit 1a2f4824cb2d472649e65f845510ac0e47ca98c1 by daltenty
[Clang] Handle AIX Include management in the driver

Summary: Modify the AIX clang toolchain to include AIX dependencies in the search path

Reviewers: daltenty, stevewan, hubert.reinterpretcast

Reviewed By: daltenty, stevewan, hubert.reinterpretcast

Subscribers: ormris, hubert.reinterpretcast, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82677
The file was modifiedclang/lib/Frontend/InitHeaderSearch.cpp
The file was modifiedclang/lib/Driver/ToolChains/AIX.h
The file was modifiedclang/lib/Driver/ToolChains/AIX.cpp
The file was addedclang/test/Driver/aix-toolchain-include.cpp
Commit 7fa7b81bcbd040d036f9a4155486ccebc3c13be7 by omair.javaid
Combine multiple defs of arm64 register sets

Summary:
This patch aims to combine similar arm64 register set definitions defined in NativeRegisterContextLinux_arm64 and RegisterContextPOSIX_arm64.
I have implemented a register set interface out of RegisterInfoInterface class and moved arm64 register sets into RegisterInfosPOSIX_arm64 which is similar to Utility/RegisterContextLinux_* implemented by various other targets. This will help in managing register sets of new ARM64 architecture features in one place.

Built and tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabihf targets.

Reviewers: labath

Reviewed By: labath

Subscribers: mhorne, emaste, kristof.beyls, atanasyan, danielkiss, lldb-commits

Differential Revision: https://reviews.llvm.org/D80105
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp
The file was modifiedlldb/source/Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h
The file was modifiedlldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
The file was modifiedlldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h
The file was modifiedlldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.cpp
The file was addedlldb/source/Plugins/Process/Utility/RegisterInfoAndSetInterface.h
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
The file was modifiedlldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
The file was modifiedlldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
The file was modifiedlldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm64.h
The file was modifiedlldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
The file was modifiedlldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h
The file was modifiedlldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
Commit e10e034f4bb7d3c639cc65a8d60147ff1e330e56 by joker.eph
Revert "Create the framework and testing environment for MLIR Reduce - a tool"

This reverts commit 28a45d54a7fe722248233165fc7fdbd18d18d233.

Windows bot is broken with:

LLVM ERROR: Error running interestingness test: posix_spawn failed: Permission denied
The file was removedmlir/include/mlir/Reducer/Tester.h
The file was removedmlir/test/mlir-reduce/testcase-windows.mlir
The file was removedmlir/lib/Reducer/Tester.cpp
The file was removedmlir/test/mlir-reduce/testcase-linux.mlir
The file was modifiedmlir/test/CMakeLists.txt
The file was removedmlir/test/mlir-reduce/test.sh
The file was removedmlir/tools/mlir-reduce/CMakeLists.txt
The file was modifiedmlir/tools/CMakeLists.txt
The file was modifiedmlir/lib/CMakeLists.txt
The file was removedmlir/lib/Reducer/CMakeLists.txt
The file was removedmlir/test/mlir-reduce/test.bat
The file was removedmlir/tools/mlir-reduce/mlir-reduce.cpp
Commit 1c956a3eb934fffd719ab027829d616e762eca2d by spatel
[x86] add test for buildvector lowering miscompile (PR46586); NFC
The file was modifiedllvm/test/CodeGen/X86/buildvec-insertvec.ll
Commit c64bb3f7367a924e9d17dfccccc1c92897e6cbe1 by enye.shi
[HIP] Use default triple in llvm-mc for system ld

The Ubuntu system ld does not recognize the amdgcn-amd-amdhsa target.
Instead the host object with embedded device fat binary should not be
assembled by that triple. It should use default triple, so that the
object is compatible with system ld.

Reviewed By: yaxunl

Differential Revision: https://reviews.llvm.org/D83145
The file was modifiedclang/test/Driver/hip-toolchain-rdc-separate.hip
The file was modifiedclang/test/Driver/hip-toolchain-rdc.hip
The file was modifiedclang/test/Driver/hip-toolchain-rdc-static-lib.hip
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp
The file was modifiedclang/test/Driver/hip-link-save-temps.hip
Commit 09b81a72ac67c035f74ff369e6862d75cc4c4090 by maskray
[ELF] Ignore --no-relax for RISC-V

In GNU ld, --no-relax can disable x86-64 GOTPCRELX relaxation.
It is not useful, so we don't implement it.

For RISC-V, --no-relax disables linker relaxations which have larger
impact.
Linux kernel specifies --no-relax when CONFIG_DYNAMIC_FTRACE is specified
(since http://git.kernel.org/linus/a1d2a6b4cee858a2f27eebce731fbf1dfd72cb4e ).
LLD has not implemented the relaxations, so this option is a no-op.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D81359
The file was modifiedlld/ELF/Options.td
The file was modifiedlld/test/ELF/silent-ignore.test
The file was modifiedlld/docs/ld.lld.1
Commit 9ee90a490563a735ddaa739a34c2204c7494826f by akhuang
[NativeSession] Add column numbers to NativeLineNumber.

Summary:
This adds column numbers if they are present, and otherwise
sets the column number to be zero.

Bug: https://bugs.llvm.org/show_bug.cgi?id=41795

Reviewers: amccarth

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81950
The file was addedllvm/test/tools/llvm-symbolizer/pdb/pdb-native-columns.test
The file was modifiedllvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h
The file was addedllvm/test/tools/llvm-symbolizer/pdb/Inputs/test-columns.pdb
The file was modifiedllvm/include/llvm/DebugInfo/PDB/Native/NativeLineNumber.h
The file was modifiedllvm/lib/DebugInfo/PDB/Native/NativeLineNumber.cpp
The file was modifiedllvm/lib/DebugInfo/PDB/Native/SymbolCache.cpp
The file was addedllvm/test/tools/llvm-symbolizer/pdb/Inputs/test-columns.exe
The file was modifiedllvm/test/tools/llvm-symbolizer/pdb/Inputs/test.cpp
Commit 642eed37134db4aca953704d1e4ae856af675f51 by spatel
[x86] fix miscompile in buildvector v16i8 lowering

In the test based on PR46586:
https://bugs.llvm.org/show_bug.cgi?id=46586
...we are inserting 16-bits into the high element of the vector, shuffling it
to element 0, and extracting 32-bits. But xmm1 was never initialized, so the
top 16-bits of the extract are undef without this patch.

(It seems like we could do better than this by recognizing that we only demand
a subsection of the build vector, but I want to make sure we fix the
miscompile 1st.)

This path is only used for pre-SSE4.1, and simpler patterns get squashed
somewhere along the way, so the test still includes a 'urem' as it did in the
original test from the bug report.

Differential Revision: https://reviews.llvm.org/D83319
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/buildvec-insertvec.ll
Commit 7fc279ca3d414c0997998cb30d1adc2c63c837a5 by hans
[GlobalOpt] Don't remove inalloca from musttail-called functions

Otherwise the verifier complains about the mismatching function ABIs.

Differential revision: https://reviews.llvm.org/D83300
The file was modifiedllvm/test/Transforms/GlobalOpt/fastcc.ll
The file was modifiedllvm/lib/Transforms/IPO/GlobalOpt.cpp
Commit 5e9b16b67f5b9543e8d22b5b0f22cc0980c310bd by Jonas Devlieghere
[lldb] Fix unaligned load in DataExtractor

Somehow UBSan would only report the unaligned load in TestLinuxCore.py
when running the tests with reproducers. This patch fixes the issue by
using a memcpy in the GetDouble and the GetFloat method.

Differential revision: https://reviews.llvm.org/D83256
The file was modifiedlldb/include/lldb/Utility/DataExtractor.h
The file was modifiedlldb/source/Utility/DataExtractor.cpp
The file was modifiedlldb/unittests/Utility/DataExtractorTest.cpp
Commit 888951aaca583bcce85b42ea6166416db8f96fe0 by Dan Liew
Disable interception of sigaltstack on i386 macOS.

Summary:
28c91219c7e introduced an interceptor for `sigaltstack`. It turns out this
broke `setjmp` on i386 macOS. This is because the implementation of `setjmp` on
i386 macOS is written in assembly and makes the assumption that the call to
`sigaltstack` does not clobber any registers.  Presumably that assumption was
made because it's a system call.  In particular `setjmp`  assumes that before
and after the call that `%ecx` will contain a pointer the `jmp_buf`. The
current interceptor breaks this assumption because it's written in C++ and
`%ecx` is not a callee-saved register. This could be fixed by writing a
trampoline interceptor to the existing interceptor in assembly that
ensures all the registers are preserved. However, this is a lot of work
for very little gain. Instead this patch just disables the interceptor
on i386 macOS.

For other Darwin architectures it currently appears to be safe to intercept
`sigaltstack` using the current implementation because:

* `setjmp` for x86_64 saves the pointer `jmp_buf` to the stack before calling `sigaltstack`.
* `setjmp` for armv7/arm64/arm64_32/arm64e appears to not call `sigaltstack` at all.

This patch should unbreak (once they are re-enabled) the following
tests:

```
AddressSanitizer-Unit :: ./Asan-i386-calls-Test/AddressSanitizer.LongJmpTest
AddressSanitizer-Unit :: ./Asan-i386-calls-Test/AddressSanitizer.SigLongJmpTest
AddressSanitizer-Unit :: ./Asan-i386-inline-Test/AddressSanitizer.LongJmpTest
AddressSanitizer-Unit :: ./Asan-i386-inline-Test/AddressSanitizer.SigLongJmpTest
AddressSanitizer-i386-darwin :: TestCases/longjmp.cpp
```

This patch introduces a `SANITIZER_I386` macro for convenience.

rdar://problem/62141412

Reviewers: kubamracek, yln, eugenis

Subscribers: kristof.beyls, #sanitizers, llvm-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D82691
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
Commit 8a8d6e2b727112fafc52477acaf25affb62b6e65 by Dan Liew
Revert "Temporarily disable the following failing tests on Darwin:"

This reverts commit f3a089506fdcc4a1d658697009572c93e00c4373.

888951aaca583bcce85b42ea6166416db8f96fe0 introduced a fix that
should make the disabled tests work again.

rdar://problem/62141412
The file was modifiedcompiler-rt/lib/asan/tests/asan_test.cpp
Commit 6cf0dac1ca3fd56c51f6a60f0be01cc25a1a2c6a by jennifer.yu
orrectly generate invert xor value for Binary Atomics of int size > 64

When using __sync_nand_and_fetch with __int128, a problem is found that
the wrong value for the 'invert' value gets emitted to the xor in case
where the int size is greater than 64 bits.

This is because uses of llvm::ConstantInt::get which zero extends the
greater than 64 bits, so instead -1 that we require, it end up
getting 18446744073709551615

This patch replaces the call to llvm::ConstantInt::get with the call
to llvm::Constant::getAllOnesValue which works for all integer types.

Reviewers: jfp, erichkeane, rjmccall, hfinkel

Differential Revision: https://reviews.llvm.org/D82832
The file was modifiedclang/test/CodeGen/Atomics.c
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
Commit 62ba48b45f6525a3e453b54a6e5562d2f3dc7324 by lei
[PowerPC] Implement Vector Replace Builtins in LLVM

Provide the LLVM intrinsics needed to implement vector replace element
builtins in altivec.h which will be added in a subsequent patch.

Differential Revision: https://reviews.llvm.org/D83308
The file was modifiedllvm/include/llvm/IR/IntrinsicsPowerPC.td
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrPrefix.td
The file was modifiedllvm/test/CodeGen/PowerPC/builtins-ppc-p10permute.ll
Commit 7437a9496528b838e6939dbcbb69a0acb5e1332d by erik.pilkington
[SemaObjC] Add a warning for @selector expressions that potentially refer to objc_direct methods

By default, only warn when the selector matches a direct method in the current
class. This commit also adds a more strict off-by-default warning when there
isn't a non-direct method in the current class.

rdar://64621668

Differential revision: https://reviews.llvm.org/D82611
The file was modifiedclang/lib/Sema/SemaExprObjC.cpp
The file was addedclang/test/SemaObjC/potentially-direct-selector.m
The file was modifiedclang/include/clang/Basic/DiagnosticGroups.td
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
Commit 2f71cf6d77c5cc679968851080d0513d84ddccb6 by erik.pilkington
[SemaObjC] Fix a -Wobjc-signed-char-bool false-positive with binary conditional operator

We were previously bypassing the conditional expression special case for binary
conditional expressions.

rdar://64134411

Differential revision: https://reviews.llvm.org/D81751
The file was modifiedclang/test/SemaObjC/signed-char-bool-conversion.m
The file was modifiedclang/lib/Sema/SemaChecking.cpp
Commit 79b30af0ec53de7c7e3378465124ff1026a77f75 by clattner
Expand the LLVM Developer Policy to include new sections on adding
a project to the LLVM Monorepo, and a second about the LLVM
Incubator projects.

Differential Revision: https://reviews.llvm.org/D83182
The file was modifiedllvm/docs/DeveloperPolicy.rst
Commit dfa0db79d0e37d5cf24a63d1e2b7ba5f40617574 by aaron
Warn pointer captured in async block

The block arguments in dispatch_async() and dispatch_after() are
guaranteed to escape. If those blocks capture any pointers with the
noescape attribute then it is an error.
The file was modifiedclang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
The file was addedclang-tools-extra/clang-tidy/bugprone/NoEscapeCheck.h
The file was modifiedclang-tools-extra/docs/ReleaseNotes.rst
The file was modifiedclang-tools-extra/docs/clang-tidy/checks/list.rst
The file was addedclang-tools-extra/docs/clang-tidy/checks/bugprone-no-escape.rst
The file was addedclang-tools-extra/clang-tidy/bugprone/NoEscapeCheck.cpp
The file was addedclang-tools-extra/test/clang-tidy/checkers/bugprone-no-escape.m
Commit 3030e6b94b21f4d37ada6bef7cde6920415409d8 by llvm-dev
[X86][AVX] Add AVX2 tests to extractelement-load.ll
The file was modifiedllvm/test/CodeGen/X86/extractelement-load.ll
Commit 6cff71e92e644adf5eab8cb411e5ac053746bbac by llvm-dev
[X86][AVX] Add test case showing incorrect extraction from VBROADCAST_LOAD on AVX2 targets

On AVX2 we tend to lower BUILD_VECTOR of constants as broadcasts if we can, in this case a <2 x i16> non-uniform constant has been lowered as a <4 x i32> broadcast.

The test case shows that the extraction folding code has incorrectly extracted the wrong part (lower WORD) of the resulting i32 memory source.

Found by internal fuzzing tests.
The file was modifiedllvm/test/CodeGen/X86/extractelement-load.ll
Commit a084b94f1198df600fff0632ad54fe6121e23943 by silvasean
[mlir] Convert function signatures before converting globals

Summary: This allows global initializers to reference functions.

Differential Revision: https://reviews.llvm.org/D83266
The file was modifiedmlir/test/Target/llvmir.mlir
The file was modifiedmlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
Commit 1143f09678f42352620d373939b0655e7a332268 by aeubanks
[NewPM][LoopFusion] Rename loop-fuse -> loop-fusion

The legacy pass name is "loop-fusion".

Fixes most tests under Transforms/LoopFusion under NPM.

Reviewed By: Whitney

Differential Revision: https://reviews.llvm.org/D83066
The file was modifiedllvm/lib/Passes/PassRegistry.def
Commit 1a2ed71a8a81a61e98a9f50fe5fa64b36e722632 by pifon
[mlir] Support unranked types in func signature conversion in BufferPlacement.

Currently, only ranked tensor args and results can be converted to memref types.

Differential Revision: https://reviews.llvm.org/D83324
The file was modifiedmlir/test/Transforms/buffer-placement-preparation.mlir
The file was modifiedmlir/lib/Transforms/BufferPlacement.cpp
The file was modifiedmlir/test/Transforms/buffer-placement-preparation-allowed-memref-results.mlir
Commit 83158cf95dd7fd9fa8a1eb515f16bf47856601ef by aeubanks
[BasicAA] Remove -basicaa alias

Follow up of https://reviews.llvm.org/D82607.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D83067
The file was modifiedllvm/include/llvm/IR/LegacyPassNameParser.h
The file was modifiedllvm/test/Analysis/BasicAA/empty.ll
Commit 0d7286a652371bca460357348f3b4828cd4ca214 by tlively
[WebAssembly] Avoid scalarizing vector shifts in more cases

Since WebAssembly's vector shift instructions take a scalar shift
amount rather than a vector shift amount, we have to check in ISel
that the vector shift amount is a splat. Previously, we were checking
explicitly for splat BUILD_VECTOR nodes, but this change uses the
standard utilities for detecting splat values that can handle more
complex splat patterns. Since the C++ ISel lowering is now more
general than the ISel patterns, this change also simplifies shift
lowering by using the C++ lowering for all SIMD shifts rather than
mixing C++ and normal pattern-based lowering.

This change improves ISel for shifts to the point that the
simd-shift-unroll.ll regression test no longer tests the code path it
was originally meant to test. The bug corresponding to that regression
test is no longer reproducible with its original reported reproducer,
so rather than try to fix the regression test, this change just
removes it.

Differential Revision: https://reviews.llvm.org/D83278
The file was removedllvm/test/CodeGen/WebAssembly/simd-shift-unroll.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was addedllvm/test/CodeGen/WebAssembly/simd-shift-complex-splats.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
Commit 907f15c5914187b2831977e10599bede6bbafe72 by llvmgnsyncbot
[gn build] Port dfa0db79d0e
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn
Commit aef04d3306bff492f69f50675f65c9c4eedfab57 by aaron
Speculatively fix the sphinx build.
The file was modifiedclang-tools-extra/docs/clang-tidy/checks/bugprone-no-escape.rst
Commit 80a1b95b8e72674cef7efb39636dc73c248ae6f3 by ulrich.weigand
[SystemZ ABI] Allow class types in GetSingleElementType

The SystemZ ABI specifies that aggregate types with just a single
member of floating-point type shall be passed as if they were just
a scalar of that type.  This applies to both struct and class types
(but not unions).

However, the current ABI support code in clang only checks this
case for struct types, which means that for class types, generated
code does not adhere to the platform ABI.

Fixed by accepting both struct and class types in the
SystemZABIInfo::GetSingleElementType routine.
The file was modifiedclang/lib/CodeGen/TargetInfo.cpp
The file was modifiedclang/test/CodeGen/systemz-abi.cpp
The file was modifiedclang/test/CodeGen/systemz-abi.c
Commit dfabffb195ee7c9f9db327f29feb781cbec53724 by zbrid
[x86][lvi][seses] Use SESES at O0 for LVI mitigation

Use SESES as the fallback at O0 where the optimized LVI pass isn't desired due
to its effect on build times at O0.

I updated the LVI tests since this changes the code gen for the tests touched in the parent revision.

This is a follow up to the comments I made here: https://reviews.llvm.org/D80964

Hopefully we can continue the discussion here.

Also updated SESES to handle LFENCE instructions properly instead of adding
redundant LFENCEs. In particular, 1) no longer add LFENCE if the current
instruction being processed is an LFENCE and 2) no longer add LFENCE if the
instruction right before the instruction being processed is an LFENCE

Reviewed By: sconstab

Differential Revision: https://reviews.llvm.org/D82037
The file was modifiedllvm/lib/Target/X86/X86TargetMachine.cpp
The file was modifiedllvm/lib/Target/X86/X86SpeculativeExecutionSideEffectSuppression.cpp
The file was modifiedllvm/test/CodeGen/X86/lvi-hardening-loads.ll
The file was modifiedllvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
The file was modifiedllvm/test/CodeGen/X86/O0-pipeline.ll
The file was modifiedllvm/lib/Target/X86/X86.h
Commit 931ec74f7a29f53e18b574dc9500012ecbeba23a by llvm-dev
[X86][AVX] Don't fold PEXTR(VBROADCAST_LOAD(X)) -> LOAD(X).

We were checking the VBROADCAST_LOAD element size against the extraction destination size instead of the extracted vector element size - PEXTRW/PEXTB have implicit zext'ing so have i32 destination sizes for v8i16/v16i8 vectors, resulting in us extracting from the wrong part of a load.

This patch bails from the fold if the vector element sizes don't match, and we now use the target constant extraction code later on like the pre-AVX2 targets, fixing the test case.

Found by internal fuzzing tests.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/extractelement-load.ll
Commit 9dfea0351797e1e10b6e28e290c134c179eba504 by nikita.ppv
[SCCP] Handle assume predicates

Take assume predicates into account when visiting ssa.copy. The
handling is the same as for branch predicates, with the difference
that we're always on the true edge.

Differential Revision: https://reviews.llvm.org/D83257
The file was addedllvm/test/Transforms/SCCP/assume.ll
The file was modifiedllvm/lib/Transforms/Scalar/SCCP.cpp
Commit 7177e63fb554cfac3c252327e344fb5a17d6bd65 by medismail.bennani
[lldb/Core] Fix crash in ValueObject::CreateChildAtIndex

The patch fixes a crash in ValueObject::CreateChildAtIndex caused by a
null pointer dereferencing. This is a corner case that is happening when
trying to dereference a variable with an incomplete type, and this same
variable doesn't have a synthetic value to get the child ValueObject.

If this happens, lldb will now return a null pointer that will results
in an error message.

rdar://65181171

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/source/Core/ValueObject.cpp
The file was removedlldb/test/API/functionalities/target_var/globals.c
The file was modifiedlldb/test/API/functionalities/target_var/TestTargetVar.py
The file was modifiedlldb/test/API/functionalities/target_var/Makefile
The file was removedlldb/test/API/functionalities/target_var/globals.ll
The file was addedlldb/test/API/functionalities/target_var/main.c
Commit a707da4728dea51c1446cf582a46fb271f3969c3 by vyng
Clang crashed while checking for deletion of copy and move ctors

    Crash:
       @     0x559d129463fc  clang::CXXRecordDecl::defaultedCopyConstructorIsDeleted()
        @     0x559d1288d3e5  clang::Sema::checkIllFormedTrivialABIStruct()::$_7::operator()()
        @     0x559d12884c34  clang::Sema::checkIllFormedTrivialABIStruct()
        @     0x559d1288412e  clang::Sema::CheckCompletedCXXClass()
        @     0x559d1288d843  clang::Sema::ActOnFinishCXXMemberSpecification()
        @     0x559d12020109  clang::Parser::ParseCXXMemberSpecification()
        @     0x559d1201e80c  clang::Parser::ParseClassSpecifier()
        @     0x559d1204e807  clang::Parser::ParseDeclarationSpecifiers()
        @     0x559d120e9aa9  clang::Parser::ParseSingleDeclarationAfterTemplate()
        @     0x559d120e8f21  clang::Parser::ParseTemplateDeclarationOrSpecialization()
        @     0x559d120e8886  clang::Parser::ParseDeclarationStartingWithTemplate()
        @     0x559d1204a1d4  clang::Parser::ParseDeclaration()
        @     0x559d12004b1d  clang::Parser::ParseExternalDeclaration()
        @     0x559d12017689  clang::Parser::ParseInnerNamespace()
        @     0x559d12017024  clang::Parser::ParseNamespace()
        @     0x559d1204a29b  clang::Parser::ParseDeclaration()
        @     0x559d12004c74  clang::Parser::ParseExternalDeclaration()

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D83263
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
The file was addedclang/test/SemaCXX/attr-trivial-abi.cpp
The file was modifiedclang/test/SemaObjCXX/attr-trivial-abi.mm
Commit 7c038726453b76d6f40590b22304c43ffa05aaf1 by Stanislav.Mekhanoshin
LIS: fix handleMove to properly extend main range

handleMoveDown or handleMoveUp cannot properly repair a main
range of a LiveInterval since they only get LiveRange. There
is a problem if certain use has moved few segments away and
there is a hole in the main range in between of these two
locations. We may get a SubRange with a very extended Segment
spanning several Segments of the main range and also spanning
that hole. If that happens then we end up with the main range
not covering its SubRange which is an error.

It might be possible to attempt fixing the main range in place
just between of the old and new index by extending all of its
Segments in between, but it is unclear this logic will be
faster than just straight constructMainRangeFromSubranges,
which itself is pretty cheap since it only contains interval
logic. That will also require shrinkToUses() call after which
is probably even more expensive.

In the test second move is from 64B to 92B for the sub1.
Subrange is correctly fixed:

L000000000000000C [16r,32B:0)[32B,92r:1)  0@16r 1@32B-phi

But the main range has a hole in between 80d and 88r after
updateRange():

%1 [16r,32B:0)[32B,80r:4)[80r,80d:3)[88r,96r:1)[96r,160B:2)

Since source position is 64B this segment is not even considered
by the updateRange().

Differential Revision: https://reviews.llvm.org/D82916
The file was modifiedllvm/unittests/MI/LiveIntervalTest.cpp
The file was modifiedllvm/lib/CodeGen/LiveIntervals.cpp
Commit 446e3df25483312c8a7dfb3c53eef0de0e13074a by mgorny
[llvm] [docs] Do not require recommonmark for manpage build

Do not enforce recommonmark dependency if sphinx is called to build
manpages.  In order to do this, try to import recommonmark first
and do not configure it if it's not available.  Additionally, declare
a custom tags for the selected builder via CMake, and ignore
recommonmark import failure when 'man' target is used.

This will permit us to avoid the problematic recommonmark dependency
for the majority of Gentoo users that do not need to locally build
the complete documentation but want to have tool manpages.

Differential Revision: https://reviews.llvm.org/D83161
The file was modifiedllvm/cmake/modules/AddSphinxTarget.cmake
The file was modifiedllvm/docs/conf.py
Commit 8691544a276744474ff04b71d7e220069435c7fe by nikita.ppv
[SCCP] Use range metadata for loads and calls

When all else fails, use range metadata to constrain the result
of loads and calls. It should also be possible to use !nonnull,
but that would require some general support for inequalities in
SCCP first.

Differential Revision: https://reviews.llvm.org/D83179
The file was modifiedllvm/lib/Transforms/Scalar/SCCP.cpp
The file was modifiedllvm/test/Transforms/SCCP/metadata.ll
Commit c6a23df691fbfb1330d1fef71a4ac8b453b62a87 by tkeith
[flang] Make 'num_images()' intrinsic

I added 'num_images()' to the list of functions that are evaluated as intrinsic. I also added a test file in flang/test/Semantics to test calls to 'num_images()'. There was a call to 'num_images()' in flang/test/Semantics/call10.f90 that expected an error, now it no longer produces an error. So I edited that file accordingly. I also edited the intrinsics unit test to add further testing of 'num_images()'.

Differential Revision: https://reviews.llvm.org/D83142
The file was modifiedflang/documentation/Intrinsics.md
The file was modifiedflang/lib/Evaluate/intrinsics.cpp
The file was addedflang/test/Semantics/num_images.f90
The file was modifiedflang/test/Semantics/call10.f90
The file was modifiedflang/unittests/Evaluate/intrinsics.cpp
Commit 4b9b64d561e952e64288cdec3bae1952269c1bcf by tkeith
[flang] Added missing runtime I/O definitions

Added runtime function definitions for 32-bit real I/O and 32-bit complex output

Differential Revision: https://reviews.llvm.org/D83112
The file was modifiedflang/runtime/io-api.cpp
Commit 6404fb428a2c6ad4da2b0d79825aa92453ad9bdb by ajcbik
[mlir] [VectorOps] [integration-test] Add i64 typed outer product

Yields proper SIMD vpmullq/vpaddq on x86.

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D83328
The file was addedmlir/integration_test/Dialect/Vector/CPU/test-outerproduct-i64.mlir
The file was removedmlir/integration_test/Dialect/Vector/CPU/test-outerproduct.mlir
The file was addedmlir/integration_test/Dialect/Vector/CPU/test-outerproduct-f32.mlir