FailedChanges

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

Summary

  1. [WebAssembly] Fix a bug in removing unnecessary branches (details)
  2. [WebAssembly] Fix a bug in finding matching EH pad (details)
  3. [ObjectYAML][DWARF] Add DWARF entry in ELFYAML. (details)
  4. [Tests] Migrate more statepoint lowering tests to use operand bundles (details)
  5. [LoopUnroll] Fix not-rotated.ll by adding back a limitation was unintentionally (details)
  6. [JITLink] Fix 80-column rule violation. (details)
  7. [JITLink] Improve llvm-jitlink regression testing support for ELF. (details)
  8. [ORC] Add debugging output for LLJIT construction. (details)
  9. [gn build] Port a6deaeec370 (details)
  10. [AArch64][GlobalISel] Enable extending loads combines post-legalization. (details)
  11. [X86] Remove MMX isel patterns containing (x86mmx (scalar_to_vector (i32))). (details)
  12. [libc] Add implementation of call_once from threads.h. (details)
  13. [CodeGen] Add support for extracting elements of scalable vectors (details)
  14. [SVE] Fix warnings in SelectInst::areInvalidOperands (details)
  15. [SVE] Remove getNumElements() warnings in InstCombiner::visitBitCast (details)
  16. [CMake] Pass CLANG_VENDOR variables into later stages (details)
  17. libclc: update website url (details)
  18. New intrinsic @llvm.get.active.lane.mask() (details)
  19. [AST][RecoveryExpr] Make DeduceAutoType fail if the auto is deduced from recovery exprs. (details)
  20. [TTI] New target hook emitGetActiveLaneMask (details)
  21. [VE] Implements minimum MC layer for VE (4/4) (details)
  22. [AMDGPU] Use numbers::pi instead of M_PI. NFC. (details)
  23. [AMDGPU] Better use of llvm::numbers (details)
  24. [MLIR][BufferPlacement] Support functions that return Memref typed results (details)
  25. Avoid O_CLOEXEC to allow building on older Linux (RHEL5) (details)
  26. [lldb][NFC] Remove a std::string->C string->StringRef conversion in ClangUserExpression (details)
  27. [lldb] Make "inline" tests more configurable (details)
  28. Do not list adb devices when a device id is given (details)
  29. [llvm-readobj][test] - unwind.test: add comments, document the current behavior. (details)
  30. [libc++] Fix the LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT setting (details)
  31. Unbreak the build of mlir-cuda-runner (details)
  32. [clangd] Handle additional includes while parsing ASTs (details)
  33. [clangd] Add buildPreamble to TestTU (details)
  34. [llvm-readelf] - --elf-hash-histogram: do not crash when the .gnu.hash goes past the EOF. (details)
  35. [clangd] Preserve extra args in PreambleTests::IncludeParsing to fix windows build bots (details)
  36. VirtualFileSystem.h - reduce Twine.h include to forward declaration. NFC. (details)
  37. IPDBInjectedSource.h - remove unused includes and forward declarations. NFC. (details)
  38. IPDBLineNumber.h - remove unused includes. NFC. (details)
  39. [clangd] Patch PP directives to use stale preambles while building ASTs (details)
  40. [clangd] locateMacroAt handles patched macros (details)
  41. Fix broken include (details)
  42. [CodeGen] Fix warnings in getZeroExtendInReg (details)
  43. [readobj] Fix dangling else warning (details)
  44. [SCCP] Switch to widen at PHIs, stores and call edges. (details)
  45. [lit] Add an option to print all features used in tests (details)
  46. [SelectionDAG] Update getNode asserts for EXTRACT/INSERT_SUBVECTOR. (details)
  47. [clangd] Run PreambleThread in async mode behind a flag (details)
  48. [CGP] Ensure address scaled offset is representable as int64_t (details)
  49. [mlir][SCF] Add utility to clone an scf.ForOp while appending new yield values. (details)
  50. [clangd][NFC] Add traces for PreamblePatch::create (details)
  51. [ObjectYAML][DWARF] Make the `PubSection` optional. (details)
  52. [mlir][Linalg][Vector] Add forwarding patterns between linalg.copy and vector.transfer (details)
  53. [DAGComb] Do not turn insert_elt into shuffle for single elt vectors. (details)
  54. [clang] [Darwin] Add reverse mappings for aarch64/aarch64_32 to darwin arch names (details)
  55. [clang] [MinGW] Fix libunwind extension (details)
  56. Rename APIs in unittests/AST/Language.h in preparation to share them (details)
  57. [AArch64][x86] add tests for FMA combines; NFC (details)
  58. TextAPIContext.h - remove unused MemoryBuffer.h include. NFC. (details)
  59. TextStubCommon.h - move StringSwitch.h include to TextStubCommon.cpp. NFC. (details)
  60. [llvm-objcopy][ELF] Fix removing SHT_GROUP sections. (details)
  61. [llvm-objcopy][ELF] Fix removing a group member. (details)
  62. [DAGCombiner] avoid unnecessary indirection from SDNode/SDValue; NFCI (details)
  63. [llvm-readobj] - Cleanup the DwarfCFIEH::PrinterContext class. NFCI. (details)
  64. [ModuloSchedule] Allow illegal phis to be moved across stages. (details)
  65. [analyzer] ApiModeling: Add buffer size arg constraint (details)
  66. [CodeGen] Fix warnings in LowerToPredicatedOp (details)
  67. [analyzer] ApiModeling: Add buffer size arg constraint with multiplier involved (details)
  68. [SVE] Remove getNumElements() calls in visitGetElementPtrInst (details)
  69. Fix build failure when source is read only (details)
  70. [analyzer] StdLibraryFunctionsChecker: Add sanity checks for constraints (details)
  71. Move unittest helpers to a shared location (details)
  72. [OpenMP][SYCL] Improve diagnosing of unsupported types usage (details)
  73. Remove SVN logic from find_first_existing_vc_file (details)
  74. [AIX][XCOFF] add symbol priority for the llvm-objdump -D -symbol-description (details)
  75. [ARM] Extra MVE VMLAV reduction patterns (details)
  76. unwind: use a more portable endianness check in EHABI (details)
  77. [lldb/test] Fix TestAppleSimulatorOSType when multiple runtimes are installed (details)
  78. [AMDGPU] Remove duplicate test cases (details)
  79. [analyzer] StdLibraryFunctionsChecker: Add support to lookup types (details)
Commit 3fe6ea4641b20c3406e2ef10c0f3782788585030 by aheejin
[WebAssembly] Fix a bug in removing unnecessary branches

Summary:
One of the things `removeUnnecessaryInstrs()` in CFGStackify does is to
remove an unnecessary unconditinal branch before an EH pad. When there
is an unconditional branch right before a catch instruction and it
branches to the end of `end_try` marker, we don't need the branch,
because it there is no exception, the control flow transfers to
that point anyway.
```
bb0:
  try
    ...
    br bb2      <- Not necessary
bb1:
  catch
    ...
bb2:
  end
```

This applies when we have a conditional branch followed by an
unconditional one, in which case we should only remove the unconditional
branch. For example:
```
bb0:
  try
    ...
    br_if someplace_else
    br bb2                 <- Not necessary
bb1:
  catch
    ...
bb2:
  end
```

But `TargetInstrInfo::removeBranch` we used removed all existing
branches when there are multiple ones. This patch fixes it by only
deleting the last (= unconditional) branch manually.

Also fixes some `preds` comments in the test file.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80572
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
The file was modifiedllvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll
Commit 4cd3f4b31b0bd19f3b63f53888a5a2afea68e109 by aheejin
[WebAssembly] Fix a bug in finding matching EH pad

Summary:
`getMatchingEHPad()` in LateEHPrepare is a function to find the nearest
EH pad that dominates the given instruction. This intends to be
lightweight so it does not use full WebAssemblyException scope analysis
or dominator analysis. It simply does backward BFS to its predecessors
and stops at the first EH pad each search path encounters. All search
should end up at the same EH pad, and if not, it returns null.

