FailedChanges

Summary

  1. [mlir][gpu] NFC: switch occurrences of gpu.launch_func to custom format. (details)
  2. [MemProf] Allow the binary to specify the profile output filename (details)
  3. [mlir] Do not start threads in AsyncRuntime (details)
  4. [lldb] Fix a regression introduced by D75730 (details)
  5. [LoopRotate][NPM] Disable header duplication under -Oz (details)
  6. [NFC][MC] Use MCRegister for ReachingDefAnalysis APIs (details)
  7. [HIP] Fix HIP rounding math intrinsics (details)
  8. [OpenCL] Remove unused extensions (details)
  9. [lldb/DWARF] Add support for DW_OP_implicit_value (details)
  10. [Docs] Clarify that FunctionPasses can't add/remove declarations (details)
  11. [gn build] Add missing clangd dependencies (details)
  12. [AMDGPU] Add amdgpu specific loop threshold metadata (details)
  13. [SLP] Add tests with selects that can be turned into min/max. (details)
  14. [DomTree] Accept Value as Def (NFC) (details)
  15. Revert "[lldb] Explicitly use the configuration architecture when building test executables" (details)
  16. [ELF] Set SHF_INFO_LINK for .rel[a].plt and .rel[a].dyn (details)
  17. Revert "[Docs] Clarify that FunctionPasses can't add/remove declarations" (details)
  18. AMDGPU: Cleanup MIR test (details)
  19. [InstCombine] Remove dbg.values describing contents of dead allocas (details)
  20. [TableGen] Update documents to make them more complete (details)
  21. clang/Basic: Remove ContentCache::getRawBuffer, NFC (details)
  22. [SystemZ][z/OS] Set short-enums as the default for z/OS (details)
  23. [InstSimplify] add tests for ctpop constant range; NFC (details)
  24. HowToReleaseLLVM: Clean up document and remove references to SVN (details)
  25. [NFC][PartialInliner]: Clean up code (details)
  26. [MemCpyOpt] Move GEP during call slot optimization (details)
  27. [PatternMatch] Add new FP matchers. NFC. (details)
  28. [InstCombine][NFC] Use ConstantExpr::getBinOpIdentity (details)
  29. [libc++] Drop old workaround for iostreams instantiations missing from the dylib (details)
  30. [GWP-ASan] Move random-related code in the allocator (details)
  31. DWARFv5: Disable DW_OP_convert for configurations that don't yet support it (details)
  32. Port -instnamer to NPM (details)
  33. Revert "[mlir] Convert from Async dialect to LLVM coroutines" (details)
  34. Revert "Revert "[mlir] Convert from Async dialect to LLVM coroutines"" (details)
  35. Revert "[CodeExtractor] Don't create bitcasts when inserting lifetime markers (NFCI)" (details)
  36. [test] HotColdSplit: cover use of opaque pointer type (details)
  37. [clangd] Give the server information about client's remote index protocol version (details)
  38. [SourceManager] Skip module maps when searching files for macro arguments (details)
  39. [clangd] Get rid of llvm::Optional in Remote- and LocalIndexRoot; NFC (details)
  40. [BasicAA] Add additional phi tests (NFC) (details)
  41. Revert "[GWP-ASan] Move random-related code in the allocator" (details)
  42. Initial support for vectorization using Libmvec (GLIBC vector math library) (details)
  43. [BasicAA] Don't track visited blocks for phi-phi alias query (details)
  44. [AIX] Emit error for -G option on AIX (details)
  45. [BasicAA] Only add visited phi blocks temporarily (details)
  46. [DomTree] Make assert more precise (details)
  47. [GWP-ASan] Move random-related code in the allocator (redo) (details)
