Skip to content

Comments

[profcheck] exclude amdgpu-attributor-min-agpr-alloc.ll#1

Closed
mtrofin wants to merge 10000 commits intomtrofin:mainfrom
llvm:main
Closed

[profcheck] exclude amdgpu-attributor-min-agpr-alloc.ll#1
mtrofin wants to merge 10000 commits intomtrofin:mainfrom
llvm:main

Conversation

@mtrofin
Copy link
Owner

@mtrofin mtrofin commented Oct 10, 2025

No description provided.

alexey-bataev and others added 30 commits October 8, 2025 16:35
Static analysis flagged that when calling ActOnTemplateName, `S` can be
a `nullptr`
and we call `isTemplateName` which unconditionally dereferences the `S`
argument at
some point. I added a `nullptr` check to assure we don't dereference `S`
in
`isTemplateName` if it is a `nullptr`.
…158500)

The winograd transform constant array is always emitted as f32, but
previously the creation would pass through the original type. If this
type was smaller (like f16), you would get an assertion failure during
attribute creation.

This fixes this by ensuring that the types match and adding a test for
this case.
This function, which has a typo in the name btw, is no longer doing what
it was created to do: instead of deducting non-extension target features
from `-mcpu` -- a task that was (more or less) subsumed by
`riscv::getRISCVTargetFeatures` -- it is only checking if the `-mcpu`
value is valid or not now. Therefore, this patch renames it into
`isValidRISCVCPU` and exits early if it's not.

NFCI.
This PR introduces the support for the SPIR-V extension
`SPV_INTEL_predicated_io`. This extension adds predicated load and store
instructions. Predicated load performs load from memory if predicate is
true; otherwise, it uses default_value as a result. Predicated store
performs store of value to memory if predicate is true; otherwise, it
does nothing.

Reference Specification:

https://github.com/intel/llvm/blob/sycl/sycl/doc/design/spirv-extensions/SPV_INTEL_predicated_io.asciidoc
Based on
#162007 (comment),
we should avoid having short links in docker images.
Based on
#162007 (comment),
we should avoid having short links in docker images.
Fix the rest of the containers sitting around in the monorepo.
This was copied and pasted from the main CI container build workflows
and I missed this during code review.
Summary:
Previous change made us no longer link `exit` by default which implied
the RPC server. This is a required symbol for the loader. This will be
fixed later when I port the loader to LLVMOffload. For now just work
around it to fix the bots.
#162303)

Glob will be optimized
Regex we we will keep intact.

Using std::variant to avoid virtual methods,
and allow to switch unique_ptr to move in future.
#160331 (#162533)

[MLIR] Fix test failures for generate-runtime-verification pass from PR #160331
    
PR #160331 introduced a mistake that removed the error message for
generate-runtime-verification
pass, leading to test failures during
`test-build-check-mlir-build-only-check-mlir`.
    
This patch restores the missing error message.
    
In addition, for related tests, the op strings used in FileChecks are
updated with the same op
formats as used in input mlirs.
    
Verified locally.
    
Fixes post-merge regression from:
#160331
…#155331)

