SuccessChanges

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

Summary

  1. Revert "[lldb] Explicitly use the configuration architecture when building test executables" (details)
  2. [ELF] Set SHF_INFO_LINK for .rel[a].plt and .rel[a].dyn (details)
  3. Revert "[Docs] Clarify that FunctionPasses can't add/remove declarations" (details)
  4. AMDGPU: Cleanup MIR test (details)
  5. [InstCombine] Remove dbg.values describing contents of dead allocas (details)
  6. [TableGen] Update documents to make them more complete (details)
  7. clang/Basic: Remove ContentCache::getRawBuffer, NFC (details)
  8. [SystemZ][z/OS] Set short-enums as the default for z/OS (details)
  9. [InstSimplify] add tests for ctpop constant range; NFC (details)
  10. HowToReleaseLLVM: Clean up document and remove references to SVN (details)
  11. [NFC][PartialInliner]: Clean up code (details)
  12. [MemCpyOpt] Move GEP during call slot optimization (details)
  13. [PatternMatch] Add new FP matchers. NFC. (details)
  14. [InstCombine][NFC] Use ConstantExpr::getBinOpIdentity (details)
  15. [libc++] Drop old workaround for iostreams instantiations missing from the dylib (details)
  16. [GWP-ASan] Move random-related code in the allocator (details)
  17. DWARFv5: Disable DW_OP_convert for configurations that don't yet support it (details)
  18. Port -instnamer to NPM (details)
  19. Revert "[mlir] Convert from Async dialect to LLVM coroutines" (details)
  20. Revert "Revert "[mlir] Convert from Async dialect to LLVM coroutines"" (details)
  21. Revert "[CodeExtractor] Don't create bitcasts when inserting lifetime markers (NFCI)" (details)
  22. [test] HotColdSplit: cover use of opaque pointer type (details)
  23. [clangd] Give the server information about client's remote index protocol version (details)
  24. [SourceManager] Skip module maps when searching files for macro arguments (details)
  25. [clangd] Get rid of llvm::Optional in Remote- and LocalIndexRoot; NFC (details)
  26. [BasicAA] Add additional phi tests (NFC) (details)
  27. Revert "[GWP-ASan] Move random-related code in the allocator" (details)
  28. Initial support for vectorization using Libmvec (GLIBC vector math library) (details)
  29. [BasicAA] Don't track visited blocks for phi-phi alias query (details)
  30. [AIX] Emit error for -G option on AIX (details)
  31. [BasicAA] Only add visited phi blocks temporarily (details)
  32. [DomTree] Make assert more precise (details)
  33. [GWP-ASan] Move random-related code in the allocator (redo) (details)
  34. [llvm-objcopy][MachO] Fix the calculation of the output size (details)
  35. [libc++] Allow running the tests in the experimental runtimes-only build (details)
  36. [clang][Frontend] Add missing error handling (details)
  37. [SourceManager] Avoid copying SLocEntry in computeMacroArgsCache (details)
  38. [libTooling] Add function to Transformer to create a no-op edit. (details)
  39. [AArch64][GlobalISel] Split post-legalizer combiner to allow for lowering at -O0 (details)
  40. [gn build] (semi-manually) port 147b9497e79 (details)
  41. [ELF] --warn-backrefs: save the referenced InputFile * (details)
  42. [AArch64][GlobalISel] Move imm adjustment for G_ICMP to post-legalizer lowering (details)
  43. DebugInfo: Use llc rather than %llc_dwarf when also hardcoding a target triple (details)
  44. [NFC][SampleFDO] Move some common stuff from SampleProfileReaderExtBinary/WriterExtBinary (details)
  45. [libc++abi] Fix the standalone build after the __config_site change (details)
  46. BitCodeFormat: update doc on new byref and mustprogress attrs; NFC (details)
  47. Fix constant evaluation of zero-initialization of a union whose first (details)
  48. Revert "[MBP] Add whole chain to BlockFilterSet instead of individual BB" (details)
  49. [OpenMP] Fixed a potential integer overflow (details)
  50. SourceManager: Factor out helpers for common SLocEntry lookup pattern, NFC (details)
  51. SourceManager: Change SourceManager::isMainFile to take a FileEntry, NFC (details)
  52. [Inliner] Run always-inliner in inliner-wrapper (details)
  53. DebugInfo: Tidy up test for more portability to MachO and Windows (details)
  54. [MC] Adjust StringTableBuilder for linked Mach-O binaries (details)
  55. SourceManager: getFileEntryRefForID => getNonBuiltinFilenameForID, NFC (details)
  56. SourceManager: Remove a redundant nullptr check in getNonBuiltinFilenameForID, NFC (details)
  57. [CGSCC] Detect devirtualization in more cases (details)
  58. DebugInfo: Hash DIE referevences (DW_OP_convert) when computing Split DWARF signatures (details)
  59. [IR] Merge metadata manipulation code into Value (details)
  60. [lldb] Fix missing initialization in UtilityFunction ctor (NFC) (details)
  61. [runtimes] Do not set XXX_STANDALONE_BUILD for libc++/abi/unwind (details)
  62. [lldb] Fix bug instroduced by a00acbab45b0 (details)
  63. [SCEV][NFC] Cache symbolic max exit count (details)
  64. [JITLink][ELF] Add support for ELF::R_X86_64_REX_GOTPCRELX relocation. (details)
  65. Revert "[JITLink][ELF] Add support for ELF::R_X86_64_REX_GOTPCRELX relocation." (details)
  66. [llvm-objcopy][NFC] Extract arg parsing logic into a helper function (details)
  67. [DebugInfo] Clear subreg in setDebugValueUndef() (details)
  68. [ARM][SchedModels] Let ldm* instruction scheduling use MCSchedPredicate (details)
  69. [llvm-mca] Add test for cortex-a57 NEON instructions (details)
  70. [SVE]Clarify TypeSize comparisons in llvm/lib/Transforms (details)
  71. [AMDGPU] Add simplification/combines for llvm.amdgcn.fmul.legacy (details)
  72. [lld][ELF][test] Add additional test coverage for LTO (details)
  73. [mem2reg] Remove dbg.values describing contents of dead allocas (details)
  74. [mlir] Fix exiting OpPatternRewriteDriver::simplifyLocally after first iteration that didn't change the op. (details)
  75. [MLIR] Added PromoteBuffersToStackPass to convert heap- to stack-based allocations. (details)
  76. [DebugInstrRef] NFC: Separate collection of machine/variable values (details)
  77. [lldb] Split out NetBSD/x86 watchpoint impl for unification (details)
  78. [AArch64] Implement getIntrinsicInstrCost, handle min/max intrinsics. (details)
  79. [ARM][SchedModels] Convert IsR1P0AndLaterPred to MCSchedPredicate. NFC (details)
  80. [X86] lowerShuffleWithPERMV - use MVT::changeTypeToInteger helper. NFCI. (details)
  81. [InstCombine] Rename InstCombinerImpl::matchBSwap to matchBSwapOrBitReverse. NFCI. (details)
  82. [InstCombine] matchBSwapOrBitReverse - expose bswap/bitreverse matching flags. (details)
  83. [mlir] Expose affine expression to C API (details)
Commit 5dc70332d53cc5744aedf72a12d0367988559776 by Raphael Isemann
Revert "[lldb] Explicitly use the configuration architecture when building test executables"

This reverts commit 41185226f6d80663b4a1064c6f47581ee567d78d.

Causes TestQuoting to fail on Windows.
The file was modifiedlldb/packages/Python/lldbsuite/test/builders/builder.py
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
Commit a8f9f0801816953e9cf792448dcffd9000227b27 by i
[ELF] Set SHF_INFO_LINK for .rel[a].plt and .rel[a].dyn

The ELF spec says

> If the sh_flags field for this section header includes the attribute SHF_INFO_LINK, then this member represents a section header table index.