Commit 9ab5362baba6770384821d9c59cfedb9c418d7e4 by csigg
[mlir][gpu] NFC: switch occurrences of gpu.launch_func to custom format.

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D89929
The file was modifiedmlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/if.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/builtins.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/subf.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/addi.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/simple.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/mulf.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/time.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/addi8.mlir
The file was modifiedmlir/test/Conversion/GPUToVulkan/lower-gpu-launch-vulkan-launch.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/addf.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/load-store.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/loop.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/module-structure-opencl.mlir
Commit 5c20d7db9f2791367b9311130eb44afecb16829c by tejohnson
[MemProf] Allow the binary to specify the profile output filename

This will allow the output directory to be specified by a build time
option, similar to the directory specified for regular PGO profiles via
-fprofile-generate=. The memory profiling instrumentation pass will
set up the variable. This is the same mechanism used by the PGO
instrumentation and runtime.

Depends on D87120 and D89629.

Differential Revision: https://reviews.llvm.org/D89086
The file was modifiedcompiler-rt/lib/memprof/memprof_rtl.cpp
The file was modifiedcompiler-rt/lib/memprof/weak_symbols.txt
The file was modifiedcompiler-rt/lib/memprof/memprof_interface_internal.h
The file was modifiedcompiler-rt/test/memprof/TestCases/log_path_test.cpp
Commit a8b0ae3bddee311cbc97801089a95702f32773f8 by ezhulenev
[mlir] Do not start threads in AsyncRuntime

pthreads is not enabled for all builds by default

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D89967
The file was modifiedmlir/lib/ExecutionEngine/AsyncRuntime.cpp
Commit 826997c46280351861be43522d4a022d8fdbc466 by Jonas Devlieghere
[lldb] Fix a regression introduced by D75730

In a new Range class was introduced to simplify and the Disassembler API
and reduce duplication. It unintentionally broke the
SBFrame::Disassemble functionality because it unconditionally converts
the number of instructions to a Range{Limit::Instructions,
num_instructions}. This is subtly different from the previous behavior,
where now we're passing a Range and assume it's valid in the callee, the
original code would propagate num_instructions and the callee would
compare the value and decided between disassembling instructions or
bytes.

Unfortunately the existing tests was not particularly strict:

  disassembly = frame.Disassemble()
  self.assertNotEqual(len(disassembly), 0, "Disassembly was empty.")

This would pass because without this patch we'd disassemble zero
instructions, resulting in an error:

  (lldb) script print(lldb.frame.Disassemble())
  error: error reading data from section __text

Differential revision: https://reviews.llvm.org/D89925
The file was modifiedlldb/test/API/commands/disassemble/basic/main.cpp
The file was modifiedlldb/include/lldb/Core/Disassembler.h
The file was modifiedlldb/test/API/commands/disassemble/basic/TestFrameDisassemble.py
The file was modifiedlldb/source/Core/Disassembler.cpp
The file was modifiedlldb/source/Target/StackFrame.cpp
Commit cb9ca3597727bb323576972a6a74b5897125b41a by aeubanks
[LoopRotate][NPM] Disable header duplication under -Oz

It was already disabled under -Oz in
buildFunctionSimplificationPipeline(), but not in
buildModuleOptimizationPipeline()/addPGOInstrPasses().

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D89927
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/test/Transforms/LoopRotate/oz-disable.ll
Commit e24537d48fb382fd651154749634b4e6332e52f9 by mtrofin
[NFC][MC] Use MCRegister for ReachingDefAnalysis APIs

Also updated the users of the APIs; and a drive-by small change to
RDFRegister.cpp

Differential Revision: https://reviews.llvm.org/D89912
The file was modifiedllvm/include/llvm/CodeGen/ReachingDefAnalysis.h
The file was modifiedllvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
The file was modifiedllvm/lib/CodeGen/BreakFalseDeps.cpp
The file was modifiedllvm/lib/CodeGen/ReachingDefAnalysis.cpp
The file was modifiedllvm/lib/CodeGen/RDFRegisters.cpp
Commit b2524eb9445a4487115c8f94fd946d2c4c95f652 by enye.shi
[HIP] Fix HIP rounding math intrinsics