But it didn't take into account that when there are inner scopes within
the current scope, some path in BFS can hit an inner EH pad first. For
example, in the given diagram, `Inst` belongs to the outer scope and
`getMathingEHPad()` should return 'EHPad 1', but some search path can go
into the inner scope and end up with 'EHPad 2'. The search will return
null because different paths end up with different EH pads.
```
--- EHPad 1 ---
| - EHPad 2 - |
| |         | |
| ----------- |
|   Inst      |
---------------
```

So far this was OK because we haven't tested a case in which a given
instruction is far from its EH pad. Also, this bug does not happen when
the inner EH scope is a cleanup scope, because a cleanup scope ends with
a `cleanupret` whose successor is an EH pad, so the search encounters
that EH pad first before going into the child scope. But this can happen
when the child scope is a catch scope that ends with `catchret`. So this
patch, when doing backward BFS, does not search predecessors that ends
with `catchret`. Because `catchret`s are replaced with `br`s during this
pass, this records BBs that have `catchret`s in the beginning, before
doing any other transformations.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80571
The file was modifiedllvm/test/CodeGen/WebAssembly/exception.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
Commit 373e98a3a5f882661acf67c1f99e89b838aa2ad2 by Xing
[ObjectYAML][DWARF] Add DWARF entry in ELFYAML.

This patch adds a new DWARF entry in ELF YAML file.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D80203
The file was modifiedllvm/include/llvm/ObjectYAML/ELFYAML.h
The file was modifiedllvm/lib/ObjectYAML/ELFEmitter.cpp
The file was modifiedllvm/lib/ObjectYAML/ELFYAML.cpp
The file was addedllvm/test/tools/yaml2obj/ELF/DWARF/debug-str.yaml
The file was modifiedllvm/include/llvm/ObjectYAML/DWARFYAML.h
The file was modifiedllvm/lib/ObjectYAML/DWARFYAML.cpp
Commit 66e6b9afa833426032b1450cb707e6ad892aba00 by listmail
[Tests] Migrate more statepoint lowering tests to use operand bundles

Only 2 tests left after this.  They just happen to be the most annoying.
The file was modifiedllvm/test/CodeGen/X86/statepoint-stack-usage.ll
The file was modifiedllvm/test/CodeGen/X86/statepoint-gctransition-call-lowering.ll
The file was modifiedllvm/test/CodeGen/X86/statepoint-live-in-remat.ll
The file was modifiedllvm/test/CodeGen/X86/statepoint-regs.ll
The file was modifiedllvm/test/CodeGen/X86/statepoint-live-in.ll
The file was modifiedllvm/test/CodeGen/X86/statepoint-vector.ll
Commit 4e74541a928090b3604094e239884b0ea0a631bb by whitneyt
[LoopUnroll] Fix not-rotated.ll by adding back a limitation was unintentionally
removed in https://reviews.llvm.org/D80477
The file was modifiedllvm/lib/Transforms/Utils/LoopUnroll.cpp
Commit 9eafcbfca1b0ab4016bc7320e4d6646b29bf051a by Lang Hames
[JITLink] Fix 80-column rule violation.
The file was modifiedllvm/tools/llvm-jitlink/llvm-jitlink-macho.cpp
Commit a6deaeec370ec5e34f9e5aa3fad3bc73770d4895 by Lang Hames
[JITLink] Improve llvm-jitlink regression testing support for ELF.

This patch adds a jitlink pass, 'registerELFGraphInfo', that records section
and symbol information about each LinkGraph in the llvm-jitlink session object.
This allows symbols and sections to be referred to by name in llvm-jitlink
regression tests. This will enable a testcase to be written for
https://reviews.llvm.org/D80613.
The file was modifiedllvm/tools/llvm-jitlink/llvm-jitlink.cpp
The file was addedllvm/tools/llvm-jitlink/llvm-jitlink-elf.cpp
The file was modifiedllvm/tools/llvm-jitlink/llvm-jitlink-macho.cpp
The file was modifiedllvm/tools/llvm-jitlink/CMakeLists.txt
The file was modifiedllvm/tools/llvm-jitlink/llvm-jitlink.h
The file was modifiedllvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
Commit ff92d3c672e2bf0b885b67b0efebea691df9c5b9 by Lang Hames
[ORC] Add debugging output for LLJIT construction.

This can be handy for checking whether the LLJIT instance you're constructing
matches your expectations.
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/LLJIT.cpp
Commit 3ea38b5b4e6b0684b352a79191b55472aac09f13 by llvmgnsyncbot
[gn build] Port a6deaeec370
The file was modifiedllvm/utils/gn/secondary/llvm/tools/llvm-jitlink/BUILD.gn
Commit a0c90b5b2ad6a81e8aded5ad59cc25ff58464bcf by Amara Emerson
[AArch64][GlobalISel] Enable extending loads combines post-legalization.

During legalization we can end up with extends of loads, which in the case of
zexts causes us to not hit tablegen imported patterns.

The caveat here is that we don't want anyext load forming, since some variants
are illegal. This change also prevents the combine from creating any illegal
loads.

Differential Revision: https://reviews.llvm.org/D80458
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/lib/Target/AArch64/AArch64Combine.td
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizercombiner-extending-loads.mir
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64PostLegalizerCombiner.cpp
Commit 17ed6dcb0c96ac6a6fd5021b326213dbd5fef250 by craig.topper
[X86] Remove MMX isel patterns containing (x86mmx (scalar_to_vector (i32))).

I don't think we can make such a node. I don't think
x86_mmx is considered a vector for the check in getNode.
The file was modifiedllvm/lib/Target/X86/X86InstrMMX.td
Commit 0baf0e8cfc1845ef92d397c1ae43793bf9e6aaad by sivachandra
[libc] Add implementation of call_once from threads.h.

Reviewers: abrachet, maskray

Differential Revision: https://reviews.llvm.org/D79828
The file was modifiedlibc/src/threads/linux/CMakeLists.txt
The file was modifiedlibc/config/linux/api.td
The file was modifiedlibc/test/src/threads/CMakeLists.txt
The file was modifiedlibc/spec/stdc.td
The file was modifiedlibc/lib/CMakeLists.txt
The file was modifiedlibc/src/threads/CMakeLists.txt
The file was addedlibc/src/threads/call_once.h
The file was addedlibc/src/threads/linux/call_once.cpp
The file was addedlibc/test/src/threads/call_once_test.cpp
Commit b147b88c8432cdc14a3238925dbfb8d55be32932 by david.sherwood
[CodeGen] Add support for extracting elements of scalable vectors

I have tried to ensure that SelectionDAG and DAGCombiner do
sensible things for scalable vectors, and added support for a
limited number of simple folds. Codegen support for the vector
extract patterns have also been added to the AArch64 backend.

New vector extract tests have been added here:

  CodeGen/AArch64/sve-extract-element.ll

and I have also added new folds using inserts and extracts here:

  CodeGen/AArch64/sve-insert-element.ll

Differential Revision: https://reviews.llvm.org/D80208
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was addedllvm/test/CodeGen/AArch64/sve-extract-element.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-insert-element.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 9c0ef044beb4850ad9626cb81a1ede4f3bbda4a7 by david.sherwood
[SVE] Fix warnings in SelectInst::areInvalidOperands

We should be comparing the element counts rather than the
numbers of elements.

Differential Revision: https://reviews.llvm.org/D80634
The file was modifiedllvm/lib/IR/Instructions.cpp
The file was addedllvm/test/CodeGen/AArch64/sve-bad-select.ll
Commit f254f1d94e8d0070b2d006a3d1e7ee6eeae0aaa7 by david.sherwood
[SVE] Remove getNumElements() warnings in InstCombiner::visitBitCast

Whilst trying to compile this test to assembly:

  CodeGen/aarch64-sve-intrinsics/acle_sve_reinterpret.c

I discovered some warnings were firing in InstCombiner::visitBitCast
due to calls to getNumElements() for scalable vector types. These
calls only really made sense for fixed width vectors so I have fixed
up the code appropriately.

Differential Revision: https://reviews.llvm.org/D80559
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
The file was addedllvm/test/Transforms/InstCombine/AArch64/sve-bitcast.ll
Commit ca467542eecfc621eea7fefb3c7e3849c6b43ac7 by sylvestre
[CMake] Pass CLANG_VENDOR variables into later stages

We are already passing CLANG_VERSION_* & PACKAGE_VENDOR
The file was modifiedclang/CMakeLists.txt
Commit a3418631e8aa0941b8b57ec2fc3b8d0c7db493be by sylvestre
libclc: update website url

old link is dead
The file was modifiedlibclc/README.TXT
Commit 7fb8a40e5220d6d4efa14c15f92b6f28ba1b18f7 by sjoerd.meijer
New intrinsic @llvm.get.active.lane.mask()

This is split off from D79100 and:
- adds a intrinsic description/definition for @llvm.get.active.lane.mask(), and
- describe its semantics in LangRef.

As described (in more detail) in its LangRef section, it is semantically
equivalent to an icmp with the vector induction variable and the back-edge
taken count, and generates a mask of active/inactive vector lanes.

It will have several use cases. First, it will be used by the
ExpandVectorPredication pass for the VP intrinsics, to expand VP intrinsics for
scalable vectors on targets that do not support the `%evl` parameter, see
D78203.

Also, this is part of, and essential for our ARM MVE tail-predication story:
- this intrinsic will be emitted by the LoopVectorizer in D79100, when
  the scalar epilogue is tail-folded into the vector body. This new intrinsic
  will generate the predicate for the masked loads/stores, and it takes the
  back-edge taken count as an argument. The back-edge taken count represents the
  number of elements processed by the loop, which we need to setup MVE
  tail-predication.
- Emitting the intrinsic is controlled by a new TTI hook, see D80597.
- We pick up this new intrinsic in an ARM MVETailPredication backend pass, see
  D79175, and convert it to a MVE target specific intrinsic/instruction to
  create a tail-predicated loop.

Differential Revision: https://reviews.llvm.org/D80596
The file was modifiedllvm/include/llvm/IR/Intrinsics.td
The file was addedllvm/test/Verifier/get-active-lane-mask.ll
The file was modifiedllvm/docs/LangRef.rst
The file was modifiedllvm/lib/IR/Verifier.cpp
Commit 82bb57c11d8ccb4e1b0f420f4388dd6553bbc57a by hokein.wu
[AST][RecoveryExpr] Make DeduceAutoType fail if the auto is deduced from recovery exprs.

Summary:
With recovery-ast, we will get an undeduced `auto` return type for
"auto foo()->undef()" function declaration, the function decl still keeps
valid, it is dangerous, and breaks assumptions in clang, and leads crashes.

This patch invalidates these functions, if we deduce autos from the
return rexpression, which is similar to auto VarDecl.

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80221
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/test/Sema/invalid-bitwidth-expr.mm
The file was addedclang/test/AST/ast-dump-invalid-auto-return-funcs.cpp
The file was modifiedclang/test/AST/ast-dump-recovery.cpp
The file was modifiedclang/lib/Sema/SemaTemplateDeduction.cpp
Commit 7480ccbfc9d258a38eb99bbfccc6511e6ae10b70 by sjoerd.meijer
[TTI] New target hook emitGetActiveLaneMask

This is split off from D79100 and adds a new target hook emitGetActiveLaneMask
that can be queried to check if the intrinsic @llvm.get.active.lane.mask() is
supported by the backend and if it should be emitted for a given loop.

See also commit rG7fb8a40e5220 and its commit message for more details/context
on this new intrinsic.

Differential Revision: https://reviews.llvm.org/D80597
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfoImpl.h
The file was modifiedllvm/include/llvm/CodeGen/BasicTTIImpl.h
The file was modifiedllvm/lib/Analysis/TargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfo.h
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.h
Commit 0e0907fa0e257ba63d6f820eafbf2079502153ed by simon.moll
[VE] Implements minimum MC layer for VE (4/4)

Summary:
This patch includes following items.

- Adds AsmParser and minimum AsmBackend/ELFObjectWriter/MCCodeEmitter to
   support only LEA instruction in order to reduce the size of this patch.
- Adds regression test of MC layer for a LEA instruction.
- Relocations are not supported this time to reduce the size of this patch.

Differential Revision: https://reviews.llvm.org/D79546
The file was addedllvm/lib/Target/VE/AsmParser/CMakeLists.txt
The file was modifiedllvm/lib/Target/VE/VE.td
The file was addedllvm/test/MC/VE/lit.local.cfg
The file was modifiedllvm/lib/Target/VE/CMakeLists.txt
The file was addedllvm/lib/Target/VE/AsmParser/LLVMBuild.txt
The file was modifiedllvm/lib/Target/VE/MCTargetDesc/CMakeLists.txt
The file was modifiedllvm/lib/Target/VE/VEInstrInfo.td
The file was addedllvm/lib/Target/VE/MCTargetDesc/VEELFObjectWriter.cpp
The file was modifiedllvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.h
The file was addedllvm/lib/Target/VE/AsmParser/VEAsmParser.cpp
The file was addedllvm/lib/Target/VE/MCTargetDesc/VEMCCodeEmitter.cpp
The file was addedllvm/lib/Target/VE/MCTargetDesc/VEAsmBackend.cpp
The file was addedllvm/test/MC/VE/LEA.s
The file was modifiedllvm/lib/Target/VE/LLVMBuild.txt
The file was modifiedllvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp
Commit 036d4b0dbfd1bb5f960c620ff899669d85e62e08 by jay.foad
[AMDGPU] Use numbers::pi instead of M_PI. NFC.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
Commit b28d038ff34dd54ce8eb9fe83506cc3742e6b85a by jay.foad
[AMDGPU] Better use of llvm::numbers

Tweak a few constant expressions involving numbers::pi etc to avoid
rounding errors. NFCI though it's possible some of these will now be
more accurate in the last bit.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Commit 7a3a2535854c84b1c8f6b0a2f2677e89b0e1a250 by ehsan.nadjaran_toosi
[MLIR][BufferPlacement] Support functions that return Memref typed results

Buffer placement can now operates on functions that return buffers. These
buffers escape from the deallocation phase of buffer placement.

Differential Revision: https://reviews.llvm.org/D80696
The file was modifiedmlir/include/mlir/Transforms/BufferPlacement.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/TensorsToBuffers.cpp
The file was modifiedmlir/test/Transforms/buffer-placement.mlir
The file was modifiedmlir/test/lib/Transforms/TestBufferPlacement.cpp
The file was modifiedmlir/lib/Transforms/BufferPlacement.cpp
The file was modifiedmlir/test/Transforms/buffer-placement-preparation.mlir
Commit 058f5f6fd813d1ee1480497394d6fd44e65ec62b by Vitaly Buka
Avoid O_CLOEXEC to allow building on older Linux (RHEL5)

Summary:
See https://github.com/google/sanitizers/issues/1253.

Small patch to enable compilation on (ancient) Red Hat Enterprise Linux 5.

Reviewers: kcc, vitalybuka

Reviewed By: vitalybuka

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D80648
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_posix.cpp
Commit 5f0267984792429d7b9ac574c17566b98527576e by Raphael Isemann
[lldb][NFC] Remove a std::string->C string->StringRef conversion in ClangUserExpression
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
Commit 2c22c1473569352efa9326aa165cc451d39da015 by pavel
[lldb] Make "inline" tests more configurable

Summary:
This patch adds two new arguments to the MakeInlineTest function. The
main motivation is a follow-up patch I'm preparing, but they seem
generally useful.

The first argument allows the user to specify the "build dictionary".
With this argument one can avoid the need to provide a custom Makefile
if all he needs is to override a couple of make variables. This hooks in
neatly into the existing dictionary support for non-inline tests.

The second argument specifies the name of the test. This could be used
to provide better names to the generated test classes, but it's mainly
useful in conjuction with the first argument: now that we can specify a
custom build dictionary, it may sometimes make sense to run the same
test twice with different build configurations. To achieve that, we need
to give the two tests different names, and this argument achieves that.

The usage of the arguments is demonstrated via TestBasicEntryValues.py.

Reviewers: vsk, JDevlieghere

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D80518
The file was removedlldb/test/API/functionalities/param_entry_vals/basic_entry_values/Makefile
The file was modifiedlldb/test/API/functionalities/param_entry_vals/basic_entry_values/TestBasicEntryValues.py
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbinline.py
Commit 7ff2de4f0c60c5d13880440e85ef8edc78482a2f by pavel
Do not list adb devices when a device id is given

Summary:
On Android, this method gets called twice: first when establishing
a host-server connection, then when attaching to a process id.

Each call takes several seconds to finish (especially slower on Windows)
and eliminating the call for the typical case improves latency significantly.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D79586
The file was addedlldb/unittests/Platform/Android/AdbClientTest.cpp
The file was modifiedlldb/source/Plugins/Platform/Android/AdbClient.cpp
The file was modifiedlldb/unittests/Platform/CMakeLists.txt
The file was addedlldb/unittests/Platform/Android/CMakeLists.txt
Commit 1bfc58e6557cd3f3c310de214f316469c20c1476 by grimar
[llvm-readobj][test] - unwind.test: add comments, document the current behavior.

Here I've added comments, added testing for llvm-readelf and documented
the behavior that we already have.

It was discussed in the D80380 thread that we want to improve the
"p_memsz does not match p_filesz for GNU_EH_FRAME" message reported
(and probably convert error to a warning). This patch is a preparation
for that.

Differential revision: https://reviews.llvm.org/D80635
The file was modifiedllvm/test/tools/llvm-readobj/ELF/unwind.test
Commit d0fcdcd28f95d699b27d2026ede964a7f9cff9dd by Louis Dionne
[libc++] Fix the LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT setting

When the __config_site header is generated, but LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT
wasn't specified, _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT would be defined
to 0, which was the NonUnique RTTI comparison implementation. The intent
was to use the Unique RTTI comparison implementation in that case, which
caused https://llvm.org/PR45549.

Instead, use a proper "switch" to select the RTTI comparison implementation.
Note that 0 can't be used as a value, because that is treated the same
by CMake as a variable that is just not defined.

Differential Revision: https://reviews.llvm.org/D80037
The file was modifiedlibcxx/CMakeLists.txt
The file was modifiedlibcxx/include/__config
The file was modifiedlibcxx/include/typeinfo
The file was modifiedlibcxx/docs/BuildingLibcxx.rst
The file was modifiedlibcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp
The file was modifiedlibcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.apple.compile.pass.cpp
The file was modifiedlibcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp
The file was modifiedlibcxx/cmake/caches/Apple.cmake
The file was modifiedlibcxx/include/__config_site.in
Commit b9bb3ad3ed3b13607d15472a0b881da9fb00fc03 by benny.kra
Unbreak the build of mlir-cuda-runner
The file was modifiedmlir/tools/mlir-cuda-runner/CMakeLists.txt
Commit b742eaa321219fa3444e3bcd33eda441bea6b73a by kadircet
[clangd] Handle additional includes while parsing ASTs

Summary:
Enables building ASTs with stale preambles by handling additional preamble
includes. Sets the correct location information for those imaginary includes so
that features like gotodef/documentlink keeps functioning propoerly.

Reviewers: sammccall

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77644
The file was modifiedclang-tools-extra/clangd/unittests/FindSymbolsTests.cpp
The file was modifiedclang-tools-extra/clangd/unittests/PreambleTests.cpp
The file was modifiedclang-tools-extra/clangd/ParsedAST.cpp
The file was modifiedclang-tools-extra/clangd/unittests/ParsedASTTests.cpp
The file was modifiedclang-tools-extra/clangd/Preamble.h
The file was modifiedclang-tools-extra/clangd/CodeComplete.cpp
The file was modifiedclang-tools-extra/clangd/Preamble.cpp
Commit 478f6fb2001698eb102ddce9500ff0885eaaeaab by kadircet
[clangd] Add buildPreamble to TestTU

Summary: Depends on D77644.

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79930
The file was modifiedclang-tools-extra/clangd/unittests/PreambleTests.cpp
The file was modifiedclang-tools-extra/clangd/unittests/TestTU.cpp
The file was modifiedclang-tools-extra/clangd/unittests/TestTU.h
Commit c68ee6da283c5697e935d1f9b7401c086cb18e03 by grimar
[llvm-readelf] - --elf-hash-histogram: do not crash when the .gnu.hash goes past the EOF.

llvm-readelf might crash when the .gnu.hash table goes past the EOF.

This patch splits and updates the code of a helper function `checkGNUHashTable`,
which is similar to `checkHashTable` and fixes the issue.

Differential revision: https://reviews.llvm.org/D80215
The file was modifiedllvm/test/tools/llvm-readobj/ELF/hash-histogram.test
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/test/tools/llvm-readobj/ELF/gnuhash.test
Commit 1772adb0594bf0d8684fe8b63609352ad4a1ccf0 by kadircet
[clangd] Preserve extra args in PreambleTests::IncludeParsing to fix windows build bots
The file was modifiedclang-tools-extra/clangd/unittests/PreambleTests.cpp
Commit 85de54f8066aa73ddee14868b089d191d8b73280 by llvm-dev
VirtualFileSystem.h - reduce Twine.h include to forward declaration. NFC.
The file was modifiedllvm/include/llvm/Support/VirtualFileSystem.h
Commit fabf4afe0554303a73beeaec33541495e4cd2539 by llvm-dev
IPDBInjectedSource.h - remove unused includes and forward declarations. NFC.
The file was modifiedllvm/include/llvm/DebugInfo/PDB/IPDBInjectedSource.h
Commit 9ab7215846f6b1bb6b6b0bcf19bd34ab2742e100 by llvm-dev
IPDBLineNumber.h - remove unused includes. NFC.
The file was modifiedllvm/include/llvm/DebugInfo/PDB/IPDBLineNumber.h
Commit fcde3d5b04b612ebc4164fe8f3e83f93cd1fce53 by kadircet
[clangd] Patch PP directives to use stale preambles while building ASTs

Summary:
Depends on D79930.

This enables more accurate parsing of the AST, by making new macro
definitions in preamble section visible. This is handled by injecting
define directives into preamble patch.

This patch doesn't handle any location mappings yet, so features like go-to-def,
go-to-refs and hover might not work as expected. These will be addressed in a
follow-up patch.

Reviewers: sammccall

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79992
The file was modifiedclang-tools-extra/clangd/Preamble.cpp
The file was modifiedclang-tools-extra/clangd/Preamble.h
The file was modifiedclang-tools-extra/clangd/unittests/PreambleTests.cpp
Commit 538c2753f3ec818eae57a5c5dfbe1f05af57ee37 by kadircet
[clangd] locateMacroAt handles patched macros

Summary: Depends on D79992.

This patch changes locateMacroAt to perform #line directive substitution
for macro identifier locations.

We first check whether a location is inside a file included through
built-in header. If so we check whether line directive maps it back to
the main file, and afterwards use TokenBuffers to find exact location of
the identifier on the line.

Instead of performing the mapping in locateMacroAt, we could also store
a mapping inside the ParsedAST whenever we use a patched preamble. But
that would imply adding more responsibility to ParsedAST and paying for
the mapping even when it is not going to be used.

====

Go-To-Definition:

Later on these locations are used for serving go-to-definition requests,
this enables jumping to definition inside the preamble section in
presence of patched macros.

=====

Go-To-Refs:

Macro references in main file are collected separetely and stored as a
map from macro's symbol id to reference ranges. Those ranges are
computed inside PPCallbacks, hence we don't have access to TokenBuffer.

In presence of preamble patch, any reference to a macro inside the
preamble section will unfortunately have the wrong range. They'll point
into the patch rather than the main file. Hence during findReferences,
we won't get any ranges reported for those.

Fixing those requires:
- Lexing the preamble section to figure out "real range" of a patched
  macro definition
- Postponing range/location calculations until a later step in which we
  have access to tokenbuffers.

