SuccessChanges

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

Summary

  1. workaround for failing GPU (details)
  2. buildbot mlir-nvidia: fixed port configuration (details)
Commit d430f5f26fced2d215151c3743c7460fc8bca135 by kuhnel
workaround for failing GPU

Summary: Implemented workaround when GPU is not ready when deploying the container. It will wait for 30 secs and then restart the container. This should be enough for the GPU to be initialized.

Reviewers: PaulkaToast, tra

Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, Kayjukh, jurahul, msifontes

Differential Revision: https://reviews.llvm.org/D82163
The file was modifiedbuildbot/google/docker/buildbot-mlir-nvidia/run.sh
The file was modifiedbuildbot/google/docker/buildbot-mlir-nvidia/VERSION
Commit 682b1eae5b91d2dfd12b52606b97102e72a4c8cd by kuhnel
buildbot mlir-nvidia: fixed port configuration
The file was modifiedbuildbot/google/docker/buildbot-mlir-nvidia/Dockerfile
The file was modifiedbuildbot/google/docker/buildbot-mlir-nvidia/VERSION
The file was modifiedbuildbot/google/docker/buildbot-mlir-nvidia/run.sh

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

Summary

  1. [X86] Add an AVX check prefix to bitcast-vector-bool.ll to combine checks where AVX1/2/512 are all the same. NFC (details)
  2. [flang]Fix individual tests with lit when building out of tree (details)
  3. [Peeling] Extend the scope of peeling a bit (details)
  4. Return false if the identifier is not in the global module index. (details)
  5. [mlir] Add for loop specialization (details)
  6. [clang][Driver] Correct tool search path priority (details)
  7. [CSInfo][MIPS] Don't describe parameters loaded by sub/super reg copy (details)
  8. [Analyzer][StreamChecker] Add note tags for file opening. (details)
  9. [mlir] make the bitwidth of device side index computations configurable (details)
  10. Fixed ASTMatchers registry and regen ast docs (details)
  11. [DSE,MSSA] Remove unused arguments for isDSEBarrier (NFC). (details)
  12. [clang-tidy] Improved accuracy of check list updater script (details)
  13. [DebugInfo] Explicitly permit addr_size = 0x02 when parsing DWARF data (details)
  14. [MSP430] Enable some basic support for debug information (details)
  15. [LTO] Use StringRef instead of C-style strings in setCodeGenDebugOptions (details)
  16. [MSP430] Update register names (details)
  17. Make ninja smart console builds more pretty (details)
  18. Revert "[MSP430] Update register names" (details)
  19. [analyzer] Handle `\l` symbol in string literals in exploded-graph-rewriter (details)
  20. [StackSafety] Ignore unreachable instructions (details)
  21. [StackSafety] Check variable lifetime (details)
  22. Revert "[Peeling] Extend the scope of peeling a bit" (details)
  23. [ASTMatcher] Correct memoization bug ignoring direction (descendants or ancestors) (details)
  24. Revert "[CGP] Enable CodeGenPrepares phi type convertion." (details)
  25. [analyzer] Handle `\l` symbol in string literals in exploded-graph-rewriter (details)
  26. [mlir] Fix linalg.generic matmul example in the doc (details)
  27. OptimizationRemarkEmitter.h - reduce unnecessary Function.h include to forward declaration. NFC. (details)
  28. [DAG] SimplifyMultipleUseDemandedBits - drop unnecessary *_EXTEND_VECTOR_INREG cases (details)
  29. Attempt to unbreak the test introduced in 359fae6eb094 on Windows (details)
  30. [llvm-readobj] - Validate the DT_STRSZ value to avoid crash. (details)
  31. [AMDGPU] clang-format of SIModeRegister.cpp (details)
  32. [VectorCombine] improve IR debugging by providing/salvaging value names (details)
  33. Let HIP default include respect -nogpuinc and -nogpulib (details)
  34. [llvm-readelf] - Do not crash when dumping the dynamic symbol table when its sh_entzize == 0. (details)
  35. [AMDGPU] Update more live intervals in SIWholeQuadMode (details)
  36. [VectorCombine] add/use pass-level IRBuilder (details)
  37. [lldb][NFC] Add more test for builtin formats (details)
  38. Revert "[clang][Driver] Correct tool search path priority" (details)
  39. [DAG] Add SimplifyMultipleUseDemandedVectorElts helper for SimplifyMultipleUseDemandedBits. NFCI. (details)
  40. [DWARFYAML][debug_info] Use 'AbbrCode' to index the abbreviation. (details)
  41. [DWARFYAML][debug_info] Add support for error handling. (details)
  42. [openmp] Base of tablegen generated OpenMP common declaration (details)
  43. Revert commit 9e52530 because of dependencies issue (details)
  44. [VectorCombine] add helper to replace uses and rename (details)
  45. Implement constexpr BinaryOperator for vector types (details)
  46. [mlir][spirv] Enhance AccessChainOp index type handling (details)