The __ocml_*_rte_f32 and __ocml_*_rte_f64 functions are not
available if OCML_BASIC_ROUNDED_OPERATIONS is not defined.

Reviewed By: b-sumner, yaxunl

Fixes: SWDEV-257235

Differential Revision: https://reviews.llvm.org/D89966
The file was modifiedclang/lib/Headers/__clang_hip_math.h
Commit a779a169931c0738bf43dc50fc545c1e88597e92 by marco.antognini
[OpenCL] Remove unused extensions

Many non-language extensions are defined but also unused. This patch
removes them with their tests as they do not require compiler support.

The cl_khr_select_fprounding_mode extension is also removed because it
has been deprecated since OpenCL 1.1 and Clang doesn't have any specific
support for it.

The cl_khr_context_abort extension is only referred to in "The OpenCL
Specification", version 1.2 and 2.0, in Table 4.3, but no specification
is provided in "The OpenCL Extension Specification" for these versions.
Because it is both unused in Clang and lacks specification, this
extension is removed.

The following extensions are platform extensions that bring new OpenCL
APIs but do not impact the kernel language nor require compiler support.
They are therefore removed.

- cl_khr_gl_sharing, introduced in OpenCL 1.0

- cl_khr_icd, introduced in OpenCL 1.2

- cl_khr_gl_event, introduced in OpenCL 1.1
Note: this extension adds a new API to create cl_event but it also
specifies that these can only be used by clEnqueueAcquireGLObjects.
Hence, they cannot be used on the device side and the extension does
not impact the kernel language.

- cl_khr_d3d10_sharing, introduced in OpenCL 1.1

- cl_khr_d3d11_sharing, introduced in OpenCL 1.2

- cl_khr_dx9_media_sharing, introduced in OpenCL 1.2

- cl_khr_image2d_from_buffer, introduced in OpenCL 1.2

- cl_khr_initialize_memory, introduced in OpenCL 1.2

- cl_khr_gl_depth_images, introduced in OpenCL 1.2
Note: this extension is related to cl_khr_depth_images but only the
latter adds new features to the kernel language.

- cl_khr_spir, introduced in OpenCL 1.2

- cl_khr_egl_event, introduced in OpenCL 1.2
Note: this extension adds a new API to create cl_event but it also
specifies that these can only be used by clEnqueueAcquire* API
functions. Hence, they cannot be used on the device side and the
extension does not impact the kernel language.

- cl_khr_egl_image, introduced in OpenCL 1.2

- cl_khr_terminate_context, introduced in OpenCL 1.2

The minimum required OpenCL version used in OpenCLExtensions.def for
these extensions is not always correct. Removing these address that
issue.

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D89372
The file was modifiedclang/lib/Basic/Targets/AMDGPU.h
The file was modifiedclang/test/Misc/nvptx.languageOptsOpenCL.cl
The file was modifiedclang/test/SemaOpenCL/extension-version.cl
The file was modifiedclang/include/clang/Basic/OpenCLExtensions.def
The file was modifiedclang/lib/Basic/Targets/NVPTX.h
The file was modifiedclang/test/Misc/r600.languageOptsOpenCL.cl
The file was modifiedclang/test/Misc/amdgcn.languageOptsOpenCL.cl
Commit efe62b637d51f6d622589132075320dd4f687478 by medismail.bennani
[lldb/DWARF] Add support for DW_OP_implicit_value

This patch completes https://reviews.llvm.org/D83560. Now that the
compiler can emit `DW_OP_implicit_value` into DWARF expressions, lldb
needed to learn reading these opcodes for variable inspection and
expression evaluation.

This implicit location descriptor specifies an immediate value with two
operands: the length (ULEB128) followed by a block representing the value
in the target memory representation.

rdar://67406091

Differential revision: https://reviews.llvm.org/D89842

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/source/Expression/DWARFExpression.cpp
The file was modifiedlldb/unittests/Expression/DWARFExpressionTest.cpp
Commit 710676cf3a3c6f6ddf2f18e24cac017d20dac1ff by aeubanks
[Docs] Clarify that FunctionPasses can't add/remove declarations