This patch trades some accuracy in favor of code complexity. We don't do
any patching for references inside the preamble patch but get any
reference inside the main file for free.

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80198
The file was modifiedclang-tools-extra/clangd/Hover.cpp
The file was modifiedclang-tools-extra/clangd/SourceCode.cpp
The file was modifiedclang-tools-extra/clangd/unittests/PreambleTests.cpp
The file was modifiedclang-tools-extra/clangd/Headers.cpp
The file was modifiedclang-tools-extra/clangd/unittests/HeadersTests.cpp
The file was modifiedclang-tools-extra/clangd/Preamble.h
The file was modifiedclang-tools-extra/clangd/Preamble.cpp
The file was modifiedclang-tools-extra/clangd/XRefs.cpp
The file was modifiedclang-tools-extra/clangd/SourceCode.h
Commit a91b801b3914bfed334f85fb2e43a25b91a9056d by kadircet
Fix broken include
The file was modifiedllvm/include/llvm/DebugInfo/PDB/IPDBLineNumber.h
Commit 4265f1d23cc9d10b9544bafc7a285ca5f143faea by david.sherwood
[CodeGen] Fix warnings in getZeroExtendInReg

We should be using getVectorElementCount() to assert that two types
have the same numbers of elements. I encountered the warnings while
compiling this test:

  CodeGen/AArch64/sve-intrinsics-ld1.ll

Differential Revision: https://reviews.llvm.org/D80616
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit 838a955ab9c79f906ef936fc0100f94cae71a83c by kadircet
[readobj] Fix dangling else warning
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit 01f999ae8871544ab4996fd1368c0dfe4c4a0765 by flo
[SCCP] Switch to widen at PHIs, stores and call edges.

Currently SCCP does not widen PHIs, stores or along call edges
(arguments/return values), but on operations that directly extend ranges
(like binary operators).

This means PHIs, stores and call edges are not pessimized by widening
currently, while binary operators are. The main reason for widening
operators initially was that opting-out for certain operations was
more straight-forward in the initial implementation (and it did not
matter too much, as range support initially was only implemented for a
very limited set of operations.

During the discussion in D78391, it was suggested to consider flipping
widening to PHIs, stores and along call edges. After adding support for
tracking the number of range extensions in ValueLattice, limiting the
number of range extensions per value is straight forward.

This patch introduces a MaxWidenSteps option to the MergeOptions,
limiting the number of range extensions per value. For PHIs, it seems
natural allow an extension for each (active) incoming value plus 1. For
the other cases, a arbitrary limit of 10 has been chosen initially. It would
potentially make sense to set it depending on the users of a
function/global, but that still needs investigating. This potentially
leads to more state-changes and longer compile-times.

The results look quite promising (MultiSource, SPEC):

Same hash: 179 (filtered out)
Remaining: 58
Metric: sccp.IPNumInstRemoved

Program                                        base    widen-phi diff
test-suite...ks/Prolangs-C/agrep/agrep.test    58.00   82.00    41.4%
test-suite...marks/SciMark2-C/scimark2.test    32.00   43.00    34.4%
test-suite...rks/FreeBench/mason/mason.test     6.00    8.00    33.3%
test-suite...langs-C/football/football.test   104.00  128.00    23.1%
test-suite...cations/hexxagon/hexxagon.test    36.00   42.00    16.7%
test-suite...CFP2000/177.mesa/177.mesa.test   214.00  249.00    16.4%
test-suite...ngs-C/assembler/assembler.test    14.00   16.00    14.3%
test-suite...arks/VersaBench/dbms/dbms.test    10.00   11.00    10.0%
test-suite...oxyApps-C++/miniFE/miniFE.test    43.00   47.00     9.3%
test-suite...ications/JM/ldecod/ldecod.test   179.00  195.00     8.9%
test-suite...CFP2006/433.milc/433.milc.test   249.00  265.00     6.4%
test-suite.../CINT2000/175.vpr/175.vpr.test    98.00  104.00     6.1%
test-suite...peg2/mpeg2dec/mpeg2decode.test    70.00   74.00     5.7%
test-suite...CFP2000/188.ammp/188.ammp.test    71.00   75.00     5.6%
test-suite...ce/Benchmarks/PAQ8p/paq8p.test   111.00  117.00     5.4%
test-suite...ce/Applications/Burg/burg.test    41.00   43.00     4.9%
test-suite...000/197.parser/197.parser.test    66.00   69.00     4.5%
test-suite...tions/lambda-0.1.3/lambda.test    23.00   24.00     4.3%
test-suite...urce/Applications/lua/lua.test   301.00  313.00     4.0%
test-suite...TimberWolfMC/timberwolfmc.test    76.00   79.00     3.9%
test-suite...lications/ClamAV/clamscan.test   991.00  1030.00    3.9%
test-suite...plications/d/make_dparser.test    53.00   55.00     3.8%
test-suite...fice-ispell/office-ispell.test    83.00   86.00     3.6%
test-suite...lications/obsequi/Obsequi.test    28.00   29.00     3.6%
test-suite.../Prolangs-C/bison/mybison.test    56.00   58.00     3.6%
test-suite.../CINT2000/254.gap/254.gap.test   170.00  176.00     3.5%
test-suite.../Applications/lemon/lemon.test    30.00   31.00     3.3%
test-suite.../CINT2000/176.gcc/176.gcc.test   1202.00 1240.00    3.2%
test-suite...pplications/treecc/treecc.test    79.00   81.00     2.5%
test-suite...chmarks/MallocBench/gs/gs.test   357.00  366.00     2.5%
test-suite...eeBench/analyzer/analyzer.test   103.00  105.00     1.9%
test-suite...T2006/445.gobmk/445.gobmk.test   1697.00 1724.00    1.6%
test-suite...006/453.povray/453.povray.test   1812.00 1839.00    1.5%
test-suite.../Benchmarks/Bullet/bullet.test   337.00  342.00     1.5%
test-suite.../CINT2000/252.eon/252.eon.test   426.00  432.00     1.4%
test-suite...T2000/300.twolf/300.twolf.test   214.00  217.00     1.4%
test-suite...pplications/oggenc/oggenc.test   244.00  247.00     1.2%
test-suite.../CINT2006/403.gcc/403.gcc.test   4008.00 4055.00    1.2%
test-suite...T2006/456.hmmer/456.hmmer.test   175.00  177.00     1.1%
test-suite...nal/skidmarks10/skidmarks.test   430.00  434.00     0.9%
test-suite.../Applications/sgefa/sgefa.test   115.00  116.00     0.9%
test-suite...006/447.dealII/447.dealII.test   1082.00 1091.00    0.8%
test-suite...6/482.sphinx3/482.sphinx3.test   141.00  142.00     0.7%
test-suite...ocBench/espresso/espresso.test   152.00  153.00     0.7%
test-suite...3.xalancbmk/483.xalancbmk.test   4003.00 4025.00    0.5%
test-suite...lications/sqlite3/sqlite3.test   548.00  551.00     0.5%
test-suite...marks/7zip/7zip-benchmark.test   5522.00 5551.00    0.5%
test-suite...nsumer-lame/consumer-lame.test   208.00  209.00     0.5%
test-suite...:: External/Povray/povray.test   1556.00 1563.00    0.4%
test-suite...000/186.crafty/186.crafty.test   298.00  299.00     0.3%
test-suite.../Applications/SPASS/SPASS.test   2019.00 2025.00    0.3%
test-suite...ications/JM/lencod/lencod.test   8427.00 8449.00    0.3%
test-suite...6/464.h264ref/464.h264ref.test   6797.00 6813.00    0.2%
test-suite...6/471.omnetpp/471.omnetpp.test   431.00  430.00    -0.2%
test-suite...006/450.soplex/450.soplex.test   446.00  447.00     0.2%
test-suite...0.perlbench/400.perlbench.test   1729.00 1727.00   -0.1%
test-suite...000/255.vortex/255.vortex.test   3815.00 3819.00    0.1%

Reviewers: efriedma, nikic, davide

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D79036
The file was modifiedllvm/test/Transforms/SCCP/constant-range-struct.ll
The file was modifiedllvm/test/Transforms/SCCP/widening.ll
The file was modifiedllvm/lib/Transforms/Scalar/SCCP.cpp
The file was addedllvm/test/Transforms/SCCP/ipsccp-cycles.ll
The file was modifiedllvm/test/Transforms/SCCP/resolvedundefsin-tracked-fn.ll
The file was modifiedllvm/include/llvm/Analysis/ValueLattice.h
Commit dac21fd29cd2ae2b979a276747ad5ad82fca09bf by Louis Dionne
[lit] Add an option to print all features used in tests

Lit test suites can tend to accumulate annotations that are not necessarily
relevant as time goes by, for example XFAILS on old compilers or platforms.
To help spot old annotations that can be cleaned up, it can be useful to
look at all features used inside a test suite.

This commit adds a new Lit option '--show-used-features' that prints all
the features used in XFAIL, REQUIRES and UNSUPPORTED of all tests that
are discovered.

Differential Revision: https://reviews.llvm.org/D78589
The file was addedllvm/utils/lit/tests/Inputs/show-used-features/unsupported.txt
The file was modifiedllvm/utils/lit/lit/TestRunner.py
The file was modifiedllvm/utils/lit/lit/main.py
The file was modifiedllvm/utils/lit/lit/Test.py
The file was addedllvm/utils/lit/tests/Inputs/show-used-features/mixed.txt
The file was addedllvm/utils/lit/tests/Inputs/show-used-features/xfail.txt
The file was modifiedllvm/utils/lit/lit/BooleanExpression.py
The file was addedllvm/utils/lit/tests/Inputs/show-used-features/requires.txt
The file was addedllvm/utils/lit/tests/Inputs/show-used-features/lit.cfg
The file was addedllvm/utils/lit/tests/show-used-features.py
The file was modifiedllvm/utils/lit/lit/cl_arguments.py
Commit 92f3d29af0c0f2c98ba0dfacac00bbb6eb1f741d by paul.walker
[SelectionDAG] Update getNode asserts for EXTRACT/INSERT_SUBVECTOR.

Summary:
The description of EXTACT_SUBVECTOR and INSERT_SUBVECTOR has been
changed to accommodate scalable vectors (see ISDOpcodes.h). This
patch updates the asserts used to verify these requirements when
using SelectionDAG's getNode interface.

This patch introduces the MVT function getVectorMinNumElements
that can be used against fixed-length and scalable vectors when
only the known minimum vector length is required.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80709
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/include/llvm/CodeGen/ValueTypes.h
The file was modifiedllvm/include/llvm/Support/MachineValueType.h
Commit 1f4ba66ecc877562e75059e32d4c95a67e1fd483 by kadircet
[clangd] Run PreambleThread in async mode behind a flag

Summary: Depends on D80198.

This patch implies ASTs might be built with stale preambles without
blocking for a fresh one. It also drops any guarantees on every preamble
version being built. In case of multiple preamble build requests, in
addition to being debounced.

Any preamble requested with a WantDiags::Yes will always be built, this
is ensured by blocking enqueueing of any subsequent reqest.

AST worker will still block for initial preamble to reduce duplicate
work.

Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, jfb, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80293
The file was modifiedclang-tools-extra/clangd/ClangdServer.cpp
The file was modifiedclang-tools-extra/clangd/TUScheduler.cpp
The file was modifiedclang-tools-extra/clangd/unittests/ClangdTests.cpp
The file was modifiedclang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
The file was modifiedclang-tools-extra/clangd/ParsedAST.cpp
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
The file was modifiedclang-tools-extra/clangd/ClangdServer.h
The file was modifiedclang-tools-extra/clangd/ParsedAST.h
The file was modifiedclang-tools-extra/clangd/TUScheduler.h
Commit b9826c10866997a8869a7356a37aade759338b08 by llvm-dev
[CGP] Ensure address scaled offset is representable as int64_t

AddressingModeMatcher::matchScaledValue was calling getSExtValue for a constant before ensuring that we can actually represent the value as int64_t

Fixes OSSFuzz#22723 which is a followup to rGc479052a74b2 (PR46004 / OSSFuzz#22357)
The file was modifiedllvm/test/CodeGen/X86/pr46004.ll
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
Commit aa93659c9ffcf36dc1b0c70ce5b0f526a2b9c007 by ntv
[mlir][SCF] Add utility to clone an scf.ForOp while appending new yield values.

This utility factors out the machinery required to add iterArgs and yield values to an scf.ForOp.

Differential Revision: https://reviews.llvm.org/D80656
The file was modifiedmlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
The file was addedmlir/test/Transforms/loop-utils.mlir
The file was addedmlir/test/lib/Transforms/TestSCFUtils.cpp
The file was modifiedmlir/test/lib/Transforms/CMakeLists.txt
The file was addedmlir/lib/Dialect/SCF/Transforms/Utils.cpp
The file was addedmlir/include/mlir/Dialect/SCF/Utils.h
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
Commit 20b2af3e5559e50d1b5279311c6e5034a2d1928d by kadircet
[clangd][NFC] Add traces for PreamblePatch::create
The file was modifiedclang-tools-extra/clangd/Preamble.cpp
Commit ea7db621d289022f0733eb63bb10a837936cbb38 by Xing
[ObjectYAML][DWARF] Make the `PubSection` optional.

This patch helps make the `PubSection` optional in the DWARF structure.

Reviewed By: jhenderson, aprantl

Differential Revision: https://reviews.llvm.org/D80722
The file was modifiedllvm/test/ObjectYAML/MachO/DWARF-pubsections.yaml
The file was modifiedllvm/tools/obj2yaml/dwarf2yaml.cpp
The file was modifiedllvm/include/llvm/ObjectYAML/DWARFYAML.h
The file was modifiedllvm/lib/ObjectYAML/MachOEmitter.cpp
The file was modifiedllvm/lib/ObjectYAML/DWARFYAML.cpp
Commit 1ee114322cb251f851028c72e7974bf85e707e55 by ntv
[mlir][Linalg][Vector] Add forwarding patterns between linalg.copy and vector.transfer

This revision adds custom rewrites for patterns that arise during linalg structured
ops vectorization. These patterns allow the composition of linalg promotion,
vectorization and removal of redundant copies.

The patterns are voluntarily limited and restrictive atm.
More robust behavior will be implemented once more powerful side effect modeling and analyses are available on view/subview.

On the transfer_read side, the following pattern is rewritten:
```
   %alloc = ...
   [optional] %view = std.view %alloc ...
   %subView = subview %allocOrView ...
   [optional] linalg.fill(%allocOrView, %cst) ...
   ...
   linalg.copy(%in, %subView) ...
   vector.transfer_read %allocOrView[...], %cst ...
```
into
```
   [unchanged] %alloc = ...
   [unchanged] [optional] %view = std.view %alloc ...
   [unchanged] [unchanged] %subView = subview %allocOrView ...
   ...
   vector.transfer_read %in[...], %cst ...
```

On the transfer_write side, the following pattern is rewriten:
```
   %alloc = ...
   [optional] %view = std.view %alloc ...
   %subView = subview %allocOrView...
   ...
   vector.transfer_write %..., %allocOrView[...]
   linalg.copy(%subView, %out)
```

Differential Revision: https://reviews.llvm.org/D80728
The file was modifiedmlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was addedmlir/test/Dialect/Linalg/forward-vector-transfers.mlir
The file was modifiedmlir/test/lib/Transforms/TestLinalgTransforms.cpp
Commit d20a3d35e1875d7a4928184117e6a875c35f3f63 by flo
[DAGComb] Do not turn insert_elt into shuffle for single elt vectors.

Currently combineInsertEltToShuffle turns insert_vector_elt into a
vector_shuffle, even if the inserted element is a vector with a single
element. In this case, it should be unlikely that the additional shuffle
would be more efficient than a insert_vector_elt.

Additionally, this fixes a infinite cycle in DAGCombine, where
combineInsertEltToShuffle turns a insert_vector_elt into a shuffle,
which gets turned back into a insert_vector_elt/extract_vector_elt by
a custom AArch64 lowering (in visitVECTOR_SHUFFLE).

Such insert_vector_elt and extract_vector_elt combinations can be
lowered efficiently using mov on AArch64.

There are 2 test changes in arm64-neon-copy.ll: we now use one or two
mov instructions instead of a single zip1. The reason that we need a
second mov in ins1f2 is that we have to move the result to the result
register and is not really related to the DAGCombine fold I think.
But in any case, on most uarchs, mov should be cheaper than zip1. On a
Cortex-A75 for example, zip1 is twice as expensive as mov
(https://developer.arm.com/docs/101398/latest/arm-cortex-a75-software-optimization-guide-v20)

Reviewers: spatel, efriedma, dmgreen, RKSimon

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D80710
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was addedllvm/test/CodeGen/AArch64/vector-insert-shuffle-cycle.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-neon-copy.ll
Commit ac1f7ab007e347dc4a542aa3415e6378289480f4 by martin
[clang] [Darwin] Add reverse mappings for aarch64/aarch64_32 to darwin arch names

These are mapped in MachO::getMachOArchName already, but were missing
in ToolChain::getDefaultUniversalArchName.

Having these reverse mapped here fixes weird inconsistencies like
-dumpmachine showing a target triple like "aarch64-apple-darwin",
while "clang -target aarch64-apple-darwin" didn't use to work (ended
up mapped as unknown-apple-ios).

Differential Revision: https://reviews.llvm.org/D79117
The file was addedclang/test/Driver/darwin-arm64-target.c
The file was modifiedclang/lib/Driver/ToolChain.cpp
Commit ab4d02cf265982d4c03123d2f52b9d5ee8df575d by martin
[clang] [MinGW] Fix libunwind extension

Differential Revision: https://reviews.llvm.org/D79995
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
The file was modifiedclang/test/Driver/compiler-rt-unwind.c
Commit d4ef654673a921878ba5aedb9725b2ac32681f01 by gribozavr
Rename APIs in unittests/AST/Language.h in preparation to share them

Summary:
Declaring these helpers in the ast_matcher namespace in the clangAST
unit test seems inappropriate -- neither these helpers, nor clangAST have
anything to do with AST matchers. Therefore, I moved these helpers to
the clang namespace.

Declaring another typedef called "ArgVector" is not a good idea -- we
already have both "ArgVector", "ArgsVector", and "ArgList". I expanded
it into the underlying type.

Declaring another enum called "Language" is not a good idea because we
arleady have the "clang::Language" enum. I renamed it to
"TestLanguage".

Similarly, I renamed "getBasicRunOptionsForLanguage" to
"getCommandLineArgsForTesting" to explain the semantics better (what are
"run options"?) and not repeat types in the function name
("ForLanguage").

Reviewers: shafik, rengolin, sammccall

Reviewed By: sammccall

Subscribers: gribozavr2, sammccall, martong, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80786
The file was modifiedclang/unittests/AST/ASTImporterFixtures.cpp
The file was modifiedclang/unittests/AST/StructuralEquivalenceTest.cpp
The file was modifiedclang/unittests/AST/ASTImporterFixtures.h
The file was modifiedclang/unittests/AST/ASTImporterODRStrategiesTest.cpp
The file was modifiedclang/unittests/AST/Language.cpp
The file was modifiedclang/unittests/AST/MatchVerifier.h
The file was modifiedclang/unittests/AST/Language.h
The file was modifiedclang/unittests/AST/ASTImporterVisibilityTest.cpp
The file was modifiedclang/unittests/AST/ASTImporterTest.cpp
Commit 912502e8efa9c09fb3b4abce0840b242b731ff12 by spatel
[AArch64][x86] add tests for FMA combines; NFC
The file was modifiedllvm/test/CodeGen/AArch64/fadd-combines.ll
The file was modifiedllvm/test/CodeGen/X86/fma_patterns.ll
Commit b12fa146b55206b003b25cc5e550874ab0cc0d89 by llvm-dev
TextAPIContext.h - remove unused MemoryBuffer.h include. NFC.
The file was modifiedllvm/lib/TextAPI/MachO/TextAPIContext.h
Commit 99a3b20452b16aa92e18e4f5d2c8c6f025aafbae by llvm-dev
TextStubCommon.h - move StringSwitch.h include to TextStubCommon.cpp. NFC.

Only TextStubCommon.cpp actually uses StringSwitch
The file was modifiedllvm/lib/TextAPI/MachO/TextStubCommon.h
The file was modifiedllvm/lib/TextAPI/MachO/TextStubCommon.cpp
Commit a9313282cd5413ed498dceb763ebba12ea5bdecd by ikudrin
[llvm-objcopy][ELF] Fix removing SHT_GROUP sections.

When a SHT_GROUP section is removed, but other sections of the group are
kept, the SHF_GROUP flag of these sections should be dropped, otherwise
the resulting ELF file will be malformed.

Differential Revision: https://reviews.llvm.org/D80511
The file was modifiedllvm/tools/llvm-objcopy/ELF/Object.cpp
The file was modifiedllvm/tools/llvm-objcopy/ELF/Object.h
The file was addedllvm/test/tools/llvm-objcopy/ELF/remove-section-group.test
Commit 5b875bf59b068f3db91c750b24030a7b2bd164aa by ikudrin
[llvm-objcopy][ELF] Fix removing a group member.

When a group member is removed, the corresponding record in the
SHT_GROUP section has to be deleted.

This fixes PR46064.

Differential Revision: https://reviews.llvm.org/D80568
The file was modifiedllvm/tools/llvm-objcopy/ELF/Object.h
The file was addedllvm/test/tools/llvm-objcopy/ELF/remove-section-in-group.test
The file was modifiedllvm/tools/llvm-objcopy/ELF/Object.cpp
Commit 21dadd774f56778ef68c1ce307205dfbdacc793a by spatel
[DAGCombiner] avoid unnecessary indirection from SDNode/SDValue; NFCI
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 9819976032c5af8d9109f2077e637c8303e4d6df by grimar
[llvm-readobj] - Cleanup the DwarfCFIEH::PrinterContext class. NFCI.

It would be nice to switch to `reportUniqueWarnings` from
`reportError` in this class, but first of all it needs a cleanup.

This patch:
1) Eliminates autos.
2) Removes code duplication.
3) Changes how the code works with `Expected<>`.
4) Introduces 2 new `using`s to make the code a bit shorter.

Differential revision: https://reviews.llvm.org/D80726
The file was modifiedllvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
Commit d8f2814c913847b1d0e9167dce5973eea3600c7e by hgreving
[ModuloSchedule] Allow illegal phis to be moved across stages.

Fixes a trivial but impactful bug where we did not move illegal phis across stages. This
led to incorrect mappings in certain cases.
The file was modifiedllvm/lib/CodeGen/ModuloSchedule.cpp
Commit bd03ef19beb8a3476d5cd9f744c5fba5ca287c51 by gabor.marton
[analyzer] ApiModeling: Add buffer size arg constraint

Summary:
Introducing a new argument constraint to confine buffer sizes. It is typical in
C APIs that a parameter represents a buffer and another param holds the size of
the buffer (or the size of the data we want to handle from the buffer).

Reviewers: NoQ, Szelethus, Charusso, steakhal

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77066
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicSize.h
The file was modifiedclang/test/Analysis/std-c-library-functions-arg-constraints.c
The file was modifiedclang/lib/StaticAnalyzer/Core/DynamicSize.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp
Commit 205085d4ccf9c367ba70de9d8f0dd74d6f567c24 by david.sherwood
[CodeGen] Fix warnings in LowerToPredicatedOp

When creating a new vector type based on another vector type we
should pass in the element count instead of the number of elements
and scalable flag separately.

I encountered this warning whilst compiling this test:

  CodeGen/AArch64/sve-intrinsics-int-compares.ll

Differential revision: https://reviews.llvm.org/D80621
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Commit 41928c97b6a17264938fc765a6a0656d8b6e86ed by gabor.marton
[analyzer] ApiModeling: Add buffer size arg constraint with multiplier involved

Summary:
Further develop the buffer size argumentum constraint so it can handle sizes
that we can get by multiplying two variables.

Reviewers: Szelethus, NoQ, steakhal

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77148
The file was modifiedclang/test/Analysis/std-c-library-functions-arg-constraints.c
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
Commit 0609704760d0a94cccdbd243d0d750d74ee6c459 by david.sherwood
[SVE] Remove getNumElements() calls in visitGetElementPtrInst

Replace calls to getNumElements() with getElementCount() in order
to avoid warnings for scalable vectors. The warnings were discovered
by this existing test:

  test/CodeGen/AArch64/sve-gep.ll

Differential revision: https://reviews.llvm.org/D80782
The file was modifiedllvm/lib/IR/Verifier.cpp
Commit 16fef6d0b46f0494c502f8fe416fe841f7b000f6 by sameer.sahasrabuddhe
Fix build failure when source is read only