This fixes a potential use after free where
ModuleList::RemoveSharedModuleIfOrphaned ->
SharedModuleList::RemoveIfOrphaned -> SharedModuleList::RemoveFromMap
would potentially dereference a freed pointer. This fixes it by not
calling ModuleList::RemoveSharedModuleIfOrphaned at all if the pointer
was just freed.
As for
[RFC](https://discourse.llvm.org/t/rfc-deprecate-and-remove-zircon-module-moving-its-only-check-to-fuchsia-module/88208/2),
deprecate `zircon` module and remove eventually in LLVM-24.

---------

Co-authored-by: EugeneZelenko <eugene.zelenko@gmail.com>
…ckwardDataFlowAnalysis (NFC) (#161503)

Just some more debugging help here, it may need more tweaking in the future.
This simplifies structure of GlobMatcher, and
avoids "no copy/move" requirement.
…#162537)

Summary:
Very small typo here caused it to not enter the main loop if the size
was not greater than 1. The inner loop is "less than" so the inverse
should be
"greater than or equal" but we were only doing "greater than". Did not
notice this because the libc handling does its own implementation and
the OpenMP tests only tested multiple destructors, and most people only
ever use global constructors when they show up on the GPU.
…sion (#162050)

Depends on #162048

This makes sure we also include the version number in the description.

For `C++17`, this would, e.g., now return `"C++17"` instead of `"ISO
C++"`.
…162563)

Ensures that SPS transparent conversion will apply to arguments passed
by reference.
It appears that new [Build Tooling CI
Containers](https://github.com/llvm/llvm-project/actions/runs/18359418540/job/52299833688)
job run didn't actually push containers, but failed with error:

```
find: paths must precede expression: `ghcr.io-llvm-amd64-ci-ubuntu-24.04-lint-f1eb7e55428e.tar'
find: possible unquoted pattern after predicate `-iname'?
```

Proposed fix is in error message and I confirmed locally with such
setup:
```bash
$ ls -la
a.sh
ghcr.io-ci-a.tar
ghcr.io-ci-b.tar

$ cat a.sh 
for f in $(find . -iname '*.tar'); do
    echo $f
done

$ ./a.sh # lists fine with quotes but fails without.
```

Thought not sure how `Build CI Container` job push successfully: I
manually downloaded 900MB `tar` AMD-archive with two containers and
failed to `for`-loop over them without quotes, hence I add them to that
script as well.
…at (#161982)

When a thread reaches a breakpoint at the return address set by
`ThreadPlanStepOut`, `ThreadPlanStepOut::ShouldStop()` calls
`ThreadPlanShouldStopHere::InvokeShouldStopHereCallback()`, and if it
returns `false`, `ThreadPlanShouldStopHere::QueueStepOutFromHerePlan()`
is called to queue a new plan to skip the corresponding range. Once the
new plan finishes, `ThreadPlanStepOut::ShouldStop()` should recheck the
stop condition; however, there is no code path in the method that sets
`done` to `true`. Before #126838, if `done` was `false`, the method checked
if a suitable frame had been reached. After the patch, the check is only
performed at a breakpoint; thus, the execution continues.

This patch causes `ThreadPlanStepOut::ShouldStop()` to recheck the stop
condition when `m_step_out_further_plan_sp` completes.
Pseudo probe support for COFF was added in #123870. This patch teaches
llvm-profgen to decode it.
The ResourceManager interface can be used to implement ownership for resources
allocated to JIT'd code, e.g. memory and metadata registrations (frame info,
language runtime metadata, etc.).

Resources can be *deallocated*, meaning that they should be cleaned up (memory
released, registrations deregistered, etc.), or they can be *detached*, meaning
that cleanup should be performed automatically when the ResourceManager itself
is destroyed.

The intent is to allow JIT'd code to continue running after the
llvm::orc::ExecutionSession that produced it is disconnected / destroyed.
… to the biggest legal type (#158068)

For X86, we want to do this for scalars up to the biggest legal type.
Having it be for types bigger results in bloated code.
…acecast (#161773)

LLVM models ConstantPointerNull as all-zero, but some GPUs (e.g. AMDGPU
and our downstream GPU target) use a non-zero sentinel for null in
private / local address spaces.
SPIR-V is a supported input for our GPU target. This PR preserves a
canonical zero form in the generic AS while allowing later lowering to
substitute the target’s real sentinel.
mstorsjo and others added 28 commits October 10, 2025 18:17
Since 4feae05, most of the handling of
warning options was rewritten to add such options based on hardcoded
knowledge about what compilers support which options, and since which
versions. This avoids a number of configure time checks, speeding up the
cmake configuration.

This avoids erroneously adding this option with GCC, which doesn't
really support it.

If testing for a warning option like -Wno-<foo> with GCC, GCC won't
print any diagnostic at all, leading to the options being accepted
incorrectly. However later, if compiling a file that actually prints
another warning, GCC will also print warnings about these -Wno-<foo>
options being unrecognized.

This avoids extra warning spam like this, for every source file that
does produce warnings with GCC:

    At global scope:
    cc1plus: note: unrecognized command-line option ‘-Wno-pass-failed’ may have been intended to silence earlier diagnostics
ec28b95 made liblldb delayloaded, but
the supplied command line parameter is only valid for MSVC style builds.

For mingw builds using LLD, we can easily pass a similar option. For
mingw builds with ld.bfd, we can't quite as easily delayload it - for
these cases, just keep linking it like we usually do, and warn if the
user tried to set LLDB_PYTHON_DLL_RELATIVE_PATH in a build where it
won't have any effect.

Also change the setting for MSVC style builds, to use the simpler
`$<TARGET_FILE_NAME:liblldb>` instead of
`$<TARGET_FILE_BASE_NAME:liblldb>.dll`. The former pattern is what we
use for mingw targets, and it makes the code clearer to use that for
both, as that same expression should do the right thing for both.
This patch updates the FP-to-Int conversion handling:
- For signed integers: use `ftrunc` followed by clamping to the target
integer range.
- For unsigned integers: apply `fabs` + `ftrunc`, then clamp.

This removes the previous dependence on `nsz` and ensures correct
lowering for both signed and unsigned cases.

I've tested the code generation of -mtriple=amdgcn. It seems that the
assembly code is expected, but I'm not sure how to write a general
testcase for every target.

Fixes #160623.
#162843 landed a test that is
broken on darwin:

https://lab.llvm.org/buildbot/#/builders/190/builds/28819

This is an attempted quick fix.
#140210 added `#include "clang/Frontend/FrontendDiagnostic.h"` to
clang/lib/Sema/SemaAMDGPU.cpp, but Frontend itself has a dependency on
Sema. This creates a layering issue as described in
https://llvm.org/docs/CodingStandards.html#library-layering.

Fortunately, d076608 made this easy to
fix, as clang/Frontend/FrontendDiagnostic.h just forwards to
clang/Basic/DiagnosticFrontend.h, so it's trivial to make this depend on
basic instead of frontend.
…2474)"

This reverts commit 2eb8c47 since it completely breaks dylib build.
…g - fix flag handling (#160195)

This is a follow up to #157968.
This fixes flag handling in inserted instructions.
Upstream, the basic support for the C++ try catch statement with an
empty try block

Issue #154992
XeVM to LLVM pass: Add conversion patterns for XeVM id ops.

Target OpenCL functions described here:

https://registry.khronos.org/OpenCL/sdk/3.0/docs/man/html/get_group_id.html
Commit cb18647 removed the `| count 0` in this file but left behind this
stale comment.
This PR adds some tests for covering some useful corner cases.

1. more tests for `vector.shape_cast` distribution.
2. testing for `MoveFuncBodyToWarpOp` pattern that was not possible
before.
…I name (#162766)

Making the choice more clear from the API name, otherwise it'd be very easy for one to just "not bother" with the `MDFrom`​, especially since it is optional and follows the optional `Name`​ - but this time we'd have a harder time detecting it's effectivelly dropped metadata.
This patch adds getWithoutNaN/getWithoutInf. We will apply nnan/ninf
flags to the range of operands/results for a more precise range.
Corrects a typo in comments within XCOFFObjectFile.cpp, changing
'unit64_t' to the correct type 'uint64_t' for clarity.
Currently AFAICT we don't have a way to get the MCP server socket after
it started. So this change introduces a new `protocol-server` subcommand
that allows us to query the location of a running server:

```
(lldb) protocol-server start MCP listen://localhost:0
MCP server started with connection listeners: connection://[::1]:36051, connection://[127.0.0.1]:36051
(lldb) protocol-server get MCP
MCP server connection listeners: connection://[::1]:36051, connection://[127.0.0.1]:36051
(lldb) protocol-server stop MCP
(lldb) protocol-server get MCP
error: MCP server is not running
```
vector.splat has been deprecated (user: please use the very similar vector.broadcast instead) 
with the last PR landing about 6 weeks ago.

The discourse discussion is at
https://discourse.llvm.org/t/rfc-mlir-vector-deprecate-then-remove-vector-splat/87143/1
The last PR was #152230

This PR completely removes vector.splat. In addition to removing vector.splat from VectorOps.td, it

- Updates the few remaining places where vector::SplatOp is created (now vector::BroadcastOp is created)
- Removes temporary patterns where vector.splat is replaced by vector.broadcast

The only place 'vector.splat' appears is now the files

https://github.com/llvm/llvm-project/blob/main/mlir/utils/tree-sitter-mlir/test/corpus/op.txt
 and

https://github.com/llvm/llvm-project/blob/main/mlir/utils/tree-sitter-mlir/dialect/vector.js

---------

Signed-off-by: James Newling <james.newling@gmail.com>
…161910)

As a common language extension, this compiler accepts a structure
constructor whose first value has no keyword and whose type matches an
ancestral type as if the constructor had had a keyword whose name was
the ancestral type. For example, given
  TYPE PARENT; REAL X; END TYPE
  TYPE, EXTENDS(PARENT) :: CHILD; END TYPE
we accept the nonconforming constructor "child(parent(1.))" as if it had
been the conforming "child(1.)" or "child(parent=parent(1.))".

The detection of this case needs to be constrained a bit to avoid a
false positive misinterpretation of conforming code in the case where
the actual first component of the derived type is a POINTER or
ALLOCATABLE whose type and rank would allow it to correspond with the
keywordless first value in the component value list.

Fixes #161887.
Audit the use of std::optional<bool> as a tri-state logical value in
flang, correct a couple cases that need ".value_or()", add some explicit
".has_value()" calls, and document the possible pitfalls.
When processing the KIND= values of type specifications in parameterized
derived type component declarations, it turns out to be necessary to
analyze their expressions' parse trees rather than to just fold their
typed expression representations. The types of the subexpressions may
depend on the values of KIND parameters.

Further, when checking the values of KIND= actual arguments to type
conversion intrinsic functions (e.g., INT(..., KIND=)) that appear in
KIND specifiers for PDT component declarations, don't emit an error for
the derived type definition, but instead emit them for derived type
instantiations.

Fixes #161961.
The compiler can't defer the conversion of legacy DATA-style
/initializers/ in component declarations to their init() expressions to
the general DATA statement conversion pass, since default component
values must be present during structure constructor analysis. So move
their conversions into name resolution and handle them at the same times
as standard '=' initializers are processed. Avoid any potential problems
with type parameters being used as repetition counts or values by
disallowing legacy DATA-style initializers in PDTs.

Fixes #161989.
…lecting shifts (#162726)

Follow up from PR #162147. We do not have existing !prof metadata to synthesize one for the new `select`​ .

Fixes https://lab.llvm.org/staging/#/builders/221/builds/3091

Issue #147390
@mtrofin mtrofin closed this Oct 10, 2025
Comment on lines +38 to +43
- name: Checkout LLVM
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ inputs.LLVM-branch }}
path: llvm-project
- name: Checkout OffloadTest

Check warning

Code scanning / CodeQL

Checkout of untrusted code in trusted context Medium

Potential unsafe checkout of untrusted pull request on privileged workflow.
path: golden-images
- name: Setup Windows
if: runner.os == 'Windows'
uses: llvm/actions/setup-windows@main

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'HLSL Test' step
Uses Step
uses 'llvm/actions/setup-windows' with ref 'main', not a pinned commit hash
source .venv/bin/activate && cd repo
python -m pip install -r libcxx/utils/requirements.txt
baseline_commit=$(git merge-base ${{ steps.vars.outputs.pr_base }} ${{ steps.vars.outputs.pr_head }})
./libcxx/utils/test-at-commit --commit ${baseline_commit} -B build/baseline -- -sv -j1 --param optimization=speed ${{ steps.vars.outputs.benchmarks }}

Check failure

Code scanning / CodeQL

Code injection Critical

Potential code injection in
${ steps.vars.outputs.benchmarks }
, which may be controlled by an external user (
issue_comment
).
- name: Run candidate
run: |
source .venv/bin/activate && cd repo
./libcxx/utils/test-at-commit --commit ${{ steps.vars.outputs.pr_head }} -B build/candidate -- -sv -j1 --param optimization=speed ${{ steps.vars.outputs.benchmarks }}

Check failure

Code scanning / CodeQL

Code injection Critical

Potential code injection in
${ steps.vars.outputs.benchmarks }
, which may be controlled by an external user (
issue_comment
).
repo: ${{ github.repository }}
steps:
- name: Install Ninja
uses: llvm/actions/install-ninja@main

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'LLVM ABI Tests' step
Uses Step
uses 'llvm/actions/install-ninja' with ref 'main', not a pinned commit hash
Comment on lines +103 to +108
- name: Download source code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ matrix.ref }}
repository: ${{ matrix.repo }}
- name: Configure

Check warning

Code scanning / CodeQL

Checkout of untrusted code in trusted context Medium

Potential unsafe checkout of untrusted pull request on privileged workflow.
with:
max-size: "2000M"
- name: Install Ninja
uses: llvm/actions/install-ninja@main

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'CI Checks' step
Uses Step
uses 'llvm/actions/install-ninja' with ref 'main', not a pinned commit hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.