Set SHF_INFO_LINK so that binary manipulation tools know that sh_info is
a section header table index instead of (the number of local symbols in the case of SHT_SYMTAB/SHT_DYNSYM).
We have already added SHF_INFO_LINK for --emit-relocs retained SHT_REL[A].

For example, we can teach llvm-objcopy to preserve the section index of the sh_info referenced section if
SHF_INFO_LINK is set. (GNU objcopy recognizes .rel[a].plt and updates
sh_info even if SHF_INFO_LINK is not set).

Reviewed By: grimar, psmith

Differential Revision: https://reviews.llvm.org/D89828
The file was modifiedlld/test/ELF/aarch64-gnu-ifunc.s
The file was modifiedlld/test/ELF/x86-64-combined-dynrel.s
The file was modifiedlld/test/ELF/gnu-ifunc.s
The file was modifiedlld/ELF/SyntheticSections.cpp
The file was modifiedlld/test/ELF/arm-gnu-ifunc.s
The file was modifiedlld/test/ELF/dynamic-reloc.s
The file was modifiedlld/test/ELF/gnu-ifunc-i386.s
The file was modifiedlld/test/ELF/arm-combined-dynrel-ifunc.s
Commit 87520657b814227625149763ba750a56ae481448 by aeubanks
Revert "[Docs] Clarify that FunctionPasses can't add/remove declarations"

This reverts commit 710676cf3a3c6f6ddf2f18e24cac017d20dac1ff.
The file was modifiedllvm/docs/WritingAnLLVMPass.rst
Commit 549f326d325486d7678f4ca57e6bab2f94fb2f32 by Matthew.Arsenault
AMDGPU: Cleanup MIR test

Remove registers section and compact block/register numbers
The file was modifiedllvm/test/CodeGen/AMDGPU/spill-before-exec.mir
Commit 3419252a792a1da459ef9659391b8a876bf6b630 by Vedant Kumar
[InstCombine] Remove dbg.values describing contents of dead allocas

When InstCombine removes an alloca, it erases the dbg.{addr,declare}
instructions which refer to the alloca. It would be better to instead
remove all debug intrinsics which describe the contents of the dead
alloca, namely all dbg.value(<dead alloca>, ..., DW_OP_deref)'s.

This effectively undoes work performed in an InstCombine run earlier in
the pipeline by LowerDbgDeclare, which inserts DW_OP_deref dbg.values
before CallInst users of an alloca. The motivating example looks like:

```
  define void @foo(i32 %0) {
    %a = alloca i32              ; This alloca is erased.
    store i32 %0, i32* %a
    dbg.value(i32 %0, "arg0")    ; This dbg.value survives.
    dbg.value(i32* %a, "arg0", DW_OP_deref)
    call void @trivially_inlinable_no_op(i32* %a)
    ret void
  }
```

