LLVM/project 578741bllvm/lib/Target/AMDGPU AMDGPUAttributor.cpp, llvm/test/CodeGen/AMDGPU propagate-waves-per-eu.ll annotate-kernel-features-hsa-call.ll

[AMDGPU][Attributor] Rework update of `AAAMDWavesPerEU` (#123995)

Currently, we use `AAAMDWavesPerEU` to iteratively update values based
on attributes from the associated function, potentially propagating
user-annotated values, along with `AAAMDFlatWorkGroupSize`. Similarly,
we have `AAAMDFlatWorkGroupSize`. However, since the value calculated
through the flat workgroup size always dominates the user annotation
(i.e., the attribute), running `AAAMDWavesPerEU` iteratively is
unnecessary if no user-annotated value exists.

This PR completely rewrites how the `amdgpu-waves-per-eu` attribute is
handled in `AMDGPUAttributor`. The key changes are as follows:

- `AAAMDFlatWorkGroupSize` remains unchanged.
- `AAAMDWavesPerEU` now only propagates user-annotated values.
- A new function is added to check and update `amdgpu-waves-per-eu`
based on the following rules:
- No waves per eu, no flat workgroup size: Assume a flat workgroup size
of `1,1024` and compute waves per eu based on this.

    [22 lines not shown]
DeltaFile
+94-48llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
+39-40llvm/test/CodeGen/AMDGPU/propagate-waves-per-eu.ll
+34-36llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa-call.ll
+25-27llvm/test/CodeGen/AMDGPU/attr-amdgpu-max-num-workgroups-propagate.ll
+14-13llvm/test/CodeGen/AMDGPU/amdgpu-attributor-no-agpr.ll
+13-13llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa.ll
+219-17727 files not shown
+341-27933 files

LLVM/project f14a088mlir/lib/Dialect/SparseTensor/Transforms/Utils SparseTensorDescriptor.cpp

[mlir][SparseTensor] Fix type conversion rule
DeltaFile
+5-4mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorDescriptor.cpp
+5-41 files

LLVM/project e66cecdclang/lib/AST Expr.cpp

[clang][NFC] Clean up Expr::isTemporaryObject() (#140229)

DeltaFile
+3-3clang/lib/AST/Expr.cpp
+3-31 files

LLVM/project cb78eb0mlir/lib/Transforms/Utils DialectConversion.cpp

[mlir][Transforms] Check for correct type converter rule implementation
DeltaFile
+5-0mlir/lib/Transforms/Utils/DialectConversion.cpp
+5-01 files

LLVM/project 9523062bolt/lib/Passes PettisAndHansen.cpp

[BOLT] Use llvm::max_element (NFC) (#140342)

DeltaFile
+4-5bolt/lib/Passes/PettisAndHansen.cpp
+4-51 files

LLVM/project 70adb5f

Revert "[mlir][bufferization] implement BufferizableOpInterface for concat op…"

This reverts commit 6d9ce6767d259a5231ae312a19459f8fea3bd0ca.
DeltaFile
+0-00 files

LLVM/project 7b8bc1bmlir/lib/Dialect/Tensor/IR TensorDialect.cpp, mlir/lib/Dialect/Tensor/Transforms BufferizableOpInterfaceImpl.cpp

Revert "[mlir][bufferization] implement BufferizableOpInterface for concat op (#140171)"

This reverts commit 6d9ce6767d259a5231ae312a19459f8fea3bd0ca.

Multiple builtbot failures have been reported:
https://github.com/llvm/llvm-project/pull/140171
DeltaFile
+0-129mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp
+0-91mlir/test/Dialect/Tensor/bufferize.mlir
+2-2mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp
+2-2223 files

LLVM/project 6d9ce67mlir/lib/Dialect/Tensor/IR TensorDialect.cpp, mlir/lib/Dialect/Tensor/Transforms BufferizableOpInterfaceImpl.cpp

[mlir][bufferization] implement BufferizableOpInterface for concat op (#140171)

Lowers `tensor.concat` to an alloc with a series of `memref.copy` ops to
copy the operands to the alloc.

Example:

```mlir
func.func @tensor.concat(%f: tensor<8xf32>) -> tensor<16xf32> {
  %t = tensor.concat dim(0) %f, %f : (tensor<8xf32>, tensor<8xf32>) -> tensor<16xf32>
  return %t : tensor<16xf32>
}
```

Produces

```mlir
module {
  func.func @tensor.concat(%arg0: tensor<8xf32>) -> tensor<16xf32> {

    [28 lines not shown]
DeltaFile
+129-0mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp
+91-0mlir/test/Dialect/Tensor/bufferize.mlir
+2-2mlir/lib/Dialect/Tensor/IR/TensorDialect.cpp
+222-23 files

LLVM/project 6963309clang/lib/Frontend CompilerInvocation.cpp

[Frontend] Avoid creating a temporary instance of std::string (NFC) (#140326)

Since getLastArgValue returns StringRef, and the constructor of
SmallString accepts StringRef, we do not need to go through a
temporary instance of std::string.
DeltaFile
+1-2clang/lib/Frontend/CompilerInvocation.cpp
+1-21 files

LLVM/project dfac044lldb/tools/lldb-dap EventHelper.cpp JSONUtils.cpp, lldb/tools/lldb-dap/Handler EvaluateRequestHandler.cpp ExceptionInfoRequestHandler.cpp

[lldb-dap] Avoid creating temporary instances of std::string (NFC) (#140325)

EmplaceSafeString accepts StringRef for the last parameter, str, and
then internally creates a copy of str via StringRef::str or
llvm::json::fixUTF8, so caller do not need to create their own
temporary instances of std::string.
DeltaFile
+1-1lldb/tools/lldb-dap/EventHelper.cpp
+1-1lldb/tools/lldb-dap/Handler/EvaluateRequestHandler.cpp
+1-1lldb/tools/lldb-dap/Handler/ExceptionInfoRequestHandler.cpp
+1-1lldb/tools/lldb-dap/JSONUtils.cpp
+4-44 files

LLVM/project bda8c50clang/lib/Driver/ToolChains MSVC.cpp

[Driver] Use llvm::is_contained (NFC) (#140310)

DeltaFile
+1-1clang/lib/Driver/ToolChains/MSVC.cpp
+1-11 files

LLVM/project c8eace9lldb/packages/Python/lldbsuite/test/tools/lldb-dap lldbdap_testcase.py dap_server.py, lldb/tools/lldb-dap DAP.cpp

Merge branch 'main' into users/el-ev/05-17-_llvm_nfc_use_llvm_sort_
DeltaFile
+41-37lldb/tools/lldb-dap/Handler/ConfigurationDoneRequestHandler.cpp
+3-67lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
+40-30lldb/tools/lldb-dap/Handler/RequestHandler.h
+4-25lldb/tools/lldb-dap/DAP.cpp
+10-14lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
+1-19lldb/tools/lldb-dap/Handler/LaunchRequestHandler.cpp
+99-19224 files not shown
+149-25630 files

LLVM/project 935633eclang/lib/APINotes APINotesWriter.cpp, clang/lib/Analysis UnsafeBufferUsage.cpp

[Clang][NFC] Use `llvm::sort()`
DeltaFile
+7-7clang/lib/APINotes/APINotesWriter.cpp
+5-6clang/lib/Sema/SemaHLSL.cpp
+4-5clang/lib/Analysis/UnsafeBufferUsage.cpp
+3-3clang/lib/Analysis/FlowSensitive/SimplifyConstraints.cpp
+1-1clang/lib/Interpreter/CodeCompletion.cpp
+1-1clang/lib/Driver/ToolChain.cpp
+21-236 files

LLVM/project 352a09allvm/lib/Target/AMDGPU AMDGPUAttributor.cpp, llvm/test/CodeGen/AMDGPU propagate-waves-per-eu.ll annotate-kernel-features-hsa-call.ll

[AMDGPU][Attributor] Rework calculation of waves per eu
DeltaFile
+94-48llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
+39-40llvm/test/CodeGen/AMDGPU/propagate-waves-per-eu.ll
+34-36llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa-call.ll
+25-27llvm/test/CodeGen/AMDGPU/attr-amdgpu-max-num-workgroups-propagate.ll
+14-13llvm/test/CodeGen/AMDGPU/amdgpu-attributor-no-agpr.ll
+13-13llvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa.ll
+219-17727 files not shown
+341-27933 files

LLVM/project e3dbbc9llvm/lib/CodeGen AssignmentTrackingAnalysis.cpp, llvm/lib/Target/SPIRV SPIRVStructurizer.cpp

[llvm][NFC] Use `llvm::sort()`
DeltaFile
+14-17llvm/lib/Transforms/Utils/CodeLayout.cpp
+8-8llvm/lib/Target/SPIRV/SPIRVStructurizer.cpp
+4-5llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+4-4llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+4-4llvm/lib/TargetParser/AArch64TargetParser.cpp
+3-4llvm/tools/llvm-jitlink/llvm-jitlink.cpp
+37-4212 files not shown
+55-6118 files

LLVM/project 0e0b501lldb/packages/Python/lldbsuite/test/tools/lldb-dap lldbdap_testcase.py dap_server.py, lldb/tools/lldb-dap DAP.cpp

[lldb-dap] Take two at refactoring the startup sequence. (#140331)

This is more straight forward refactor of the startup sequence that
reverts parts of ba29e60f9a2222bd5e883579bb78db13fc5a7588. Unlike my
previous attempt, I ended up removing the pending request queue and not
including an `AsyncReqeustHandler` because I don't think we actually
need that at the moment.

The key is that during the startup flow there are 2 parallel operations
happening in the DAP that have different triggers.

* The `initialize` request is sent and once the response is received the
`launch` or `attach` is sent.
* When the `initialized` event is recieved the `setBreakpionts` and
other config requests are made followed by the `configurationDone`
event.

I moved the `initialized` event back to happen in the `PostRun` of the
`launch` or `attach` request handlers. This ensures that we have a valid

    [7 lines not shown]
DeltaFile
+41-37lldb/tools/lldb-dap/Handler/ConfigurationDoneRequestHandler.cpp
+3-67lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py
+40-30lldb/tools/lldb-dap/Handler/RequestHandler.h
+4-25lldb/tools/lldb-dap/DAP.cpp
+10-14lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
+1-19lldb/tools/lldb-dap/Handler/LaunchRequestHandler.cpp
+99-19224 files not shown
+149-25630 files

LLVM/project 9178a17lldb/docs/use python.rst

Update python.rst (#140333)

Fix code block formatting in section "The Decision Point Breakpoint
Commands"
DeltaFile
+4-1lldb/docs/use/python.rst
+4-11 files

LLVM/project 3931566clang/lib/Analysis UnsafeBufferUsage.cpp, clang/test/SemaCXX warn-unsafe-buffer-usage-array.cpp

[-Wunsafe-buffer-usage] Fix false warnings when const sized array is safely accessed (array [idx %const]) (#140113)

The -Wunsafe-buffer-usage analysis currently warns when a const sized
array is safely accessed, with an index that is bound by the remainder
operator. The false alarm is now suppressed.

Example:

int circular_buffer(int array[10], uint idx) {
   return array[idx %10]; // Safe operation
}

rdar://148443453

---------

Co-authored-by: MalavikaSamak <malavika2 at apple.com>
DeltaFile
+16-1clang/lib/Analysis/UnsafeBufferUsage.cpp
+15-1clang/test/SemaCXX/warn-unsafe-buffer-usage-array.cpp
+31-22 files

LLVM/project f7ef8dcclang/lib/CIR/CodeGen CIRGenFunctionInfo.h

[CIR] Fix problem with phantom function arguments (#140322)

There was a problem introduced today where sometimes the CIR for
functions with no arguments would be generated with phantom arguments.
This was causing intermittent test failures.

The problem appears to have been that we were using two different
Profile implementations to generate the FoldingSetNodeID for
CIRGenFunctionInfo so occaissionally when we tried to look for a
pre-existing entry for a function with no arguments it would incorrectly
match a CIRGenFunctionInfo entry that had arguments.

To prevent this from happening again, I rewrote one of the two Profile
functions to call the other.
DeltaFile
+10-2clang/lib/CIR/CodeGen/CIRGenFunctionInfo.h
+10-21 files

LLVM/project 5c15427utils/bazel/llvm-project-overlay/clang-tools-extra/unittests BUILD.bazel

[bazel] Add missing dep after 6a0e626af58bdf8ae8c07cfe8aec94f4565734a3
DeltaFile
+1-0utils/bazel/llvm-project-overlay/clang-tools-extra/unittests/BUILD.bazel
+1-01 files

LLVM/project 429d1eaclang-tools-extra/clang-doc Serialize.cpp Representation.h

[clang-doc] Track if a type is a template or builtin

Originally part of #133161. This patch adds preliminary tracking
for of TypeInfo, by tracking if the type is a builtin or template.

The new functionality is not yet exercised.

Co-authored-by: Peter Chou <peter.chou at mail.utoronto.ca>
DeltaFile
+12-5clang-tools-extra/clang-doc/Serialize.cpp
+3-0clang-tools-extra/clang-doc/Representation.h
+15-52 files

LLVM/project d829981clang-tools-extra/clang-doc/tool ClangDocMain.cpp, clang-tools-extra/test/clang-doc basic-project.mustache.test

[clang-doc] Update clang-doc tool to enable mustache templates

This patch adds a command line option and enables the Mustache template
HTML backend. This allows users to use the new, more flexible templates
over the old and cumbersome HTML output. Split from #133161.

Co-authored-by: Peter Chou <peter.chou at mail.utoronto.ca>
DeltaFile
+481-0clang-tools-extra/test/clang-doc/basic-project.mustache.test
+49-29clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+530-292 files

LLVM/project f3de7b4clang-tools-extra/clang-doc Serialize.cpp Representation.h

[clang-doc] Update serializer for improved template handling

This patch updates Serialize.cpp to serialize more data about C++
templates, which are supported by the new mustache HTML template.
Split from #133161.

Co-authored-by: Peter Chou <peter.chou at mail.utoronto.ca>
DeltaFile
+195-8clang-tools-extra/clang-doc/Serialize.cpp
+3-0clang-tools-extra/clang-doc/Representation.h
+198-82 files

LLVM/project 6e5e448clang-tools-extra/clang-doc HTMLMustacheGenerator.cpp, clang-tools-extra/unittests/clang-doc HTMLMustacheGeneratorTest.cpp

[clang-doc] Implement setupTemplateValue for HTMLMustacheGenerator

This patch implements the business logic for setupTemplateValue, which
was split from #133161. The implementation configures the relative path
relationships between the various HTML components, and prepares them
prior to their use in the generator.

Co-authored-by: Peter Chou <peter.chou at mail.utoronto.ca>
DeltaFile
+410-6clang-tools-extra/unittests/clang-doc/HTMLMustacheGeneratorTest.cpp
+24-3clang-tools-extra/clang-doc/HTMLMustacheGenerator.cpp
+434-92 files

LLVM/project d0754f4clang-tools-extra/clang-doc HTMLMustacheGenerator.cpp

[clang-doc] Extract Info into JSON values

Split from #133161. This patch provides the implementation of a number
of extractValue overloads used with the different types of Info.

The new helper functions extract the relevant information from the
different *Infos and inserts them into the correct fields of the JSON
values that will be used with the specific Mustache templates, which
will land separately.

Co-authored-by: Peter Chou <peter.chou at mail.utoronto.ca>
DeltaFile
+249-0clang-tools-extra/clang-doc/HTMLMustacheGenerator.cpp
+249-01 files

LLVM/project 442fe2fclang-tools-extra/clang-doc HTMLMustacheGenerator.cpp, clang-tools-extra/clang-doc/support Utils.cpp Utils.h

[clang-doc] Add helpers for Template config

This patch adds or fills in some helper functions related to template
setup when initializing the mustache backend. It was split from #133161.

Co-authored-by: Peter Chou <peter.chou at mail.utoronto.ca>
DeltaFile
+61-0clang-tools-extra/clang-doc/support/Utils.cpp
+45-0clang-tools-extra/clang-doc/HTMLMustacheGenerator.cpp
+26-0clang-tools-extra/clang-doc/support/Utils.h
+12-0clang-tools-extra/unittests/clang-doc/CMakeLists.txt
+9-2clang-tools-extra/unittests/clang-doc/HTMLMustacheGeneratorTest.cpp
+6-0clang-tools-extra/unittests/clang-doc/config.h.cmake
+159-21 files not shown
+162-37 files

LLVM/project 6a0e626clang-tools-extra/clang-doc HTMLMustacheGenerator.cpp, clang-tools-extra/unittests/clang-doc HTMLMustacheGeneratorTest.cpp CMakeLists.txt

[clang-doc] Add HTMLMustacheGenerator methods (#138061)

Split from #133161. This patch fills in the implementation for a number
of the MustacheHTMLGenerator methods. Many of these APIs are just
stubbed out, and will have their implementation filled in by later
patches.

Co-authored-by: Peter Chou <peter.chou at mail.utoronto.ca>
DeltaFile
+95-0clang-tools-extra/clang-doc/HTMLMustacheGenerator.cpp
+34-3clang-tools-extra/unittests/clang-doc/HTMLMustacheGeneratorTest.cpp
+1-0clang-tools-extra/unittests/clang-doc/CMakeLists.txt
+130-33 files

LLVM/project 437195ellvm/test/CodeGen/AMDGPU llvm.amdgcn.mfma.ll llvm.amdgcn.update.dpp.ll

[NFC][AMDGPU] Update tests to use autogened CHECKs (#140311)

DeltaFile
+4,880-424llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.ll
+2,750-286llvm/test/CodeGen/AMDGPU/llvm.amdgcn.update.dpp.ll
+805-250llvm/test/CodeGen/AMDGPU/llvm.fma.f16.ll
+702-92llvm/test/CodeGen/AMDGPU/load-global-f32.ll
+460-200llvm/test/CodeGen/AMDGPU/llvm.amdgcn.class.ll
+401-127llvm/test/CodeGen/AMDGPU/shift-and-i64-ubfe.ll
+9,998-1,3793 files not shown
+11,027-1,5829 files

LLVM/project 882dde7llvm/lib/ProfileData DataAccessProf.cpp, llvm/test/CodeGen/RISCV mul-expand.ll ctz_zero_return_test.ll

Fixed heatmap mode

Created using spr 1.3.4
DeltaFile
+411-93llvm/test/CodeGen/RISCV/mul-expand.ll
+224-136llvm/test/CodeGen/RISCV/ctz_zero_return_test.ll
+359-0llvm/test/CodeGen/RISCV/xqcibi.ll
+196-150llvm/test/CodeGen/RISCV/urem-seteq-illegal-types.ll
+234-62llvm/test/CodeGen/RISCV/mul.ll
+265-0llvm/lib/ProfileData/DataAccessProf.cpp
+1,689-44189 files not shown
+4,496-1,01395 files

LLVM/project 0eaaa1bllvm/lib/ProfileData DataAccessProf.cpp, llvm/test/CodeGen/RISCV mul-expand.ll ctz_zero_return_test.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.4

[skip ci]
DeltaFile
+411-93llvm/test/CodeGen/RISCV/mul-expand.ll
+224-136llvm/test/CodeGen/RISCV/ctz_zero_return_test.ll
+359-0llvm/test/CodeGen/RISCV/xqcibi.ll
+196-150llvm/test/CodeGen/RISCV/urem-seteq-illegal-types.ll
+234-62llvm/test/CodeGen/RISCV/mul.ll
+265-0llvm/lib/ProfileData/DataAccessProf.cpp
+1,689-44184 files not shown
+4,407-95490 files