Skip to content

Conversation

@amirnd51
Copy link
Owner

No description provided.

ashgti and others added 30 commits July 10, 2025 10:10
This adds new protocol types for the 'variables' request.

While implementing this, I removed the '$__lldb_extension' field we
returned on the 'variables' request, since I think all the data can be
retrieved from other DAP requests.

---------

Co-authored-by: Jonas Devlieghere <[email protected]>
…rames (llvm#147622)

When generating debug info for coroutine frames, nested struct types
were incorrectly inheriting the top-level function scope instead of
having their parent struct as scope. This caused assertion failures in
DebugInfoMetadata.h during member list replacement for complex nested
struct hierarchies.

Fix by passing the parent DIStruct as scope when recursively calling
solveDIType for nested struct fields, ensuring proper debug info scoping
hierarchy.

Add regression test that validates proper nested struct scoping
hierarchy and
prevents future regressions.
Duplicated str_to_integer.h and modified it to work with widechars.
A future patch will implement the public functions (wcstol, wcstoll,
etc) by calling this internal function.
…ct parameter (llvm#147996)

When an overload is invalid, we try to initialize each conversion
sequence for the purpose of diagmostics, but we failed to initialize
explicit objects, leading to a crash

Fixes llvm#147121
…n as other analysis (llvm#146783)

When implementing llvm#146785, notice `DXILRootSignature` had some design
changes that made it harder to integrate with other analysis. This
change refactors `DXILRootSignature` to solve this issue.
---------

Co-authored-by: joaosaffran <[email protected]>
…7794)

Update the premerge testing system to use the LLVM-wide premerge
infrastructure. Also remove libcxx-restart-preempted-jobs.yaml, as this
should no longer be needed.
Fixes markdown formatting of xevm dialect docs.
This change adds support for AddOp for ComplexType

llvm#141365
…` and `-pg` are mutually exclusive (llvm#148000)

Some targets, such as `aarch64-pc-windows-msvc`, always require that
Frame Pointer be reserved even when `-fomit-frame-pointer` is provided,
thus it is always valid to use `-pg` on those targets.

This test didn't take these targets into account; thus it was failing on
Arm64 Windows host machines.

The fix is to explicitly set a target that doesn't require Frame
Pointers reservation.
)

This pr fixes a bug that allows parameters to be specified without an
intermediate comma.

After this pr, we will correctly produce a diagnostic for (eg):
```
RootFlags(0) CBV(b0)
```

This pr updates the problematic code pattern containing a chain of 'if'
statements to a chain of 'else if' statements, to prevent parsing of an
element before checking for a comma.

This pr also does 2 small updates, while in the region:
1. Simplify the `do` loop that these `if` statements are contained in.
This helps code readability and makes it easier to improve the
diagnostics further
2. Moves the `consumeExpectedToken` function calls to be right after the
`parse.*Params` invocation. This will ensure that the comma or invalid
token error is presented before a "missed mandatory param" diagnostic.

- Updates all occurrences of the if chains with an else-if chain
- Simplifies the surrounding `do` loop to be an easier to understand
`while` loop
- Moves the `consumeExpectedToken` diagnostic right after the loop so
that the missing comma diagnostic is produce before checking for any
missed mandatory arguments
- Adds unit tests for this scenario
- Small fix to the diagnostic of `RootDescriptors` to use their
respective `Token` instead of `RootConstants`

Resolves: llvm#147337
This reverts commit f71b188.

The corresponding commit was reverted by fa74df3.
This makes sure we upload the artifacts even if the previous step
failed.

This is helpful because we wish to upload crash reproducers, which the
scritps are already prepared to do.

Example:
https://github.com/llvm/llvm-project/actions/runs/16180778101/job/45676677544?pr=147835
…without applying them

Swift-versioned API notes get applied at PCM constrution time relying on
'-fapinotes-swift-version=X' argument to pick the appropriate version.
This change adds a new APINotes application mode with
'-fswift-version-independent-apinotes' which causes *all* versioned API
notes to get recorded into the PCM wrapped in 'SwiftVersionedAttr'
instances. The expectation in this mode is that the Swift client will
perform the required transformations as per the API notes on the client
side, when loading the PCM, instead of them getting applied on the
producer side. This will allow the same PCM to be usable by Swift
clients building with different language versions.

In addition to versioned-wrapping the various existing API notes
annotations which are carried in declaration attributes, this change
adds a new attribute for two annotations which were previously applied
directly to the declaration at the PCM producer side: 1) Type and 2)
Nullability annotations with 'SwiftTypeAttr' and 'SwiftNullabilityAttr',
respectively. The logic to apply these two annotations to a declaration
is refactored into API.
llvm#143116)

Despite being defined in the system headers, these commands are not in
fact part of the FreeBSD system call interface. They exist solely for
the Linuxulator, i.e. running Linux binaries on FreeBSD, and any attempt
to use them from a FreeBSD binary will return EINVAL. The fact we needed
to define _KERNEL (which, as the name implies, means we are compiling
the kernel) to even get the definition of shminfo should have been a
strong indicator that IPC_INFO at least was not a userspace interface.
The original commit removed them to avoid the dependency on llvm Support
because of LLVM_FALLTHROUGH, but this triggers `-Wimplicit-fallthrough`
warnings.

LLVM requires a C++17 compiler now, so we should be able to use the
standard [[fallthrough]] attribute.
This patch fixes:

  llvm/unittests/ADT/DenseMapTest.cpp:94:25: error: unused function
  'getTestValue' [-Werror,-Wunused-function]
…rleave."

This reverts commit f5ed863.

Recommit patch now that the crash exposed by the change has been fixed.
…ing operands (llvm#147583)

Added emission of the 2-element reduction instead of 2 extracts + scalar
op, when trying to vectorize operands of the instruction, if it is more
profitable.
This allows truncated splat / buildvector in isBoolConstant, to allow
certain not instructions to be recognized post-legalization, and allow
vselect to optimize.

An override for x86 avx512 predicated vectors is required to avoid an
infinite recursion from the code that detects zero vectors. From:
```
  // Check if the first operand is all zeros and Cond type is vXi1.
  // If this an avx512 target we can improve the use of zero masking by
  // swapping the operands and inverting the condition.
```
…147994)

Change `ascii_strncasecmp` to use a range for loop and use StringRef
parameters.
…lds (llvm#147609)

This PR upstreams the `set_bitfield` operation used to assign values to
bitfield members in C and C++ struct types.
Handling of AAPCS-specific volatile bitfield semantics will be addressed
in a future PR.
As well as followup "builtins: Speculative MSVC fix."

This reverts commits 5b1db59 and
f1c4df5.

Needs fixes for failing tests which will take time to implement.
Add xevm-attach-target transform pass and unit-tests.

Co-authored-by: by Sang Ik Lee [email protected].
Co-authored-by: Artem Kroviakov [email protected]
…#145343)

Mingw mode already supports building machine:arm64ec arm64x binaries,
support machine:arm64x ones too.

Signed-off-by: Sasha Finkelstein <[email protected]>
PeimingLiu and others added 30 commits July 11, 2025 11:28
…48068)

It seems `subsituteRegister` checks `FromReg == ToReg` instead of
`TRI->isSubRegisterEq`.

This PR simply reverts the original PR
(llvm#131361) to its initial
implementation (without using `subsituteRegister`).

Not sure whether it is a desired fix (and by no means that I am an
expert on LLVM backend), but it does fix a numeric error on our internal
workload.

Original author: @sdesmalen-arm
)

In rare cases the declaration of a function may not match its callsite
after function importing, when the declaration was imported from a
module where the function had void return type (presumably due to
incomplete types). Instead of using setCalledFunction() to change a call
to call its clone, which updates the call's function type as well, just
call setCalledOperand directly so the only thing changed is the function
target.

Note this can't happen for the other places where we call
setCalledFunction: FullLTO requires the cloned callee to be defined in
the same FullLTO merged module; ThinLTO memprof ICP calls an ICP
facility to first perform the promotion and that will be blocked if the
function type doesn't match the callsite (the new test explicitly tests
this latter case).
…148103)

Although XeVM is an LLVM extension dialect,
SPIR-V backend relies on [function
calls](https://llvm.org/docs/SPIRVUsage.html#instructions-as-function-calls)
instead of defining LLVM intrinsics to represent SPIR-V instructions.
convert-xevm-to-llvm pass lowers xevm ops to function declarations and
calls using the above naming convention.
In the future, most part of the pass should be replaced with llvmBuilder
and handled as part of translation to LLVM instead.

---------
Co-authored-by: Artem Kroviakov <[email protected]>
Lower `fadd`, `fsub`, `fmul`, and `fma` to f32x2 variants introduced in
PTX 8.6 for sm_100+. Adds a new register class for v2f32 as a b64
register in PTX. This causes other vector operations like loads and
stores to lower as .b64 instead of .v2.b32 as appropriate.

Also update test cases to use the autogenerator.
Factor out code to check if access are completely before/after each
other. This reduces the diff for an upcoming re-commit and moving to a
function also helps to reduce the nesting level via early exits.
…lse (llvm#148165)

Currently, Uniformity Analysis is preserved in the Legacy PM when a pass
sets `setPreservesCFG()`. This is incorrect: any values' uniformity not
only depends on the CFG, but also on the uniformity of other values, so
a CFG-preserving change in many cases doesn't preserve uniformity
analysis.

This corrected behavior also matches the behavior of the new PM.

---

On its own, this change does not affect the pass pipeline because of the
happenstance of pass ordering. I also created a PR to change
AMDGPULateCodeGenPrepare (llvm#148167), this will have an actual impact on
pass executions. That PR also includes changes to the
`amdgpu/llc-pipeline.ll` test in order to check that this change works,
but if this is preferred, I would also be happy to try to extend this PR
to add an isolated test case; though my personal opinion is that the
test in llvm#148167 should suffice, as it should also accurately pinpoint
failures related to this change.

---

I ran `git-clang-format` on my changes. I tested them using the
`check-llvm` target; no unexpected failures occurred.
These are identified by misc-include-cleaner.  I've filtered out those
that break builds.  Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.
This change adds support for ComplexRealPtrOp for ComplexType

llvm#141365
Replaced by the regular shuffles.

Fixes llvm#145512

Reviewers: RKSimon

Reviewed By: RKSimon

Pull Request: llvm#148007
Fixes llvm#147395

This PR legalizes lifetime intrinsics for DXIL by
- Adding a bitcast for the lifetime intrinsics' pointer operand in
dxil-prepare to ensure it gets cast to an `i8*` when written to DXIL
- Removing the memory attribute from lifetime intrinsics in dxil-prepare
to match DXIL
- Making the DXIL bitcode writer write the base/demangled name of
lifetime intrinsics to the symbol table
- Making lifetime intrinsics an exception to Int64Ops shader flag
analysis (otherwise we get `error: Flags must match usage.` from the
validator)
…orOp results. (llvm#147620)

Current implementation generates incorrect code or crashes in the
following valid cases.

1. At least one of the for op results are not yielded by the warpOp.
Example:
```
%0 = gpu.warp_execute_on_lane_0(%arg0)[32] -> (vector<4xf32>) {
    ....
    %3:2 = scf.for %arg3 = %c0 to %c128 step %c1 iter_args(%arg4 = %ini, %arg5 = %ini1) -> (vector<128xf32>, vector<128xf32>) {
      
      %1  = ...
      %acc = ....
      scf.yield %acc, %1 : vector<128xf32>, vector<128xf32>
    }
    gpu.yield %3#0 : vector<128xf32> // %3#1 is not used but can not be removed as dead code (loop carried).
  }
  "some_use"(%0) : (vector<4xf32>) -> ()
  return
```
2. Enclosing warpOp yields the forOp results in different order compared
to the forOp results.
Example:
```
  %0:3 = gpu.warp_execute_on_lane_0(%arg0)[32] -> (vector<4xf32>, vector<4xf32>, vector<8xf32>) {
    ....
    %3:3 = scf.for %arg3 = %c0 to %c128 step %c1 iter_args(%arg4 = %ini1, %arg5 = %ini2, %arg6 = %ini3) -> (vector<256xf32>, vector<128xf32>, vector<128xf32>) {
      .....
      scf.yield %acc1, %acc2, %acc3 : vector<256xf32>, vector<128xf32>, vector<128xf32>
    }
    gpu.yield %3#2, %3#1, %3#0 : vector<128xf32>, vector<128xf32>, vector<256xf32> // swapped order
  }
  "some_use_1"(%0#0) : (vector<4xf32>) -> ()
  "some_use_2"(%0#1) : (vector<4xf32>) -> ()
  "some_use_3"(%0#2) : (vector<8xf32>) -> ()

```
The WideMember argument is unused, remove it.
…lvm#147516)

Depending on the order of CMake includes the
`tablegen_compile_commands.yml` was previously missing entries due to
being deleted after a `tablegen` commands.

This PR fixes this by 1) making sure `AddMLIR` includes `TableGen` such
that new compile commands are added to a fresh YML file and 2) using an
include guard to ensure the file is cleared exactly once
This patch changes JSON file serialization. Now, files are serialized
to a single directory instead of nesting them based on namespaces. The
global namespace retains the "index.json" name.

This solves the problem of class template specializations being serialized to the
same file as its base template. This is also planned as part of
future integration with the Mustache generator which will consume the JSON files.
This commit introduces a new log channel for the disassembler in LLDB,
allowing for better logging of disassembler related activities. The
`LLDBLOG` enum has been updated to include the `Disassembler` channel,
and the relevant logging in the `DisassemblerLLVMC` plugin has been
modified to utilize this new channel. This is in preparation for adding
additional disassembler implementations.

Key Changes:
- Added `Disassembler` to the `LLDBLog` enum.
- Updated logging in `DisassemblerLLVMC.cpp` to use the new
`Disassembler` log channel.
…148062)

__enqueue_kernel_varargs' last parameter is in addrspace(5), but CodeGen
currently misses this qualifier. This commit fixes the code to preserve
the qualifier by referencing Alloca, which has its casts removed, rather
than TmpPtr.
…lvm#148293)

This introduces the first in a series of APIs that will allow a
MappableType to generate the body of the recipes. The current API does
not actually generate the recipe itself - it generates the body of it.
So it can either be placed in a recipe or inlined directly as needed.
…lvm#148295)

The switch to `GetSymbolVector` introduced a regression on detecting
implicit data transfer when the rhs is a function call.
Make sure the symbol we are looking at are of interest to detect data
transfer.
Generate the saturating add instructions for sadd.sat for scalar and
vector instructions

Co-authored-by: aankit-quic <[email protected]>
Co-authored-by: Jyotsna Verma <[email protected]>
Fixes llvm#141842 

Only add the non-const subscript operator to write resources
…48206)

The previous commit 8472eb1 broke the
sanitizer-aarch64-linux builder.

This patch fixes it: unused variable is removed
…queTypeModuleWriter constructor

This commit includes the TypedPointerType header and updates the NonOpaqueTypeModuleWriter constructor to accept a reference to ModuleHash. Additionally, the writeInstruction method signature is changed to include InstID and Vals parameters, improving type handling in the bitcode writing process.
…hanced bitcode instruction handling

This commit introduces the writeInstruction method to the NonOpaqueTypeModuleWriter class, allowing for detailed encoding of various LLVM instruction types in the bitcode. The method supports a wide range of instructions, including casts, binary operations, and control flow instructions, improving the overall functionality of the bitcode writer. Additionally, the constructor of NonOpaqueTypeModuleWriter is updated to include parameters for preserving use list order and generating hashes.
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.