If the DW_OP_deref dbg.value is not erased, it becomes dbg.value(undef)
after inlining, making "arg0" unavailable. But we already have dbg.value
descriptions of the alloca's value (from LowerDbgDeclare), so the
DW_OP_deref dbg.value cannot serve its purpose of describing an
initialization of the alloca by some callee. It invalidates other useful
dbg.values, causing large gaps in location coverage, so we should delete
it (even though doing so may cause stale dbg.values to appear, if
there's a dead store to `%a` in @trivially_inlinable_no_op).

OTOH, it wouldn't be correct to delete all dbg.value descriptions of an
alloca. Note that it's possible to describe a variable that takes on
different pointer values, e.g.:

```
  void use(int *);
  void t(int a, int b) {
    int *local = &a;     // dbg.value(i32* %a.addr, "local")
    local = &b;          // dbg.value(i32* undef, "local")
    use(&a);             //           (note: %b.addr is optimized out)
    local = &a;          // dbg.value(i32* %a.addr, "local")
  }
```

In this example, the alloca for "b" is erased, but we need to describe
the value of "local" as <unavailable> before the call to "use". This
prevents "local" from appearing to be equal to "&a" at the callsite.

rdar://66592859

Differential Revision: https://reviews.llvm.org/D85555
The file was addedllvm/test/Transforms/InstCombine/erase-dbg-values-at-dead-alloc-site.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
Commit b9eecbfada4f4e7e8b74434b4fc538d325d95cfc by paul
[TableGen] Update documents to make them more complete

Differential Revision: https://reviews.llvm.org/D89962
The file was modifiedllvm/docs/TableGen/BackGuide.rst
The file was modifiedllvm/docs/TableGen/index.rst
The file was modifiedllvm/docs/TableGen/BackEnds.rst
Commit 156e8b37024abd8630666e0ae8a251b80299ed1d by Duncan P. N. Exon Smith
clang/Basic: Remove ContentCache::getRawBuffer, NFC

Replace `ContentCache::getRawBuffer` with `getBufferDataIfLoaded` and
`getBufferIfLoaded`, excising another accessor for the underlying
`MemoryBuffer*` in favour of `StringRef` and `MemoryBufferRef`.

Differential Revision: https://reviews.llvm.org/D89445
The file was modifiedclang/lib/Basic/SourceManager.cpp
The file was modifiedclang/include/clang/Basic/SourceManager.h
The file was modifiedclang/lib/Serialization/ASTReader.cpp
The file was modifiedclang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp
The file was modifiedclang/lib/Serialization/ASTWriter.cpp
Commit 9bc02e892f54b37031dd81cfc4485d86cee8c757 by Abhina.Sreeskantharajan
[SystemZ][z/OS] Set short-enums as the default for z/OS

This patch sets short-enums to be the default for z/OS.

Reviewed By: abhina.sreeskantharajan

Differential Revision: https://reviews.llvm.org/D89801
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was addedclang/test/Driver/zos-driver-defaults.c
Commit f6cb7f37ff6d93d17212019bd7ee5be00deab62d by spatel
[InstSimplify] add tests for ctpop constant range; NFC
The file was modifiedllvm/test/Transforms/InstSimplify/compare.ll
Commit 6f798e460ca3ddecb207b563d157d5ae3163cd55 by tstellar
HowToReleaseLLVM: Clean up document and remove references to SVN

Reviewed By: hans

Differential Revision: https://reviews.llvm.org/D80395
The file was modifiedllvm/docs/HowToReleaseLLVM.rst
Commit e6521ce0642583881a899e0cc52dcb4a5011fc48 by etiotto
[NFC][PartialInliner]: Clean up code

Make member function const where possible, use LLVM_DEBUG to print debug traces
rather than a custom option, pass by reference to avoid null checking, ...

Reviewed By: fhann

Differential Revision: https://reviews.llvm.org/D89895
The file was modifiedllvm/lib/Transforms/IPO/PartialInlining.cpp
Commit 3e37543111f40c3fa2430a80eb0293ae3b814dd3 by nikita.ppv
[MemCpyOpt] Move GEP during call slot optimization

When performing a call slot optimization to a GEP destination, it
will currently usually fail, because the GEP is directly before the
memcpy and as such does not dominate the call. We should move it
above the call if that satisfies the domination requirement.

I think that a constant-index GEP is the only useful thing to move
here, as otherwise isDereferenceablePointer couldn't look through
it anyway. As such I'm not trying to generalize this further.

Differential Revision: https://reviews.llvm.org/D89623
The file was modifiedllvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
The file was modifiedllvm/test/Transforms/MemCpyOpt/callslot.ll
Commit 922285abec7cdcce1045b979ea1ff1091243bb0b by jay.foad
[PatternMatch] Add new FP matchers. NFC.

This adds matchers m_NonNaN, m_NonInf, m_Finite and m_NonZeroFP as well
as generic support for binding the matched value to an APFloat.

I tried to follow the existing convention of using an FP suffix for
predicates like zero and non-zero, which could be confused with the
integer versions, but not for predicates which are clearly already
FP-specific.

Differential Revision: https://reviews.llvm.org/D89038
The file was modifiedllvm/include/llvm/IR/PatternMatch.h
The file was modifiedllvm/unittests/IR/PatternMatch.cpp
Commit d49911c2825c40b49c915e61cdf6656e49789dcd by nikita.ppv
[InstCombine][NFC] Use ConstantExpr::getBinOpIdentity

Delete duplicate implementation getSelectFoldableConstant and
replace with ConstantExpr::getBinOpIdentity.

Differential Revision: https://reviews.llvm.org/D89839
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
Commit ce565861c746ee67d9c80c0a1db2e8acc1007f6b by Louis Dionne
[libc++] Drop old workaround for iostreams instantiations missing from the dylib

On old Apple platforms (pre 10.9), we couldn't rely on the iostreams
explicit instantiations being part of the dylib. However, we don't
support back-deploying to such old deployment targets anymore, so the
workaround can be dropped.
The file was modifiedlibcxx/include/ostream
The file was modifiedlibcxx/include/istream
The file was modifiedlibcxx/include/__config
The file was modifiedlibcxx/include/streambuf
Commit 9903b0586cfb76ef2401c342501e61e1bd3daa0f by kostyak
[GWP-ASan] Move random-related code in the allocator

We need to have all thread specific data packed into a single `uintptr_t`
for the upcoming Fuchsia support. We can move the `RandomState` into the
`ThreadLocalPackedVariables`, reducing the size of `NextSampleCounter`
to 31 bits (or we could reduce `RandomState` to 31 bits).

We move `getRandomUnsigned32` into the platform agnostic part of the
class, and `initPRNG` in the platform specific part.

`ScopedBoolean` is replaced by actual assignments since non-const
references to bitfields are prohibited.

`random.{h,cpp}` are removed.

Differential Revision: https://reviews.llvm.org/D89908
The file was removedcompiler-rt/lib/gwp_asan/random.h
The file was modifiedcompiler-rt/lib/gwp_asan/options.inc
The file was modifiedcompiler-rt/lib/gwp_asan/guarded_pool_allocator.h
The file was removedcompiler-rt/lib/gwp_asan/random.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt
Commit a66311277af3c254cb73a749e8c4478d50a37bb0 by dblaikie
DWARFv5: Disable DW_OP_convert for configurations that don't yet support it

Testing reveals that lldb and gdb have some problems with supporting
DW_OP_convert - gdb with Split DWARF tries to resolve the CU-relative
DIE offset relative to the skeleton DIE. lldb tries to treat the offset
as absolute, which judging by the llvm-dsymutil support for
DW_OP_convert, I guess works OK in MachO? (though probably llvm-dsymutil
is producing invalid DWARF by resolving the relative reference to an
absolute one?).

Specifically this disables DW_OP_convert usage in DWARFv5 if:
* Tuning for GDB and using Split DWARF
* Tuning for LLDB and not targeting MachO
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
The file was modifiedllvm/test/DebugInfo/X86/convert-loclist.ll
The file was modifiedllvm/test/DebugInfo/X86/convert-debugloc.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Commit 92d9a3868aa8427ce159fe5ae79f4b39b62c040d by aeubanks
Port -instnamer to NPM

Some clang tests use this.

Reviewed By: akhuang

Differential Revision: https://reviews.llvm.org/D89931
The file was modifiedllvm/lib/Transforms/Utils/InstructionNamer.cpp
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was addedllvm/include/llvm/Transforms/Utils/InstructionNamer.h
The file was modifiedllvm/test/Transforms/InstNamer/basic.ll
Commit 4986d5eaff359081a867def1c6a2e1147dbb2ad6 by joker.eph
Revert "[mlir] Convert from Async dialect to LLVM coroutines"

This reverts commit a8b0ae3bddee311cbc97801089a95702f32773f8
and commit f8fcff5a9d7ee948add3f28382d4ced5710edaaf.

The build with SHARED_LIBRARY=ON is broken.
The file was modifiedmlir/test/CMakeLists.txt
The file was removedmlir/lib/Conversion/AsyncToLLVM/CMakeLists.txt
The file was removedmlir/include/mlir/ExecutionEngine/AsyncRuntime.h
The file was modifiedmlir/lib/ExecutionEngine/OptUtils.cpp
The file was modifiedmlir/lib/ExecutionEngine/CMakeLists.txt
The file was removedmlir/test/mlir-cpu-runner/async.mlir
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/Async/IR/AsyncOps.td
The file was removedmlir/test/Conversion/AsyncToLLVM/convert-to-llvm.mlir
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was removedmlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
The file was removedmlir/lib/ExecutionEngine/AsyncRuntime.cpp
The file was removedmlir/include/mlir/Conversion/AsyncToLLVM/AsyncToLLVM.h
The file was modifiedmlir/include/mlir/Conversion/Passes.h
Commit 36ce915ac54a97d40c8e340afe7d46398d97b4ee by antiagainst
Revert "Revert "[mlir] Convert from Async dialect to LLVM coroutines""

This reverts commit 4986d5eaff359081a867def1c6a2e1147dbb2ad6 with
proper patches to CMakeLists.txt:

- Add MLIRAsync as a dependency to MLIRAsyncToLLVM
- Add Coroutines as a dependency to MLIRExecutionEngine
The file was addedmlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was modifiedmlir/include/mlir/Conversion/Passes.h
The file was addedmlir/lib/ExecutionEngine/AsyncRuntime.cpp
The file was modifiedmlir/lib/ExecutionEngine/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/Async/IR/AsyncOps.td
The file was addedmlir/test/Conversion/AsyncToLLVM/convert-to-llvm.mlir
The file was addedmlir/test/mlir-cpu-runner/async.mlir
The file was addedmlir/include/mlir/ExecutionEngine/AsyncRuntime.h
The file was addedmlir/lib/Conversion/AsyncToLLVM/CMakeLists.txt
The file was modifiedmlir/test/CMakeLists.txt
The file was modifiedmlir/lib/ExecutionEngine/OptUtils.cpp
The file was addedmlir/include/mlir/Conversion/AsyncToLLVM/AsyncToLLVM.h
Commit 099bffe7f7df41d66195ce33e91888a4a16c6b4a by Vedant Kumar
Revert "[CodeExtractor] Don't create bitcasts when inserting lifetime markers (NFCI)"

This reverts commit 26ee8aff2b85ee28a2b2d0b1860d878b512fbdef.

It's necessary to insert bitcast the pointer operand of a lifetime
marker if it has an opaque pointer type.

rdar://70560161
The file was modifiedllvm/test/Transforms/HotColdSplit/lifetime-markers-on-inputs-2.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/lifetime-markers-on-inputs-1.ll
The file was modifiedllvm/lib/Transforms/Utils/CodeExtractor.cpp
The file was modifiedllvm/test/Transforms/CodeExtractor/PartialInlineInvokeProducesOutVal.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/split-phis-in-exit-blocks.ll
Commit da27bebb234641dc248ae1b4972c4070c498dec8 by Vedant Kumar
[test] HotColdSplit: cover use of opaque pointer type

Add a test to cover the case where an extracted block contains a
lifetime marker for a pointer with an opaque type.
The file was addedllvm/test/Transforms/HotColdSplit/lifetime-markers-on-inputs-3.ll
Commit 81e5f298c431555d809f898c196945ca879c1150 by kbobyrev
[clangd] Give the server information about client's remote index protocol version

And also introduce Protobuf package versioning, it will help to deal
with breaking changes. Inroducing package version itself is a breaking
change, clients and servers need to be updated.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D89862
The file was modifiedclang-tools-extra/clangd/index/remote/marshalling/Marshalling.h
The file was modifiedclang-tools-extra/clangd/index/remote/Client.cpp
The file was modifiedclang-tools-extra/clangd/index/remote/Index.proto
The file was modifiedclang-tools-extra/clangd/unittests/remote/MarshallingTests.cpp
The file was modifiedclang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
Commit e7870223d8b586cd89ffc7fddd63bc40447bd3fb by Jan Korous
[SourceManager] Skip module maps when searching files for macro arguments

Differential Revision: https://reviews.llvm.org/D86230
The file was modifiedclang/lib/Basic/SourceManager.cpp
Commit 68486f9c3a509cdb23451a488f16c530919bab70 by kbobyrev
[clangd] Get rid of llvm::Optional in Remote- and LocalIndexRoot; NFC

Reviewed By: kadircet

Differential Revision: https://reviews.llvm.org/D89852
The file was modifiedclang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
The file was modifiedclang-tools-extra/clangd/index/remote/marshalling/Marshalling.h
Commit 17690ee79ad635373438c90d9d27385ed0037faf by nikita.ppv
[BasicAA] Add additional phi tests (NFC)
The file was modifiedllvm/test/Analysis/BasicAA/phi-aa.ll
Commit 04e42f62548d4c0367664188a938b609435718e2 by nikita.ppv
Revert "[GWP-ASan] Move random-related code in the allocator"

This reverts commit 9903b0586cfb76ef2401c342501e61e1bd3daa0f.

Causes build failures (on GCC 10.2) with the following error:

In file included from /home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/combined.h:29,
                 from /home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/allocator_config.h:12,
                 from /home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp:14:
/home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/../../gwp_asan/guarded_pool_allocator.h: In member function ‘bool gwp_asan::GuardedPoolAllocator::shouldSample()’:
/home/nikic/llvm-project/compiler-rt/lib/scudo/standalone/../../gwp_asan/guarded_pool_allocator.h:82:69: error: conversion from ‘uint32_t’ {aka ‘unsigned int’} to ‘unsigned int:31’ may change value [-Werror=conversion]
   82 |           (getRandomUnsigned32() % (AdjustedSampleRatePlusOne - 1)) + 1;
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
The file was modifiedcompiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
The file was addedcompiler-rt/lib/gwp_asan/random.h
The file was modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt
The file was addedcompiler-rt/lib/gwp_asan/random.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/guarded_pool_allocator.h
The file was modifiedcompiler-rt/lib/gwp_asan/options.inc
Commit 57cdc52c4df0a8a6835ddeede787b23c0ce9e358 by spatel
Initial support for vectorization using Libmvec (GLIBC vector math library)

Differential Revision: https://reviews.llvm.org/D88154
The file was modifiedllvm/test/Transforms/Util/add-TLI-mappings.ll
The file was modifiedclang/test/Driver/fveclib.c
The file was addedllvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-finite.ll
The file was addedllvm/test/Transforms/LoopVectorize/X86/libm-vector-calls.ll
The file was modifiedclang/include/clang/Basic/CodeGenOptions.h
The file was addedllvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-VF2-VF8.ll
The file was modifiedllvm/lib/Analysis/TargetLibraryInfo.cpp
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedllvm/include/llvm/Analysis/VecFuncs.def
The file was modifiedclang/test/Driver/autocomplete.c
The file was modifiedllvm/include/llvm/Analysis/TargetLibraryInfo.h
Commit 2b372570ee0be853f61de5feef7fc67b96bf1460 by nikita.ppv
[BasicAA] Don't track visited blocks for phi-phi alias query

We only need the VisitedPhiBBs to disambiguate comparisons of
values from two different loop iterations. If we're comparing
two phis from the same basic block in lock-step, the compared
values will always be on the same iteration.

While this also increases precision, this is mainly intended
to clarify the scope of VisitedPhiBBs.
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/test/Analysis/BasicAA/phi-aa.ll
Commit 0ba98433971f6aa7cf4dc2befe7b5446d25d5956 by Xiangling.Liao
[AIX] Emit error for -G option on AIX

1. Emit error for -G driver option on AIX
2. Adjust cmake file to use -Wl,-G instead of -G

On AIX, legacy XL compiler uses -G to produce a shared object enabled
for use with the run-time linker, which has different meanings from what
it is used for in Clang. And in Clang, other targets do not have -G map
to another functionality in their legacy compiler. So this error is more
important when we are on AIX.

Differential Revision: https://reviews.llvm.org/D89897
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was addedclang/test/Driver/aix-err-options.c
The file was modifiedllvm/CMakeLists.txt
Commit 1882568fcb08ed8af689f13826cc7e84c3c84e33 by nikita.ppv
[BasicAA] Only add visited phi blocks temporarily

Visited phi blocks only need to be added for the duration of the
recursive alias queries, they should not leak into following code.

Once again, while this also improves analysis precision, this is
mainly intended to clarify the applicability scope of VisitedPhiBBs.
The file was modifiedllvm/test/Analysis/BasicAA/phi-aa.ll
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
Commit c0e8c94373b4e97d2eecc53bb16d22e085b73948 by nikita.ppv
[DomTree] Make assert more precise

Per asbirlea's comment, assert that only instructions, constants
and arguments are passed to this API. Simplify returning true
would not be correct for special Value subclasses like MemoryAccess.
The file was modifiedllvm/lib/IR/Dominators.cpp
Commit 3580a45014e90a9895cc2dec28ab2e7f78c47470 by kostyak
[GWP-ASan] Move random-related code in the allocator (redo)

This is a redo of D89908, which triggered some `-Werror=conversion`
errors with GCC due to assignments to the 31-bit variable.

This CL adds to the original one a 31-bit mask variable that is used
at every assignment to silence the warning.

Differential Revision: https://reviews.llvm.org/D89984
The file was modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt
The file was modifiedcompiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
The file was removedcompiler-rt/lib/gwp_asan/random.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/guarded_pool_allocator.h
The file was removedcompiler-rt/lib/gwp_asan/random.h
The file was modifiedcompiler-rt/lib/gwp_asan/options.inc
The file was modifiedcompiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.cpp
Commit 861429160ca74b1530ffa961b60b2b4fdb75eec2 by alexshap
[llvm-objcopy][MachO] Fix the calculation of the output size

Virtual sections do not contribute to the final output size.
This diff fixes the corresponding calculations in the method MachOWriter::totalSize.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D89661
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOWriter.cpp
The file was addedllvm/test/tools/llvm-objcopy/MachO/virtual-section.test
Commit d098bb39aa615c3d3d97e3977dcc70b9de806a3f by Louis Dionne
[libc++] Allow running the tests in the experimental runtimes-only build
The file was modifiedlibcxx/utils/ci/runtimes/CMakeLists.txt
Commit fd14a1f6fff37ef62a35ca0f8bc630ac8b23516d by dblaikie
[clang][Frontend] Add missing error handling

Some early errors during the ASTUnit creation were not transferred to the `FailedParseDiagnostic` so when the code in `LoadFromCommandLine` swaps its content with the content of `StoredDiagnostics` they cannot be retrieved by the user in any way.

Reviewed By: andrewrk, dblaikie

Differential Revision: https://reviews.llvm.org/D78658
The file was modifiedclang/lib/Frontend/ASTUnit.cpp
The file was modifiedclang/unittests/Frontend/ASTUnitTest.cpp
Commit 8277a513c74b53e5ad7f482f76b27bc8609c66ae by Jan Korous
[SourceManager] Avoid copying SLocEntry in computeMacroArgsCache

Follow-up to e7870223d8b5

Differential Revision: https://reviews.llvm.org/D86230
The file was modifiedclang/lib/Basic/SourceManager.cpp
Commit 6f8f5cb77efd100e5d4916db871b18c88cf49ed0 by yitzhakm
[libTooling] Add function to Transformer to create a no-op edit.

This functionality is commonly needed in clang tidy checks (based on
transformer) that only print warnings, without suggesting any edits. The no-op
edit allows the user to associate a diagnostic message with a source location.

Differential Revision: https://reviews.llvm.org/D89961
The file was modifiedclang/include/clang/Tooling/Transformer/RewriteRule.h
The file was modifiedclang/lib/Tooling/Transformer/RewriteRule.cpp
The file was modifiedclang/unittests/Tooling/TransformerTest.cpp
Commit 147b9497e79a98a8614b2b5eb4ba653b44f6b6f0 by Jessica Paquette
[AArch64][GlobalISel] Split post-legalizer combiner to allow for lowering at -O0

There are a lot of combines in AArch64PostLegalizerCombiner which exist to
facilitate instruction matching in the selector. (E.g. matching for G_ZIP and
other shuffle vector pseudos)

It still makes sense to select these instructions at -O0.

Matching earlier in a combiner can reduce complexity in the selector
significantly. For example, a good portion of our selection code for compares
would be a lot easier to represent in a combine.

This patch moves matching combines into a "AArch64PostLegalizerLowering"
combiner which runs at all optimization levels.

Also, while we're here, improve the documentation for the
AArch64PostLegalizerCombiner, and fix up the filepath in its file comment.

And also add a 'r' which somehow got dropped from a bunch of function names.

https://reviews.llvm.org/D89820
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-trn.mir
The file was removedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-zip.mir
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-ext.mir
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-uzp.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64Combine.td
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-rev.mir
The file was modifiedllvm/test/CodeGen/AArch64/O0-pipeline.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetMachine.cpp
The file was removedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-vashr-vlshr.mir
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-vashr-vlshr.mir
The file was removedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-shuffle-splat.mir
The file was removedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-trn.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp
The file was removedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-rev.mir
The file was removedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-ext.mir
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-shuffle-splat.mir
The file was addedllvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/CMakeLists.txt
The file was removedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-uzp.mir
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-zip.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64.h
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
Commit 3fbf9d10fdf21abedfd68bf53ad7098c00c6850c by thakis
[gn build] (semi-manually) port 147b9497e79
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn
Commit ce3c5dae06566eb3ae31e44a459cc8c9cb9e060d by i
[ELF] --warn-backrefs: save the referenced InputFile *

For a diagnostic `A refers to B` where B refers to a bitcode file, if the
symbol gets optimized out, the user may see `A refers to <internal>`; if the
symbol is retained, the user may see `A refers to lto.tmp`.

Save the reference InputFile * in the DenseMap so that the original filename is
available in reportBackrefs().
The file was modifiedlld/ELF/Symbols.cpp
The file was modifiedlld/ELF/Symbols.h
The file was addedlld/test/ELF/lto/warn-backrefs.ll
Commit 19dc9c97804fdb658b06f80b8f6e9115b7542bd5 by Jessica Paquette
[AArch64][GlobalISel] Move imm adjustment for G_ICMP to post-legalizer lowering

Move the code which adjusts the immediate/predicate on a G_ICMP to
AArch64PostLegalizerLowering.

This

- Reduces the number of places we need to test for optimized compares in the
selector. We know that the compare should have been simplified by the time it
hits the selector, so we can avoid testing this in selects, brconds, etc.

- Allows us to potentially fold more compares (previously, this optimization
was only done after calling `tryFoldCompare`, this may allow us to hit some more
TST cases)

- Simplifies the selection code in `emitIntegerCompare` significantly; we can
just use an emitSUBS function.

- Allows us to avoid checking that the predicate has been updated after
`emitIntegerCompare`.

Also add a utility header file for things that may be useful in the selector
and various combiners. No need for an implementation file at this point, since
it's just one constexpr function for now. I've run into a couple cases where
having one of these would be handy, so might as well add it here. There are
a couple functions in the selector that can probably be factored out into
here.

Differential Revision: https://reviews.llvm.org/D89823
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/fold-select.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64Combine.td
The file was addedllvm/lib/Target/AArch64/GISel/AArch64GlobalISelUtils.h
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-adjust-icmp-imm.mir
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/tbz-sgt.mir
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-cbz.mir
The file was removedllvm/test/CodeGen/AArch64/GlobalISel/select-arith-immed-compare.mir
Commit c2730e6b36a1806dcc4fa3e90674b974d5b8931e by dblaikie
DebugInfo: Use llc rather than %llc_dwarf when also hardcoding a target triple
The file was modifiedllvm/test/DebugInfo/X86/convert-debugloc.ll
Commit 93953d411a0fc240e10237fea34aaff43e8f0ff5 by wmi
[NFC][SampleFDO] Move some common stuff from SampleProfileReaderExtBinary/WriterExtBinary
to their parent classes.

SampleProfileReaderExtBinary/SampleProfileWriterExtBinary specify the typical
section layout currently used by SampleFDO. Currently a lot of section
reader/writer stay in the two classes. However, as we expect to have more
types of SampleFDO profiles, we hope those new types of profiles can share
the common sections while configuring their own sections easily with minimal
change. That is why I move some common stuff from
SampleProfileReaderExtBinary/SampleProfileWriterExtBinary to
SampleProfileReaderExtBinaryBase/SampleProfileWriterExtBinaryBase so new
profiles class inheriting from the base class can reuse them.

Differential Revision: https://reviews.llvm.org/D89524
The file was modifiedllvm/include/llvm/ProfileData/SampleProfWriter.h
The file was modifiedllvm/lib/ProfileData/SampleProfWriter.cpp
The file was modifiedllvm/include/llvm/ProfileData/SampleProfReader.h
The file was modifiedllvm/lib/ProfileData/SampleProfReader.cpp
Commit 529ac33197f6408952ae995075ac5e2dc5287e81 by Louis Dionne
[libc++abi] Fix the standalone build after the __config_site change

In 5d796645, we stopped looking at the LIBCXXABI_LIBCXX_INCLUDES variable,
which broke users of the Standalone build. This patch reinstates that
variable, however it must point to the *installed* path of the libc++
headers, not the libc++ headers in the source tree (which has always
been the case, but wasn't enforced before).

If LIBCXXABI_LIBCXX_INCLUDES points to the libc++ headers in the source
tree, the `__config_site` header will fail to be found.
The file was modifiedlibcxxabi/CMakeLists.txt
The file was modifiedlibcxxabi/test/libcxxabi/test/config.py
The file was modifiedlibcxxabi/test/lit.site.cfg.in
Commit 4abaf0ec0a3c5862f4074d126c4b44ef46bc6186 by ndesaulniers
BitCodeFormat: update doc on new byref and mustprogress attrs; NFC

Forked from review of:
https://reviews.llvm.org/D87956
The file was modifiedllvm/docs/BitCodeFormat.rst
Commit af189c8ab113668434eae5c71f174613a9e64625 by richard
Fix constant evaluation of zero-initialization of a union whose first
FieldDecl is an unamed bitfield.

Unnamed bitfields aren't non-static data member, so such a bitfield
isn't actually the first non-static data member.
The file was modifiedclang/lib/AST/ExprConstant.cpp
The file was modifiedclang/test/SemaCXX/constant-expression-cxx11.cpp
Commit e42f6c0ac05bae37be8e2a5fd8861773646eae1b by shenhan
Revert "[MBP] Add whole chain to BlockFilterSet instead of individual BB"

This reverts commit adfb5415010fbbc009a4a6298cfda7a6ed4fa6d4.

This is reverted because it caused an chrome error: https://crbug.com/1140168
The file was removedllvm/test/CodeGen/X86/block_set.ll
The file was modifiedllvm/lib/CodeGen/MachineBlockPlacement.cpp
Commit 3091ed099f2f6a3d16dbdae7d0406f54dfc3031f by tianshilei1992
[OpenMP] Fixed a potential integer overflow

`size_t` has different width on 32- and 64-bit architecture, but the
computation to floor to power of two assumed it is 64-bit, which can cause an
integer overflow. In this patch, architecture detection is added so that the
operation for 64-bit `size_t`. Thank Luke for reporting the issue.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D89878
The file was modifiedopenmp/libomptarget/src/MemoryManager.cpp
Commit b6c6daa95d3aa2206d5a42b46793226f181c3e44 by Duncan P. N. Exon Smith
SourceManager: Factor out helpers for common SLocEntry lookup pattern, NFC

Add helpers `getSLocEntryOrNull`, which handles the `Invalid` logic
around `getSLocEntry`, and `getSLocEntryForFile`, which also checks for
`SLocEntry::isFile`, and use them to reduce repeated code.

Differential Revision: https://reviews.llvm.org/D89503
The file was modifiedclang/include/clang/Basic/SourceManager.h
The file was modifiedclang/lib/Basic/SourceManager.cpp
Commit 168db92465c504974274302a6a1a5d4a1580ccfe by Duncan P. N. Exon Smith
SourceManager: Change SourceManager::isMainFile to take a FileEntry, NFC

`SourceManager::isMainFile` does not use the filename, so it doesn't
need the full `FileEntryRef`; in fact, it's misleading to take the name
because that makes it look relevant. Simplify the API, and in the
process remove some calls to `FileEntryRef::FileEntryRef` in the unit
tests (which were blocking making that private to `SourceManager`).

Differential Revision: https://reviews.llvm.org/D89507
The file was modifiedclang/lib/Basic/SourceManager.cpp
The file was modifiedclang/lib/Lex/PPDirectives.cpp
The file was modifiedclang/unittests/Basic/SourceManagerTest.cpp
The file was modifiedclang/include/clang/Basic/SourceManager.h
Commit 0291e2c9330930bd74bfb8206cf6447a84bf492c by aeubanks
[Inliner] Run always-inliner in inliner-wrapper

An alwaysinline function may not get inlined in inliner-wrapper due to
the inlining order.

Previously for the following, the inliner would first inline @a() into @b(),

```
define void @a() {
entry:
  call void @b()
  ret void
}

define void @b() alwaysinline {
entry:
  br label %for.cond

for.cond:
  call void @a()
  br label %for.cond
}
```

making @b() recursive and unable to be inlined into @a(), ending at

```
define void @a() {
entry:
  call void @b()
  ret void
}

define void @b() alwaysinline {
entry:
  br label %for.cond

for.cond:
  call void @b()
  br label %for.cond
}
```

Running always-inliner first makes sure that we respect alwaysinline in more cases.

Fixes https://bugs.llvm.org/show_bug.cgi?id=46945.

Reviewed By: davidxl, rnk

Differential Revision: https://reviews.llvm.org/D86988
The file was addedllvm/test/Other/new-pm-module-inliner-wrapper.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
The file was addedllvm/test/Transforms/Inline/pr46945.ll
The file was modifiedllvm/test/Other/new-pm-lto-defaults.ll
The file was modifiedllvm/test/Other/new-pm-defaults.ll
The file was modifiedllvm/test/Other/scc-deleted-printer.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
The file was modifiedllvm/lib/Transforms/IPO/Inliner.cpp
The file was modifiedllvm/test/Other/new-pm-thinlto-defaults.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
The file was modifiedllvm/test/Transforms/Inline/inline_stats.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
Commit a89297feb5770c5cd8253fcb976035b0a76deb83 by dblaikie
DebugInfo: Tidy up test for more portability to MachO and Windows

*fingers crossed*
The file was modifiedllvm/test/DebugInfo/X86/convert-debugloc.ll
Commit 27e11d7120c0caa20a167b44ba29828446a525c0 by alexshap
[MC] Adjust StringTableBuilder for linked Mach-O binaries

LD64 emits string tables which start with a space and a zero byte.
This diff adjusts StringTableBuilder for linked Mach-O binaries to match LD64's behavior.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D89561
The file was modifiedllvm/test/tools/llvm-objcopy/MachO/basic-big-endian-64-copy.test
The file was modifiedllvm/test/tools/llvm-objcopy/MachO/symbol-table.test
The file was modifiedllvm/unittests/MC/StringTableBuilderTest.cpp
The file was modifiedllvm/include/llvm/MC/MCMachObjectWriter.h
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp
The file was modifiedllvm/test/tools/llvm-objcopy/MachO/code_signature_lc.test
The file was modifiedllvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.h
The file was modifiedllvm/test/tools/llvm-objcopy/MachO/basic-little-endian-64-copy.test
The file was modifiedllvm/lib/MC/StringTableBuilder.cpp
The file was modifiedllvm/test/tools/llvm-objcopy/MachO/remove-swift-symbols.test
The file was modifiedllvm/test/tools/llvm-objcopy/MachO/segments-vmsize.test
The file was modifiedllvm/include/llvm/MC/StringTableBuilder.h
Commit cf593d224c9c3fc2cf93827cb66fd9e550a6a486 by Duncan P. N. Exon Smith
SourceManager: getFileEntryRefForID => getNonBuiltinFilenameForID, NFC

`SourceManager::getFileEntryRefForID`'s remaining callers just want the
filename component, which is coming from the `FileInfo`. Replace the API
with `getNonBuiltinFilenameForID`, which also removes another use of
`FileEntryRef::FileEntryRef` outside of `FileManager`.

Both callers are collecting file dependencies, and one of them relied on
this API to filter out built-ins (as exposed by
clang/test/ClangScanDeps/modules-full.cpp). It seems nice to continue
providing that service.

Differential Revision: https://reviews.llvm.org/D89508
The file was modifiedclang/lib/Basic/SourceManager.cpp
The file was modifiedclang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
The file was modifiedclang/include/clang/Basic/SourceManager.h
The file was modifiedclang/lib/Frontend/DependencyFile.cpp
Commit 3b8d8954bf2c192502d757019b9fe434864068e9 by Duncan P. N. Exon Smith
SourceManager: Remove a redundant nullptr check in getNonBuiltinFilenameForID, NFC
The file was modifiedclang/lib/Basic/SourceManager.cpp
Commit 3024fe5b55ed72633915f613bd5e2826583c396f by aeubanks
[CGSCC] Detect devirtualization in more cases

The devirtualization wrapper misses cases where if it wraps a pass
manager, an individual pass may devirtualize an indirect call created by
a previous pass. For example, inlining may create a new indirect call
which is devirtualized by instcombine. Currently the devirtualization
wrapper will not see that because it only checks cgscc edges at the very
beginning and end of the pass (manager) it wraps.

This fixes some tests testing this exact behavior in the legacy PM.

This piggybacks off of updateCGAndAnalysisManagerForPass()'s detection
of promoted ref to call edges.

This supercedes one of the previous mechanisms to detect
devirtualization by keeping track of potentially promoted call
instructions via WeakTrackingVHs.

There is one more existing way of detecting devirtualization, by
checking if the number of indirect calls has decreased and the number of
direct calls has increased in a function. It handles cases where calls
to functions without definitions are promoted, and some tests rely on
that. LazyCallGraph doesn't track edges to functions without
definitions so this part can't be removed in this change.

check-llvm and check-clang with -abort-on-max-devirt-iterations-reached
on by default doesn't show any failures outside of tests specifically
testing it so it doesn't needlessly rerun passes more than necessary.
(The NPM -O2/3 pipeline run the inliner/function simplification pipeline
under a devirtualization repeater pass up to 4 times by default).

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D89587
The file was modifiedllvm/test/Transforms/Inline/devirtualize-3.ll
The file was modifiedllvm/test/Transforms/Inline/devirtualize.ll
The file was modifiedllvm/include/llvm/Analysis/CGSCCPassManager.h
The file was addedllvm/test/Transforms/Inline/devirtualize-5.ll
The file was modifiedllvm/lib/Analysis/CGSCCPassManager.cpp
Commit 4437df8eedfdaa11b445c34fc3b19a1b14cb3d93 by dblaikie
DebugInfo: Hash DIE referevences (DW_OP_convert) when computing Split DWARF signatures
The file was modifiedllvm/include/llvm/CodeGen/DIE.h
The file was modifiedllvm/test/DebugInfo/X86/convert-debugloc.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DIEHash.h
Commit 7975b8c38da2f46f8d88c14d24259af28805dbf3 by sepavloff
[IR] Merge metadata manipulation code into Value

Now there are two main classes in Value hierarchy, which support metadata,
these are Instruction and GlobalObject. They implement different APIs for
metadata manipulation, which however overlap. This change moves metadata
manipulation code into Value, so descendant classes can use this code for
their operations on metadata.

No functional changes intended.

Differential Revision: https://reviews.llvm.org/D67626
The file was modifiedllvm/include/llvm/IR/Value.h
The file was modifiedllvm/include/llvm/IR/Instruction.h
The file was modifiedllvm/lib/IR/LLVMContextImpl.cpp
The file was modifiedllvm/lib/IR/Instruction.cpp
The file was modifiedllvm/lib/IR/LLVMContextImpl.h
The file was modifiedllvm/lib/IR/Value.cpp
The file was modifiedllvm/lib/IR/Metadata.cpp
The file was modifiedllvm/include/llvm/IR/GlobalObject.h
The file was modifiedllvm/lib/IR/Core.cpp
Commit a00acbab45b0c407da05bf5c8152018e1857a1f0 by Jonas Devlieghere
[lldb] Fix missing initialization in UtilityFunction ctor (NFC)

The UtilityFunction ctor was dropping the text argument. Probably for
that reason ClangUtilityFunction was setting the parent's member
directly instead of deferring to the parent ctor. Also change the
signatures to take strings which are std::moved in place.
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
The file was modifiedlldb/source/Expression/UtilityFunction.cpp
The file was modifiedlldb/include/lldb/Expression/UtilityFunction.h
Commit 2b9b7b5775a1d8fcd7aa5abaa8fc0bc303434f1a by Louis Dionne
[runtimes] Do not set XXX_STANDALONE_BUILD for libc++/abi/unwind

The runtimes build was lying to the various runtimes builds by setting
XXX_STANDALONE_BUILD=ON when they are really not being built standalone.
Only COMPILER_RT_STANDALONE_BUILD appears to be necessary, but setting it
for the other runtimes actually breaks everything.

Differential Revision: https://reviews.llvm.org/D90005
The file was modifiedllvm/runtimes/CMakeLists.txt
Commit 3590a8319a5fb491cba2349509910c2479f49a00 by Jonas Devlieghere
[lldb] Fix bug instroduced by a00acbab45b0

g_expression_prefix, as the name implies, must be perfixed, not
suffixed.
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
Commit 6e574abf617c504f78f45534bcda65e95787899d by mkazantsev
[SCEV][NFC] Cache symbolic max exit count

We want to have a caching version of symbolic BE exit count
rather than recompute it every time we need it.

Differential Revision: https://reviews.llvm.org/D89954
Reviewed By: nikic, efriedma
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
The file was modifiedllvm/lib/Transforms/Scalar/IndVarSimplify.cpp
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit e2fceec2fd15b7b74617816ddd87f456c42bbc45 by Lang Hames
[JITLink][ELF] Add support for ELF::R_X86_64_REX_GOTPCRELX relocation.

No support for relaxation yet -- this will always use the GOT entry.
The file was modifiedllvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
The file was modifiedllvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_relocations.s
Commit 0f910387e610d6c3e0008da5f5305d42c546cb8c by Lang Hames
Revert "[JITLink][ELF] Add support for ELF::R_X86_64_REX_GOTPCRELX relocation."

This reverts commit e2fceec2fd15b7b74617816ddd87f456c42bbc45.

This commit broke one of the bots. Reverting while I investigate.
The file was modifiedllvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
The file was modifiedllvm/test/ExecutionEngine/JITLink/X86/ELF_x86-64_relocations.s
Commit 310a8e1d1284096fd42499c48a19899ff8b150ee by alexshap
[llvm-objcopy][NFC] Extract arg parsing logic into a helper function

This diff refactors the code which determines the tool type based on
how llvm-objcopy is invoked (objcopy vs strip vs bitcode-strip vs install-name-tool).
NFC.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D89713
The file was modifiedllvm/tools/llvm-objcopy/llvm-objcopy.cpp
Commit 13edfcc97d29574d1d38ded4fa9c2af6e6519472 by david.stenberg
[DebugInfo] Clear subreg in setDebugValueUndef()

When switching the register debug operands to $noreg in
setupDebugValueUndef() also clear the sub-register indices for virtual
registers. This is done when marking DBG_VALUEs undef in other cases,
e.g. in LiveDebugVariables. I have not found any cases where leaving the
sub-register index causes any issues, and the indices would eventually
get dropped when LiveDebugVariables reinserted the undef DBG_VALUEs
after register scheduling, but if nothing else it looked a bit weird in
printouts to have sub-register indices on $noreg, and I don't think the
sub-register index holds any meaningful information at that point.

I have not been able to find any source-level reproducer for this with
an upstream target, so I have just added an instrumented machine-sink
test.

Reviewed By: djtodoro, jmorse

Differential Revision: https://reviews.llvm.org/D89941
The file was modifiedllvm/include/llvm/CodeGen/MachineInstr.h
The file was addedllvm/test/DebugInfo/MIR/X86/machinesink-subreg.mir
Commit 7a78073be7649d9d2a83df50db9ec41b9a26d4f4 by eleviant
[ARM][SchedModels] Let ldm* instruction scheduling use MCSchedPredicate

Differential revision: https://reviews.llvm.org/D89957
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.h
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
The file was modifiedllvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h
The file was modifiedllvm/lib/Target/ARM/ARMScheduleA57.td
The file was modifiedllvm/test/tools/llvm-mca/ARM/cortex-a57-memory-instructions.s
The file was modifiedllvm/lib/Target/ARM/ARMSchedule.td
The file was modifiedllvm/test/tools/llvm-mca/ARM/cortex-a57-basic-instructions.s
Commit ffc0f577dac7097facc6b3e254c0ff73a723738f by eleviant
[llvm-mca] Add test for cortex-a57 NEON instructions
The file was addedllvm/test/tools/llvm-mca/ARM/cortex-a57-neon-instructions.s
Commit 241563647555e48cfa96146dd19d00e5aadbc518 by caroline.concatto
[SVE]Clarify TypeSize comparisons in llvm/lib/Transforms

Use isKnownXY comparators when one of the operands can be with
scalable vectors or getFixedSize() for all the other cases.

This patch also does bug fixes for getPrimitiveSizeInBits by using
getFixedSize() near the places with the TypeSize comparison.

Differential Revision: https://reviews.llvm.org/D89703
The file was modifiedllvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
The file was modifiedllvm/lib/Transforms/Scalar/NaryReassociate.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
The file was modifiedllvm/lib/Transforms/Scalar/LoopPredication.cpp
The file was modifiedllvm/lib/Transforms/IPO/GlobalOpt.cpp
Commit 86a480e9ce786bc55c1c9632d9a42c08846e4695 by jay.foad
[AMDGPU] Add simplification/combines for llvm.amdgcn.fmul.legacy

Differential Revision: https://reviews.llvm.org/D88955
The file was modifiedllvm/include/llvm/IR/PatternMatch.h
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
The file was addedllvm/test/Transforms/InstCombine/AMDGPU/fmul_legacy.ll
Commit 342040bf00743cd401f01667dcf54315c64f09e9 by james.henderson
[lld][ELF][test] Add additional test coverage for LTO

These are all inspired by existing test coverage we have in an internal
testsuite.

Reviewed by: grimar, MaskRay

Differential Revision: https://reviews.llvm.org/D89775
The file was removedlld/test/ELF/lto/Inputs/resolution.s
The file was modifiedlld/test/ELF/lto/resolution.ll
The file was removedlld/test/ELF/lto/Inputs/common.s
The file was addedlld/test/ELF/lto/non-ascii-filenames.ll
The file was addedlld/test/ELF/lto/bitcode-wrapper.ll
The file was modifiedlld/test/ELF/lto/common.ll
Commit fea067bdfde430a74de077f1f61ef1f8a43d9c30 by orlando.hyams
[mem2reg] Remove dbg.values describing contents of dead allocas

This patch copies @vsk's fix to instcombine from D85555 over to mem2reg. The
motivation and rationale are exactly the same: When mem2reg removes an alloca,
it erases the dbg.{addr,declare} instructions which refer to the alloca. It
would be better to instead remove all debug intrinsics which describe the
contents of the dead alloca, namely all dbg.value(<dead alloca>, ...,
DW_OP_deref)'s.

As far as I can tell, prior to D80264 these `dbg.value+deref`s would have been
silently dropped instead of being made `undef`, so we're just returning to
previous behaviour with these patches.

Testing:
`llvm-lit llvm/test` and `ninja check-clang` gave no unexpected failures. Added
3 tests, each of which covers a dbg.value deletion path in mem2reg:
  mem2reg-promote-alloca-1.ll
  mem2reg-promote-alloca-2.ll
  mem2reg-promote-alloca-3.ll
The first is based on the dexter test inlining.c from D89543. This patch also
improves the debugging experience for loop.c from D89543, which suffers
similarly after arg promotion instead of inlining.
The file was modifiedllvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
The file was addedllvm/test/DebugInfo/Generic/mem2reg-promote-alloca-2.ll
The file was addedllvm/test/DebugInfo/Generic/mem2reg-promote-alloca-3.ll
The file was addedllvm/test/DebugInfo/Generic/mem2reg-promote-alloca-1.ll
Commit ff87c4d3e773ae89ae62af20941339f0f252dafd by csigg
[mlir] Fix exiting OpPatternRewriteDriver::simplifyLocally after first iteration that didn't change the op.

Before this change, we would run `maxIterations` if the first iteration changed the op.
After this change, we exit the loop as soon as an iteration hasn't changed the op.
Assuming that we have reached a fixed point when an iteration doesn't change the op, this doesn't affect correctness.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D89981
The file was modifiedmlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
Commit 0d1d363c51c93614783755426cb58c819c164fab by julian.gross
[MLIR] Added PromoteBuffersToStackPass to convert heap- to stack-based allocations.

Added optimization pass to convert heap-based allocs to stack-based allocas in
buffer placement. Added the corresponding test file.

Differential Revision: https://reviews.llvm.org/D89688
The file was modifiedmlir/include/mlir/Transforms/Passes.h
The file was modifiedmlir/lib/Transforms/BufferOptimizations.cpp
The file was addedmlir/test/Transforms/promote-buffers-to-stack.mlir
The file was modifiedmlir/include/mlir/Transforms/Passes.td
Commit ab93e710652f764bf2ab51710980e7828ebe4a8b by jeremy.morse
[DebugInstrRef] NFC: Separate collection of machine/variable values

This patch adjusts _when_ something happens in LiveDebugValues /
InstrRefBasedLDV, to make it more amenable to dealing with DBG_INSTR_REF
instructions. There's no functional change.

In the current InstrRefBasedLDV implementation, we collect the machine
value-number transfer function for blocks at the same time as the
variable-value transfer function. After solving machine value numbers, the
variable-value transfer function is updated so that DBG_VALUEs of live-in
registers have the correct value. The same would need to be done for
DBG_INSTR_REFs, to connect instruction-references with machine value
numbers.

Rather than writing more code for that, this patch separates the two: we
collect the (machine-value-number) transfer function and solve for
machine value numbers, then step through the MachineInstrs again collecting
the variable value transfer function. This simplifies things for the new
few patches.

Differential Revision: https://reviews.llvm.org/D85760
The file was modifiedllvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
Commit dae7b10034a515a34aca593fee24d5b73dc0785f by mgorny
[lldb] Split out NetBSD/x86 watchpoint impl for unification

Split the current NetBSD watchpoint implementation for x86 into Utility,
and revamp it to improve readability.  This code is meant to be used
as a common class for all x86 watchpoint implementation, particularly
these on FreeBSD and Linux.

The code uses global watchpoint enable bits, as required by the NetBSD
kernel.  If it ever becomes necessary for any platform to use local
enable bits instead, this can be trivially abstracted out.

The code also postpones clearing DR6 until a new different watchpoint
is being set in place of the old one.  This is necessary since LLDB
repeatedly reenables watchpoints on all threads, by clearing
and restoring them.  When DR6 is cleared as a part of that, then pending
events on other threads can no longer be associated with watchpoints
correctly.

Differential Revision: https://reviews.llvm.org/D89874
The file was modifiedlldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
The file was addedlldb/source/Plugins/Process/Utility/NativeRegisterContextWatchpoint_x86.cpp
The file was modifiedlldb/include/lldb/Host/common/NativeRegisterContext.h
The file was modifiedlldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
The file was addedlldb/source/Plugins/Process/Utility/NativeRegisterContextWatchpoint_x86.h
The file was modifiedlldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
The file was modifiedlldb/source/Host/common/NativeRegisterContext.cpp
The file was modifiedlldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
The file was modifiedlldb/source/Plugins/Process/Utility/CMakeLists.txt
Commit 0fcc6f7a7607b3bf80e67b9f9a07b608724ee031 by flo
[AArch64] Implement getIntrinsicInstrCost, handle min/max intrinsics.

This patch adds a specialized implementation of getIntrinsicInstrCost
and add initial cost-modeling for min/max vector intrinsics.

AArch64 NEON support umin/smin/umax/smax for vectors
<8 x i8>, <16 x i8>, <4 x i16>, <8 x i16>, <2 x i32> and <4 x i32>.
Notably, it does not support vectors with i64 elements.

This change by itself should have very little impact on codegen, but in
follow-up patches I plan to teach the vectorizers to consider using
those intrinsics on platforms where it is profitable, e.g. because there
is no general 'select'-like instruction.

The current cost returned should be better for throughput, latency and size.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D89953
The file was modifiedllvm/test/Analysis/CostModel/AArch64/min-max.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
Commit cb86522c9450d909863d36cd73dae2586f82fcdb by eleviant
[ARM][SchedModels] Convert IsR1P0AndLaterPred to MCSchedPredicate. NFC

Differential revision: https://reviews.llvm.org/D90017
The file was modifiedllvm/lib/Target/ARM/ARMScheduleA57.td
Commit 936ef89ebe8646c483b993d8d8e50ee9509e005d by llvm-dev
[X86] lowerShuffleWithPERMV - use MVT::changeTypeToInteger helper. NFCI.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 19a13bf538b30fa67fc4a381fb25d150cc5a9989 by llvm-dev
[InstCombine] Rename InstCombinerImpl::matchBSwap to matchBSwapOrBitReverse. NFCI.

This matches bswap and bitreverse intrinsics, so we should make that clear in the function name.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineInternal.h
Commit 1cab3bf0046117759cc7891eec66affbbeb5965c by llvm-dev
[InstCombine] matchBSwapOrBitReverse - expose bswap/bitreverse matching flags.

matchBSwapOrBitReverse was hardcoded to just match bswaps - we're going to need to expose the ability to match bitreverse as well, so make this part of the function call.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineInternal.h
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
Commit 448f25c86b79aebae90718938b6a2cb4c782e57d by zhanghb97
[mlir] Expose affine expression to C API

This patch provides C API for MLIR affine expression.
- Implement C API for methods of AffineExpr class.
- Implement C API for methods of derived classes (AffineBinaryOpExpr, AffineDimExpr, AffineSymbolExpr, and AffineConstantExpr).

Differential Revision: https://reviews.llvm.org/D89856
The file was modifiedmlir/lib/CAPI/IR/CMakeLists.txt
The file was addedmlir/include/mlir-c/AffineExpr.h
The file was modifiedmlir/include/mlir/IR/AffineExpr.h
The file was addedmlir/lib/CAPI/IR/AffineExpr.cpp
The file was addedmlir/include/mlir/CAPI/AffineExpr.h
The file was modifiedmlir/test/CAPI/ir.c