Commit d3c79d195304d5694b47fec7e1e71cab47c2532a by craig.topper
[X86] Add an AVX check prefix to bitcast-vector-bool.ll to combine checks where AVX1/2/512 are all the same. NFC
The file was modifiedllvm/test/CodeGen/X86/bitcast-vector-bool.ll
Commit fa5d416efdcbdba766c0c9bd0797bd4b8bbe0273 by Osi.Request
[flang]Fix individual tests with lit when building out of tree

Summary:

Fix individual check tests with lit when building out-of-tree
`ninja check-flang-<folder>` was not working.
The CMakeLists.txt was looking for the lit tests in the source directory
instead of the build directory.

This commit extends @CarolineConcatto previous patch[D81002]

Reviewers: DavidTruby, sscalpone, tskeith, CarolineConcatto, jdoerfert

Reviewed By: DavidTruby

Subscribers: flang-commits, llvm-commits, CarolineConcatto

Tags: #flang, #llvm

Differential Revision: https://reviews.llvm.org/D82120
The file was modifiedflang/test/CMakeLists.txt
The file was modifiedflang/CMakeLists.txt
Commit 29b2c1ca72096ca06415b5e626e6728c42ef1e74 by serguei.katkov
[Peeling] Extend the scope of peeling a bit

Currently we allow peeling of the loops if there is a exiting latch block
and all other exits are blocks ending with deopt.

Actually we want that exit would end up with deopt unconditionally but
it is not required that exit itself ends with deopt.

Reviewers: reames, ashlykov, fhahn, apilipenko, fedor.sergeev
Reviewed By: apilipenko
Subscribers: hiraditya, zzheng, dantrushin, llvm-commits
Differential Revision: https://reviews.llvm.org/D81140
The file was modifiedllvm/lib/Transforms/Utils/LoopUnrollPeel.cpp
The file was addedllvm/test/Transforms/LoopUnroll/peel-loop-pgo-deopt-pd.ll
The file was modifiedllvm/lib/Transforms/Utils/LoopUtils.cpp
Commit 46ea465b5b741fb0bf6e2cedd5cd6bf7026cd3c6 by v.g.vassilev
Return false if the identifier is not in the global module index.

This allows clients to use the idiom:

if (GlobalIndex->lookupIdentifier(Name, FoundModules)) {
  // work on the FoundModules
}

This is also a minor performance improvent for clang.

Differential Revision: https://reviews.llvm.org/D81077
The file was modifiedclang/lib/Serialization/GlobalModuleIndex.cpp
Commit 4bcd08eb1c3bcd6ce580cc21b4e6d9f10286b9e6 by herhut
[mlir] Add for loop specialization

Summary:
We already had a parallel loop specialization pass that is used to
enable unrolling and consecutive vectorization by rewriting loops
whose bound is defined as a min of a constant and a dynamic value
into a loop with static bound (the constant) and the minimum as
bound, wrapped into a conditional to dispatch between the two.
This adds the same rewriting for for loops.

Differential Revision: https://reviews.llvm.org/D82189
The file was modifiedmlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
The file was addedmlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
The file was modifiedmlir/include/mlir/Dialect/SCF/Passes.td
The file was modifiedmlir/lib/Dialect/SCF/Transforms/ParallelLoopFusion.cpp
The file was removedmlir/lib/Dialect/SCF/Transforms/ParallelLoopSpecialization.cpp
The file was addedmlir/test/Dialect/SCF/for-loop-specialization.mlir
The file was modifiedmlir/include/mlir/Dialect/SCF/Passes.h
Commit 028571d60843cb87e2637ef69ee09090d4526c62 by david.spickett
[clang][Driver] Correct tool search path priority

Summary:
As seen in:
https://bugs.llvm.org/show_bug.cgi?id=45693

When clang looks for a tool it has a set of
possible names for it, in priority order.
Previously it would look for these names in
the program path. Then look for all the names
in the PATH.