In preparation for potential future concurrency, a FunctionPass
shouldn't modify anything at the module level that other FunctionPasses
can also modify.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D89890
The file was modifiedllvm/docs/WritingAnLLVMPass.rst
Commit af3c51e3546eccff714ec146fb8daf18177e2028 by aeubanks
[gn build] Add missing clangd dependencies

Fixes
$ ninja obj/build/rel/gen/clang-tools-extra/clangd/CompletionModel.CompletionModel.obj

Some tablegen include files from clang/include/clang/AST and
clang/include/clang/Sema need to be generated before CompletionModel is
compiled.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D89657
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clangd/quality/gen_decision_forest.gni
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
Commit 3c1273d7378e1d51abf9b43c764ccb9828e4a26a by tcorring
[AMDGPU] Add amdgpu specific loop threshold metadata

Add new loop metadata amdgpu.loop.unroll.threshold to allow the initial AMDGPU
specific unroll threshold value to be specified on a loop by loop basis.

The intention is to be able to to allow more nuanced hints, e.g. specifying a
low threshold value to indicate that a loop may be unrolled if cheap enough
rather than using the all or nothing llvm.loop.unroll.disable metadata.

Differential Revision: https://reviews.llvm.org/D84779
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
The file was addedllvm/test/Transforms/LoopUnroll/AMDGPU/unroll-threshold.ll
Commit d842b8868771a9b6b039144c1f7550adec245f0c by flo
[SLP] Add tests with selects that can be turned into min/max.

AArch64 does not have a flexible vector select instruction. In some
cases, the selects can be turned into min/max however, for which there
are dedicated vector instructions on AArch64.

This patch adds some tests for such cases.
The file was addedllvm/test/Transforms/SLPVectorizer/AArch64/vectorizable-selects-min-max.ll
Commit 32b6e9a450fff59690a3a7c828524c176d8b855e by nikita.ppv
[DomTree] Accept Value as Def (NFC)

Non-instruction defs like arguments, constants or global values
always dominate all instructions/uses inside the function. This
case currently needs to be treated separately by the caller, see
https://reviews.llvm.org/D89623#inline-832818 for an example.

This patch makes the dominator tree APIs accept a Value instead of
an Instruction and always returns true for the non-Instruction case.

A complication here is that BasicBlocks are also Values. For that
reason we can't support the dominates(Value *, BasicBlock *)
variant, as it would conflict with dominates(BasicBlock *, BasicBlock *),
which has different semantics. For the other two APIs we assert
that the passed value is not a BasicBlock.