cmake configure fails when it tries to setup target for llvm_vcsrevision_h
This happens only when source is checked out using repo in a read
only filesystem, because cmake tries to create `.git/logs/HEAD` file.

This patch:
  1. Recovers from failure gracefully.
  2. Ensures that VCSRevision.h is successfully created and updated
     in above scenarios.

Differential Revision: https://reviews.llvm.org/D79400
The file was modifiedllvm/include/llvm/Support/CMakeLists.txt
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
Commit 16506d789084fd037fc61d442da43dd5242872b7 by gabor.marton
[analyzer] StdLibraryFunctionsChecker: Add sanity checks for constraints

Summary:
Once we found a matching FunctionDecl for the given summary then we
validate the given constraints against that FunctionDecl. E.g. we
validate that a NotNull constraint is applied only on arguments that
have pointer types.

This is needed because when we matched the signature of the summary we
were working with incomplete function types, i.e. some intricate type
could have been marked as `Irrelevant` in the signature.

Reviewers: NoQ, Szelethus, balazske

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77658
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
Commit 0e265e315784b4e47f984f8ed9fb7586130bacdc by gribozavr
Move unittest helpers to a shared location

Summary:
unittests/AST/Language.h defines some helpers that we would like to
reuse in other tests, for example, in tests for syntax trees.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: mgorny, martong, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80792
The file was removedclang/unittests/AST/Language.h
The file was modifiedclang/unittests/AST/CMakeLists.txt
The file was modifiedclang/include/clang/module.modulemap
The file was addedclang/lib/Testing/CommandLineArgs.cpp
The file was addedclang/include/clang/Testing/CommandLineArgs.h
The file was modifiedclang/lib/CMakeLists.txt
The file was modifiedclang/unittests/AST/MatchVerifier.h
The file was addedclang/lib/Testing/CMakeLists.txt
The file was removedclang/unittests/AST/Language.cpp
The file was modifiedclang/unittests/AST/ASTImporterFixtures.h
The file was modifiedclang/unittests/AST/StructuralEquivalenceTest.cpp
Commit cf6cc662eeee2b1416430f517850be9032788e39 by alexey.bader
[OpenMP][SYCL] Improve diagnosing of unsupported types usage

Summary:
Diagnostic is emitted if some declaration of unsupported type
declaration is used inside device code.
Memcpy operations for structs containing member with unsupported type
are allowed. Fixed crash on attempt to emit diagnostic outside of the
functions.

The approach is generalized between SYCL and OpenMP.
CUDA/OMP deferred diagnostic interface is going to be used for SYCL device.

Reviewers: rsmith, rjmccall, ABataev, erichkeane, bader, jdoerfert, aaron.ballman

Reviewed By: jdoerfert

Subscribers: guansong, sstefan1, yaxunl, mgorny, bader, ebevhan, Anastasia, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D74387
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/test/OpenMP/nvptx_unsupported_type_messages.cpp
The file was modifiedclang/lib/Sema/SemaType.cpp
The file was modifiedclang/lib/Sema/CMakeLists.txt
The file was modifiedclang/test/Headers/nvptx_device_math_sin.c
The file was modifiedclang/test/OpenMP/nvptx_unsupported_type_codegen.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was addedclang/test/SemaSYCL/float128.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/test/Headers/nvptx_device_math_sin.cpp
The file was addedclang/lib/Sema/SemaSYCL.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
Commit 0384446c7c2458b12ce3ef1c2bdf438af1f78ad7 by sameer.sahasrabuddhe
Remove SVN logic from find_first_existing_vc_file

As LLVM has moved from SVN to git, there is no need to
keep SVN related code. Also, this code piece was never used.

Differential Revision: https://reviews.llvm.org/D79400
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
Commit 34cfed24ebd3a2a9f286877d142a68dbf2c42c96 by diggerlin
[AIX][XCOFF] add symbol priority for the llvm-objdump -D -symbol-description

SUMMARY:
when there are two symbol has the same address. llvm-objdump -D -symbol-description will select symbol based on the following rule:

1. using Label first if there is a Label symbol.
2. If there is not Label, using a symbol which has Storage Mapping class.
3. if more than one symbol has storage mapping class, put the TC0 has the low priority, for other storage mapping class , compare based on the value.

Reviewers: James Henderson ,hubert.reinterpretcast,

Differential Revision: https://reviews.llvm.org/D78387
The file was modifiedllvm/test/tools/llvm-objdump/XCOFF/disassemble-symbol-description.test
The file was modifiedllvm/include/llvm/MC/MCDisassembler/MCDisassembler.h
The file was modifiedllvm/unittests/MC/CMakeLists.txt
The file was modifiedllvm/lib/MC/MCDisassembler/MCDisassembler.cpp
The file was addedllvm/unittests/MC/MCDisassemblerTest.cpp
Commit 747c574b94595c6209185c87e79f51bff46fd4d8 by david.green
[ARM] Extra MVE VMLAV reduction patterns

These patterns for i8 and i16 VMLA's were missing. They end up from
legalized vector.reduce.add.v8i16 and vector.reduce.add.v16i8, and
although the instruction works differently (the mul and add are
performed in a higher precision), I believe it is OK because only an
i8/i16 are demanded from them, and so the results will be the same. At
least, they pass any testing I can think to run on them.

There are some tests that end up looking worse, but are quite artificial
due to passing half vector types through a call boundary. I would not
expect the vmull to realistically come up like that, and a vmlava is
likely better a lot of the time.

Differential Revision: https://reviews.llvm.org/D80524
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vecreduce-mla.ll
The file was modifiedllvm/lib/Target/ARM/ARMInstrMVE.td
Commit 68c50708d1f2b9aee3f10ec710df0b1387f701e5 by Saleem Abdulrasool
unwind: use a more portable endianness check in EHABI

The ARM specific code was trying to determine endianness using the
`__LITTLE_ENDIAN__` macro which is not guaranteed to be defined.
When not defined, it makes libunwind to build the big-endian code even
when the compiler builds for a little-endian target.

This change allows building libunwind with the `musl-gcc` toolchain
which does not define `__LITTLE_ENDIAN__`.  Use `__BYTE_ORDER__`
instead.

Patch by Idan Freiberg!
The file was modifiedlibunwind/src/Unwind-EHABI.cpp
Commit 977f00123a6d94c634d22356cae1da2a22f0e3df by Fred Riss
[lldb/test] Fix TestAppleSimulatorOSType when multiple runtimes are installed

One can have multiple simulator runtimes installed, supporting
various generations of OSs. The logic in TestAppleSimulatorOSType
might select a rnutime older than the one targeted by the current
tools, preventing the executable from running. This commit changes
the test to look for the most recent runtime available instead.
The file was modifiedlldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py
Commit 9e0b52e2e68412a9a2add18697f4246e5e5ee5e3 by jay.foad
[AMDGPU] Remove duplicate test cases

The two "2sin" test cases were identical to the "sin_2x" test cases just
above.
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.sin.ll
Commit 634258b80606c4bb8192077239a089ae5842781a by gabor.marton
[analyzer] StdLibraryFunctionsChecker: Add support to lookup types

Summary:
In this patch I am trying to get rid of the `Irrelevant` types from the
signatures of the functions from the standard C library. For that I've
introduced `lookupType()` to be able to lookup arbitrary types in the global
scope. This makes it possible to define the signatures precisely.

Note 1) `fread`'s signature is now fixed to have the proper `FILE *restrict`
type when C99 is the language.
Note 2) There are still existing `Irrelevant` types, but they are all from
POSIX. I am planning to address those together with the missing POSIX functions
(in D79433).

Reviewers: xazax.hun, NoQ, Szelethus, balazske

Subscribers: whisperity, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, Charusso, steakhal, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80016
The file was modifiedclang/test/Analysis/std-c-library-functions-arg-constraints.c
The file was addedclang/test/Analysis/std-c-library-functions-lookup.c
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
The file was addedclang/test/Analysis/std-c-library-functions-lookup.cpp
The file was modifiedclang/test/Analysis/std-c-library-functions.c