This means that aarch64-none-elf-gcc on the PATH
would lose to gcc in the program path.
(which was /usr/bin in the bug's case)

This changes that logic to search each name in both
possible locations, then move to the next name.
Which is more what you would expect to happen when
using a non default triple.

(-B prefixes maybe should follow this logic too,
but are not changed in this patch)

Subscribers: kristof.beyls, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79988
The file was modifiedclang/test/lit.cfg.py
The file was addedclang/test/Driver/program-path-priority.c
The file was modifiedclang/lib/Driver/Driver.cpp
Commit 792786e34d8d881eb4d6b12275681a555cb9e245 by djordje.todorovic
[CSInfo][MIPS] Don't describe parameters loaded by sub/super reg copy

When describing parameter value loaded by a COPY instruction, consider
case where needed Reg value is a sub- or super- register of the COPY
instruction's destination register. Without this patch, compile process
will crash with the assertion "TargetInstrInfo::describeLoadedValue
can't describe super- or sub-regs for copy instructions".

Patch by Nikola Tesic

Differential revision: https://reviews.llvm.org/D82000
The file was modifiedllvm/lib/Target/Mips/MipsInstrInfo.cpp
The file was addedllvm/test/DebugInfo/MIR/Mips/dbg-call-site-copy-sub-reg.mir
Commit e935a540ea29d5de297595801aed1fb70fabfbf6 by 1.int32
[Analyzer][StreamChecker] Add note tags for file opening.

Summary:
Bug reports of resource leak are now improved.
If there are multiple resource leak paths for the same stream,
only one wil be reported.

Reviewers: Szelethus, xazax.hun, baloghadamsoftware, NoQ

Reviewed By: Szelethus, NoQ

Subscribers: NoQ, rnkovacs, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81407
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
The file was modifiedclang/test/Analysis/stream.cpp
The file was addedclang/test/Analysis/stream-note.c
The file was modifiedclang/test/Analysis/stream.c
Commit d10b1a38a7dfb994623f27f263b67f5fc76e08cc by zinenko
[mlir] make the bitwidth of device side index computations configurable

The patch makes the index type lowering of the GPU to NVVM/ROCDL
conversion configurable. It introduces a pass option that controls the
bitwidth used when lowering index computations.

Differential Revision: https://reviews.llvm.org/D80285
The file was modifiedmlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
The file was modifiedmlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
The file was modifiedmlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was modifiedmlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
The file was modifiedmlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h
The file was modifiedmlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
Commit c2b22c57fc1394f2566d20369ae29877eb7df1a1 by n.james93
Fixed ASTMatchers registry and regen ast docs
The file was modifiedclang/lib/ASTMatchers/Dynamic/Registry.cpp
The file was modifiedclang/docs/LibASTMatchersReference.html
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h
Commit 0e19ff02d801df894873ddaacae783b6651e9006 by flo
[DSE,MSSA] Remove unused arguments for isDSEBarrier (NFC).
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Commit 23063296b539feb405fb3ce61711a3c1cc1c94d0 by n.james93
[clang-tidy] Improved accuracy of check list updater script

- Added `FixItHint` comments to Check files for the script to mark those checks as offering fix-its when the fix-its are generated in another file.
- Case insensitive file searching when looking for the file a checker code resides in.

Also regenerated the list, sphinx had no issue generating the docs after this.

Reviewed By: sylvestre.ledru

Differential Revision: https://reviews.llvm.org/D81932
The file was modifiedclang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/MakeSharedCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/add_new_check.py
The file was modifiedclang-tools-extra/docs/clang-tidy/checks/list.rst
Commit 359fae6eb094e8eacc466b9ce5802563771a3cb9 by anton
[DebugInfo] Explicitly permit addr_size = 0x02 when parsing DWARF data

Current LLVM implementation uses `MCAsmInfo::CodePointerSize` as addr_size when emitting the DWARF data. llvm-dwarfdump, on the other hand, handles `addr_size`s of 4 and 8 properly and considers all other sizes as an error. This works for most of mainline targets except for MSP430 and AVR.

msp430-gcc v8.3.1 emits DWARF32 with addr_size = 4 (DWARF32 does not imply addr_size = 4, 32 refers to internal offset width of 4 bytes) that is handled by llvm-dwarfdump already. Still, emitting 2-byte target pointers on MSP430 seems correct as well (but not for MSP430X that is supported by msp430-gcc but not by LLVM and has 20-bit address space).

This patch make it possible for MSP430 debug info support to be tested with llvm-dwarfdump.

Differential Revision: https://reviews.llvm.org/D82055
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
The file was addedllvm/test/DebugInfo/dwarfdump-16bit-addr.test
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
The file was addedllvm/test/DebugInfo/Inputs/dwarfdump-16bit-addr.o
Commit a5bd75aab861df8cea8d1c6b88e764ad4a2c09ea by anton
[MSP430] Enable some basic support for debug information

This commit technically permits LLVM to emit the debug information for ELF files for MSP430 architecture. Aside from this, it only defines the register numbers as defined by part 10.1 of MSP430 EABI specification (assuming the 1-byte subregisters share the register numbers with corresponding full-size registers).

This commit was basically tested by me with TI-provided GCC 8.3.1 toolchain by compiling an example program with `clang` (please note manual linking may be required due to upstream `clang` not yet handling the `-msim` option necessary to run binaries on the GDB-provided simulator) and then running it and single-stepping with `msp430-elf-gdb` like this:

```
$sysroot/bin/msp430-elf-gdb ./test -ex "target sim" -ex "load ./test"
(gdb) ... traditional GDB commands follow ...
```

While this implementation is most probably far from completeness and is considered experimental, it can already help with debugging MSP430 programs as well as finding issues in LLVM debug info support for MSP430 itself.

One of the use cases includes trying to find a point where UBSan check in a trap-on-error mode was triggered.

The expected debug information format is described in the [MSP430 Embedded Application Binary Interface](http://www.ti.com/lit/an/slaa534/slaa534.pdf) specification, part 10.

Differential Revision: https://reviews.llvm.org/D81488
The file was addedllvm/test/DebugInfo/MSP430/dwarf-basics.ll
The file was modifiedllvm/lib/Object/RelocationResolver.cpp
The file was modifiedllvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
The file was modifiedllvm/lib/Target/MSP430/MSP430RegisterInfo.td
Commit 75b0bbca1d0cb1967025bdaabddac8f75f1369bc by momchil.velikov
[LTO] Use StringRef instead of C-style strings in setCodeGenDebugOptions

Fixes an issue with missing nul-terminators and saves us some string
copying, compared to a version which would insert nul-terminators.

Differential Revision: https://reviews.llvm.org/D82033
The file was modifiedllvm/tools/lto/lto.cpp
The file was modifiedllvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
The file was modifiedllvm/lib/LTO/LTOCodeGenerator.cpp
Commit 8f6620f663031da2bb35b788239f4b607271af84 by anton
[MSP430] Update register names

When writing a unit test on replacing standard epilogue sequences with `BR __mspabi_func_epilog_<N>`, by manually asm-clobbering `rN` - `r10` for N = 4..10, everything worked well except for seeming inability to clobber r4.

The problem was that MSP430 code generator of LLVM used an obsolete name FP for that register. Things were worse because when `llc` read an unknown register name, it silently ignored it.

Differential Revision: https://reviews.llvm.org/D82184
The file was modifiedllvm/lib/Target/MSP430/Disassembler/MSP430Disassembler.cpp
The file was modifiedllvm/lib/Target/MSP430/MSP430RegisterInfo.td
The file was addedllvm/test/CodeGen/MSP430/inline-asm-register-names.ll
The file was modifiedllvm/lib/Target/MSP430/MSP430FrameLowering.cpp
The file was modifiedllvm/lib/Target/MSP430/MSP430ISelLowering.cpp
The file was modifiedllvm/lib/Target/MSP430/MSP430RegisterInfo.cpp
The file was modifiedllvm/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp
The file was modifiedllvm/test/CodeGen/MSP430/asm-clobbers.ll
The file was addedclang/test/CodeGen/msp430-register-names.c
The file was modifiedclang/lib/Basic/Targets/MSP430.h
Commit 2a9c3eb9ec8e16519ac33c601aa1a7deaaf6c1c2 by dave
Make ninja smart console builds more pretty

Summary: CMake's `find_package` outputs to the console on success, which confuses the smart console mode of the `ninja` build system. Let's quiet the success message and manually warn instead.

Reviewers: tstellar, phosek, mehdi_amini

Reviewed By: mehdi_amini

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82276
The file was modifiedllvm/cmake/modules/VersionFromVCS.cmake
Commit 6cb80fbe405264471e9bc5b6ea19694e51ae1b11 by anton
Revert "[MSP430] Update register names"

This reverts commit 8f6620f663031da2bb35b788239f4b607271af84.
The file was modifiedllvm/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp
The file was modifiedllvm/test/CodeGen/MSP430/asm-clobbers.ll
The file was modifiedllvm/lib/Target/MSP430/MSP430RegisterInfo.cpp
The file was modifiedllvm/lib/Target/MSP430/MSP430RegisterInfo.td
The file was removedclang/test/CodeGen/msp430-register-names.c
The file was modifiedllvm/lib/Target/MSP430/MSP430FrameLowering.cpp
The file was modifiedllvm/lib/Target/MSP430/MSP430ISelLowering.cpp
The file was modifiedclang/lib/Basic/Targets/MSP430.h
The file was removedllvm/test/CodeGen/MSP430/inline-asm-register-names.ll
The file was modifiedllvm/lib/Target/MSP430/Disassembler/MSP430Disassembler.cpp
Commit 01f9388d95aca2cc86ed6b2794e199ef55d16e91 by dpetrov
[analyzer] Handle `\l` symbol in string literals in exploded-graph-rewriter

Summary:
Handle `\l` separately because a string literal can be in code like "string\\literal" with the `\l` inside. Also on Windows macros __FILE__ produces specific delimiters `\` and a directory or file may starts with the letter `l`.

Fix:
Use regex for replacing all `\l` (like `,\l`, `}\l`, `[\l`) except `\\l`, because a literal as a rule contains multiple `\` before `\l`.

Differential Revision: https://reviews.llvm.org/D82092
The file was modifiedclang/utils/analyzer/exploded-graph-rewriter.py
The file was addedclang/test/Analysis/exploded-graph-rewriter/l_name_starts_with_l.cpp
Commit 8f592ed33360516e9531fc12424ad050d17195b4 by Vitaly Buka
[StackSafety] Ignore unreachable instructions

Usually DominatorTree provides this info, but here we use
StackLifetime. The reason is that in the next patch StackLifetime
will be used for actual lifetime checks and we can avoid
forwarding the DominatorTree into this code.
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/local.ll
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp
Commit 5d964e262f0c446dd1e25179d342a953a3611d76 by Vitaly Buka
[StackSafety] Check variable lifetime

We can't consider variable safe if out-of-lifetime access is possible.
So if StackLifetime can't prove that the instruction always uses
the variable when it's still alive, we consider it unsafe.
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/local.ll
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp
Commit eae0d2e9b276019713c796c435506ceb183329da by serguei.katkov
Revert "[Peeling] Extend the scope of peeling a bit"

This reverts commit 29b2c1ca72096ca06415b5e626e6728c42ef1e74.

The patch causes the DT verifier failure like:
DominatorTree is different than a freshly computed one!

Not sure the patch itself it wrong but revert to investigate the failure.
The file was modifiedllvm/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedllvm/lib/Transforms/Utils/LoopUnrollPeel.cpp
The file was removedllvm/test/Transforms/LoopUnroll/peel-loop-pgo-deopt-pd.ll
Commit cba56e026c7beb91a2716276151c5b4360032834 by sam.mccall
[ASTMatcher] Correct memoization bug ignoring direction (descendants or ancestors)

Summary:
In ASTMatcher, when we have `has(...)` and `hasParent(...)` called with the same internal matcher on the same node, the memoization process will mix-up the two calls because the direction of the traversal is not part of the memoization key.

This patch adds this information.

Reviewers: klimek

Reviewed By: klimek

Subscribers: Godin, njames93, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80025
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
The file was modifiedclang/lib/ASTMatchers/ASTMatchFinder.cpp
Commit 09d72ad3990b7fde29087329b07cbfa5a332c23a by tpopp
Revert "[CGP] Enable CodeGenPrepares phi type convertion."

This reverts commit 67121d7b82ed78a47ea32f0c87b7317e2b469ab2.

This is causing compile times to be 2x slower on some large binaries.
The file was modifiedllvm/test/CodeGen/Thumb2/mve-float32regloops.ll
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
The file was modifiedllvm/test/CodeGen/X86/atomicf128.ll
Commit 632088c7e84a7ff625c8c67cdc392849b1358f5d by dpetrov
[analyzer] Handle `\l` symbol in string literals in exploded-graph-rewriter

Fix for test due to build-bot complains.
The file was modifiedclang/test/Analysis/exploded-graph-rewriter/l_name_starts_with_l.cpp
Commit cde2dc2fa6ca9f34a550acebac7eb81d46e62a60 by zinenko
[mlir] Fix linalg.generic matmul example in the doc

Example of Matmul implementation in linalg.generic operation contained few mistakes that can puzzle new startes when trying to run the example.

Differential Revision: https://reviews.llvm.org/D82289
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
Commit b5b46601c0177ea214e7f95d5090f764c8f6e30a by llvm-dev
OptimizationRemarkEmitter.h - reduce unnecessary Function.h include to forward declaration. NFC.
The file was modifiedllvm/include/llvm/Analysis/OptimizationRemarkEmitter.h
Commit ecc5d7ee0d2caf34ff53788aa58dc87c6ef9efba by llvm-dev
[DAG] SimplifyMultipleUseDemandedBits - drop unnecessary *_EXTEND_VECTOR_INREG cases

For little endian targets, if we only need the lowest element and none of the extended bits then we can just use the (bitcasted) source vector directly.

We already do this in SimplifyDemandedBits, this adds the SimplifyMultipleUseDemandedBits equivalent.
The file was modifiedllvm/test/CodeGen/X86/known-signbits-vector.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Commit 16cc759ebd56fddd2a9d2437b810ced885ebda73 by anton
Attempt to unbreak the test introduced in 359fae6eb094 on Windows
The file was modifiedllvm/test/DebugInfo/MSP430/dwarf-basics.ll
Commit ba808b157e84774e8f384d9436c911c1341105cd by grimar
[llvm-readobj] - Validate the DT_STRSZ value to avoid crash.

It is possible to trigger a crash when a dynamic symbol has a
broken (too large) st_name and the DT_STRSZ is also broken.

We have the following code in the `Elf_Sym_Impl<ELFT>::getName`:

```
template <class ELFT>
Expected<StringRef> Elf_Sym_Impl<ELFT>::getName(StringRef StrTab) const {
  uint32_t Offset = this->st_name;
  if (Offset >= StrTab.size())
    return createStringError(object_error::parse_failed,
                             "st_name (0x%" PRIx32
                             ") is past the end of the string table"
                             " of size 0x%zx",
                             Offset, StrTab.size());
...
```

The problem is that `StrTab` here is a `ELFDumper::DynamicStringTab` member
which is not validated properly on initialization. So it is possible to bypass the
`if` even when the `st_name` is huge.

This patch fixes the issue.

Differential revision: https://reviews.llvm.org/D82201
The file was modifiedllvm/test/tools/llvm-readobj/ELF/dynamic-malformed.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit 96ecead5a2217f77ff7879bf5a0662b18faa81cf by tcorring
[AMDGPU] clang-format of SIModeRegister.cpp

Ran clang-format just to ease future reviews. No functional changes.
The file was modifiedllvm/lib/Target/AMDGPU/SIModeRegister.cpp
Commit cce625f73d7e3451b1800d4e2e47e7467ae74c1d by spatel
[VectorCombine] improve IR debugging by providing/salvaging value names

The tests are regenerated to show the diffs, but there should be no
functional change from this patch.
The file was modifiedllvm/test/Transforms/VectorCombine/X86/extract-binop.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/extract-cmp.ll
The file was modifiedllvm/lib/Transforms/Vectorize/VectorCombine.cpp
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/vector-reductions.ll
Commit 2580635bd2f3c0527353e4d7823326cd9f92ff7c by Yaxun.Liu
Let HIP default include respect -nogpuinc and -nogpulib
The file was modifiedclang/lib/Driver/ToolChains/AMDGPU.cpp
The file was modifiedclang/test/Driver/hip-include-path.hip
Commit f38f068b14d8ae131278ae38f55f4e9b77c9d7f8 by grimar
[llvm-readelf] - Do not crash when dumping the dynamic symbol table when its sh_entzize == 0.

We have a division by zero crash currently when
the sh_entzize of the dynamic symbol table is 0.

Differential revision: https://reviews.llvm.org/D82180
The file was modifiedllvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit 9761d3cf9c1f996d7b6571d52859e71da2d992c9 by jay.foad
[AMDGPU] Update more live intervals in SIWholeQuadMode

This fixes various assertion failures that would otherwise be triggered
by a later patch to move SIWholeQuadMode later in the pass pipeline.

Differential Revision: https://reviews.llvm.org/D82190
The file was modifiedllvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
Commit de65b356dc2d9730b02ac21dd308cdc3ced0feac by spatel
[VectorCombine] add/use pass-level IRBuilder

This saves creating/destroying a builder every time we
perform some transform.

The tests show instruction ordering diffs resulting from
always inserting at the root instruction now, but those
should be benign.
The file was modifiedllvm/test/Transforms/VectorCombine/X86/extract-binop.ll
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/vector-reductions.ll
The file was modifiedllvm/lib/Transforms/Vectorize/VectorCombine.cpp
Commit 79608371f1fd7f5aa6f8c05d007845e2e1cb7841 by Raphael Isemann
[lldb][NFC] Add more test for builtin formats

Reland 90c1af106a20785ffd01c0d6a41db8bc0160fd11 . This changes the char format
tests which were printing the pointer value of the C-string instead of its
contents, so this test failed on other machines. Now they just print the
bytes in a uint128_t.

Original commit description:

The previous tests apparently missed a few code branches in DumpDataExtractor
code. Also renames the 'test_instruction' which had the same name as another
test (and Python therefore ignored the test entirely).
The file was modifiedlldb/test/API/functionalities/data-formatter/builtin-formats/TestBuiltinFormats.py
Commit f570d5810485fa6fb2e1009f795a899d79bd429f by david.spickett
Revert "[clang][Driver] Correct tool search path priority"

Revert 028571d60843cb87e2637ef69ee09090d4526c62 to investigate
MacOS failure.
(also the review link was incorrect, should be
https://reviews.llvm.org/D79842)
The file was modifiedclang/lib/Driver/Driver.cpp
The file was removedclang/test/Driver/program-path-priority.c
The file was modifiedclang/test/lit.cfg.py
Commit 48d1a2d6d06e41b6dc8ff7bdf4a1277120367dc7 by llvm-dev
[DAG] Add SimplifyMultipleUseDemandedVectorElts helper for SimplifyMultipleUseDemandedBits. NFCI.

We have many cases where we call SimplifyMultipleUseDemandedBits and demand specific vector elements, but all the bits from them - this adds a helper wrapper to handle this.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 3a48a632d00ef1c98042140f402337fe13cdff52 by Xing
[DWARFYAML][debug_info] Use 'AbbrCode' to index the abbreviation.

Before this patch, we use `(uint32_t)AbbrCode - (uint32_t)FirstAbbrCode` to index the abbreviation. It's impossible for we to use the preceeding abbreviation of the previous one (e.g., if the previous DIE's `AbbrCode` is 2, we are unable to use the abbreviation with index 1). In this patch, we use `AbbrCode` to index the abbreviation directly.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D82173
The file was modifiedllvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml
The file was modifiedllvm/lib/ObjectYAML/DWARFVisitor.cpp
Commit 03480c80d3a00765c92e8b2a9eab69af642ed274 by Xing
[DWARFYAML][debug_info] Add support for error handling.

This patch helps add support for error handling in `DWARFYAML::emitDebugInfo()`.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D82275
The file was modifiedllvm/lib/ObjectYAML/DWARFEmitter.cpp
The file was modifiedllvm/lib/ObjectYAML/DWARFVisitor.h
The file was modifiedllvm/lib/ObjectYAML/DWARFVisitor.cpp
The file was modifiedllvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml
Commit 9e525309fb3cbea4ab341b54d127d97831962285 by clementval
[openmp] Base of tablegen generated OpenMP common declaration

Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.

Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp

Reviewed By: jdoerfert, jdenny

Subscribers: cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits

Tags: #llvm, #openmp, #clang

Differential Revision: https://reviews.llvm.org/D81736
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPConstants.h
The file was modifiedclang/test/AST/ast-dump-openmp-target-parallel-for-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-target-parallel-for.c
The file was modifiedclang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c
The file was modifiedllvm/lib/Frontend/OpenMP/CMakeLists.txt
The file was modifiedclang/lib/Parse/ParseOpenMP.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-target-teams-distribute-simd.c
The file was modifiedclang/lib/Tooling/CMakeLists.txt
The file was modifiedclang/test/AST/ast-dump-openmp-target-simd.c
The file was addedllvm/test/TableGen/directive2.td
The file was modifiedclang/test/AST/ast-dump-openmp-target-teams-distribute.c
The file was modifiedclang/test/AST/ast-dump-openmp-teams-distribute-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-teams-distribute.c
The file was addedllvm/test/TableGen/directive1.td
The file was modifiedllvm/utils/TableGen/TableGen.cpp
The file was addedllvm/include/llvm/Frontend/OpenMP/CMakeLists.txt
The file was addedllvm/include/llvm/Frontend/Directive/DirectiveBase.td
The file was addedllvm/utils/TableGen/DirectiveEmitter.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for.c
The file was addedllvm/include/llvm/Frontend/OpenMP/OMP.td
The file was modifiedllvm/utils/TableGen/CMakeLists.txt
The file was modifiedclang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c
The file was modifiedllvm/lib/Frontend/OpenMP/OMPConstants.cpp
The file was modifiedllvm/include/llvm/CMakeLists.txt
The file was modifiedllvm/utils/TableGen/TableGenBackends.h
Commit 8383ac61971bc89b3e1fe5eb5d16bd989e838493 by clementval
Revert commit 9e52530 because of dependencies issue

This reverts commit 9e525309fb3cbea4ab341b54d127d97831962285.
The file was modifiedclang/lib/Parse/ParseOpenMP.cpp
The file was removedllvm/test/TableGen/directive1.td
The file was removedllvm/test/TableGen/directive2.td
The file was removedllvm/include/llvm/Frontend/OpenMP/CMakeLists.txt
The file was modifiedclang/test/AST/ast-dump-openmp-target-parallel-for.c
The file was modifiedclang/test/AST/ast-dump-openmp-teams-distribute-simd.c
The file was modifiedclang/lib/Tooling/CMakeLists.txt
The file was removedllvm/include/llvm/Frontend/OpenMP/OMP.td
The file was modifiedllvm/utils/TableGen/TableGen.cpp
The file was modifiedllvm/lib/Frontend/OpenMP/OMPConstants.cpp
The file was removedllvm/utils/TableGen/DirectiveEmitter.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-target-teams-distribute-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c
The file was modifiedllvm/utils/TableGen/TableGenBackends.h
The file was modifiedllvm/utils/TableGen/CMakeLists.txt
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for.c
The file was modifiedclang/test/AST/ast-dump-openmp-target-parallel-for-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c
The file was modifiedllvm/lib/Frontend/OpenMP/CMakeLists.txt
The file was modifiedclang/test/AST/ast-dump-openmp-target-simd.c
The file was removedllvm/include/llvm/Frontend/Directive/DirectiveBase.td
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPConstants.h
The file was modifiedclang/test/AST/ast-dump-openmp-teams-distribute.c
The file was modifiedclang/test/AST/ast-dump-openmp-target-teams-distribute.c
The file was modifiedllvm/include/llvm/CMakeLists.txt
The file was modifiedclang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c
Commit 98c2f4eea56a48576578fefcddcd6c97eea77c28 by spatel
[VectorCombine] add helper to replace uses and rename

The tests are regenerated to show a path that missed renaming,
but there should be no functional difference from this patch.
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/shuffle.ll
The file was modifiedllvm/lib/Transforms/Vectorize/VectorCombine.cpp
The file was modifiedllvm/test/Transforms/VectorCombine/X86/shuffle.ll
Commit b30c16670e428d09a0854a8f418e46a3e705e4d1 by erich.keane
Implement constexpr BinaryOperator for vector types

These operations do member-wise versions of the all of the listed
operations.  This patch implements all of the binaryoperators for these
types. Note that the test is required to use codegen as I could not come
up with a good way to validate the values without the array-subscript
operator implemented (which is likely a much more involved change).

Differential Reivision: https://reviews.llvm.org/D79755
The file was modifiedclang/lib/AST/ExprConstant.cpp
The file was addedclang/test/SemaCXX/constexpr-vectors.cpp
Commit 02022ff2e3f2f4d39d5926e93ecfa77395a1e9ea by antiagainst
[mlir][spirv] Enhance AccessChainOp index type handling

This patch extends the AccessChainOp index type handling to be able to deal with
all Integer type indices (i.e., all bit-widths and signedness symantics).

There were two ways of achieving this:
1- Backward compatible: The new way of handling the indices will assume that
   an index type is i32 by default if not specified in the assembly format,
   this way all the old tests would pass correctly.
2- Enforce the format: This unifies the spv.AccessChain Op format and all the old
   tests had to be updated to reflect this change or else they fail.

I picked option-2 to unify the Op format and avoid having optional index-type fields
that can lead to somewhat confusing tests format and multiple representations for
the same Op with undocumented assumption that an index is i32 unless stated.
Nonetheless, reverting to option-1 should be straightforward if preferred or needed.

Differential Revision: https://reviews.llvm.org/D81763
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/global-variable.mlir
The file was modifiedmlir/test/Dialect/SPIRV/ops.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/matrix.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Transforms/abi-load-store.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/debug.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/array.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/loop.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/cooperative-matrix.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Transforms/layout-decoration.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/undef.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/test/Dialect/SPIRV/Transforms/inlining.mlir
The file was modifiedmlir/test/Dialect/SPIRV/cooperative-matrix.mlir
The file was modifiedmlir/test/Dialect/SPIRV/structure-ops.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/memory-ops.mlir
The file was modifiedmlir/test/Conversion/GPUToVulkan/lower-gpu-launch-vulkan-launch.mlir
The file was modifiedmlir/test/Dialect/SPIRV/canonicalize.mlir