Differential Revision: https://reviews.llvm.org/D89632
The file was modifiedllvm/include/llvm/IR/Dominators.h
The file was modifiedllvm/unittests/IR/DominatorTreeTest.cpp
The file was modifiedllvm/lib/IR/Dominators.cpp
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/lldbtest.py
The file was modifiedlldb/packages/Python/lldbsuite/test/builders/builder.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/arm-combined-dynrel-ifunc.s
The file was modifiedlld/test/ELF/gnu-ifunc-i386.s
The file was modifiedlld/test/ELF/gnu-ifunc.s
The file was modifiedlld/test/ELF/dynamic-reloc.s
The file was modifiedlld/test/ELF/aarch64-gnu-ifunc.s
The file was modifiedlld/test/ELF/arm-gnu-ifunc.s
The file was modifiedlld/ELF/SyntheticSections.cpp
The file was modifiedlld/test/ELF/x86-64-combined-dynrel.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 modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was addedllvm/test/Transforms/InstCombine/erase-dbg-values-at-dead-alloc-site.ll
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/BackEnds.rst
The file was modifiedllvm/docs/TableGen/index.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-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp
The file was modifiedclang/include/clang/Basic/SourceManager.h
The file was modifiedclang/lib/Basic/SourceManager.cpp
The file was modifiedclang/lib/Serialization/ASTReader.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 addedclang/test/Driver/zos-driver-defaults.c
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
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/istream
The file was modifiedlibcxx/include/ostream
The file was modifiedlibcxx/include/streambuf
The file was modifiedlibcxx/include/__config
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 modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt
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
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 modifiedcompiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
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/DwarfDebug.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.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/DwarfUnit.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfExpression.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 modifiedllvm/test/Transforms/InstNamer/basic.ll
The file was addedllvm/include/llvm/Transforms/Utils/InstructionNamer.h
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 removedmlir/include/mlir/Conversion/AsyncToLLVM/AsyncToLLVM.h
The file was modifiedmlir/include/mlir/Conversion/Passes.h
The file was removedmlir/lib/ExecutionEngine/AsyncRuntime.cpp
The file was removedmlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
The file was removedmlir/test/mlir-cpu-runner/async.mlir
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was removedmlir/include/mlir/ExecutionEngine/AsyncRuntime.h
The file was removedmlir/test/Conversion/AsyncToLLVM/convert-to-llvm.mlir
The file was removedmlir/lib/Conversion/AsyncToLLVM/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/Async/IR/AsyncOps.td
The file was modifiedmlir/lib/ExecutionEngine/OptUtils.cpp
The file was modifiedmlir/test/CMakeLists.txt
The file was modifiedmlir/lib/ExecutionEngine/CMakeLists.txt
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/CMakeLists.txt
The file was addedmlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was modifiedmlir/include/mlir/Conversion/Passes.h
The file was modifiedmlir/lib/ExecutionEngine/OptUtils.cpp
The file was addedmlir/include/mlir/Conversion/AsyncToLLVM/AsyncToLLVM.h
The file was addedmlir/include/mlir/ExecutionEngine/AsyncRuntime.h
The file was modifiedmlir/test/CMakeLists.txt
The file was addedmlir/test/mlir-cpu-runner/async.mlir
The file was addedmlir/lib/ExecutionEngine/AsyncRuntime.cpp
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was modifiedmlir/lib/ExecutionEngine/CMakeLists.txt
The file was addedmlir/test/Conversion/AsyncToLLVM/convert-to-llvm.mlir
The file was modifiedmlir/include/mlir/Dialect/Async/IR/AsyncOps.td
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-1.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/lifetime-markers-on-inputs-2.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/split-phis-in-exit-blocks.ll
The file was modifiedllvm/lib/Transforms/Utils/CodeExtractor.cpp
The file was modifiedllvm/test/Transforms/CodeExtractor/PartialInlineInvokeProducesOutVal.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.cpp
The file was modifiedclang-tools-extra/clangd/unittests/remote/MarshallingTests.cpp
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/index/remote/marshalling/Marshalling.h
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 addedcompiler-rt/lib/gwp_asan/random.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/guarded_pool_allocator.h
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 addedcompiler-rt/lib/gwp_asan/random.h
The file was modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt
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 modifiedllvm/include/llvm/Analysis/VecFuncs.def
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def
The file was modifiedclang/include/clang/Basic/CodeGenOptions.h
The file was modifiedclang/test/Driver/autocomplete.c
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
The file was modifiedllvm/include/llvm/Analysis/TargetLibraryInfo.h
The file was modifiedclang/include/clang/Driver/Options.td
The file was addedllvm/test/Transforms/LoopVectorize/X86/libm-vector-calls-VF2-VF8.ll
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/test/Driver/fveclib.c
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedllvm/lib/Analysis/TargetLibraryInfo.cpp
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 modifiedllvm/CMakeLists.txt
The file was addedclang/test/Driver/aix-err-options.c
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
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/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/test/Analysis/BasicAA/phi-aa.ll
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/guarded_pool_allocator.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
The file was modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt
The file was removedcompiler-rt/lib/gwp_asan/random.cpp
The file was removedcompiler-rt/lib/gwp_asan/random.h
The file was modifiedcompiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp