Skip to content

Conversation

@iclsrc
Copy link
Collaborator

@iclsrc iclsrc commented Dec 6, 2025

sarnex and others added 30 commits November 24, 2025 15:20
More missed target checks.

Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
This is exactly like the 'copy', except the exit operation is a 'delete'
instead of a 'copyout'. Also, creating the 'delete' op has one less
argument to it, so we have to do some special handling when creating
that.
Replaces the default "Success" std::error_code with a more meaningful
one if `Magic != file_magic::pdb`.
```
---------------------------------------------------
Benchmark                            old        new
---------------------------------------------------
BM_num_get<bool>                 86.5 ns    32.3 ns
BM_num_get<long>                 82.1 ns    30.3 ns
BM_num_get<long long>            85.2 ns    33.4 ns
BM_num_get<unsigned short>       85.3 ns    31.2 ns
BM_num_get<unsigned int>         84.2 ns    31.1 ns
BM_num_get<unsigned long>        83.6 ns    31.9 ns
BM_num_get<unsigned long long>   87.7 ns    31.5 ns
BM_num_get<float>                 116 ns     114 ns
BM_num_get<double>                114 ns     114 ns
BM_num_get<long double>           113 ns     114 ns
BM_num_get<void*>                 151 ns     144 ns
```

This patch applies multiple optimizations:
- Stages two and three of do_get are merged and a custom integer parser
has been implemented
This avoids allocations, removes the need for strto{,u}ll and avoids
__stage2_int_loop (avoiding extra writes to memory)
- std::find has been replaced with __atoms_offset, which uses vector
instructions to look for a character

Fixes #158100
Fixes #158102
…alescing SUBREG_TO_REG"

A SUBREG_TO_REG instruction expresses that the top bits of the result
register are set to a certain value (e.g. 0).

The example below expresses that the result of %1 will have the top 32
bits zeroed and the lower 32bits being equal to the result of INSTR.
```
    %0:gpr32 = INSTR
    %1:gpr64 = SUBREG_TO_REG 0, %0, sub32
```
When the RegisterCoalescer tries to remove SUBREG_TO_REG instructions by
coalescing %0 into %1, it must keep the same semantics. Currently
however, the RegisterCoalescer would emit:
```
    %1.sub32:gpr64 = INSTR
```
which no longer expresses that the top 32-bits of the register are
defined (zeroed) by INSTR.

This may cause issues with e.g. machine copy propagation where the pass
may think it can remove a COPY-like instruction because the MIR says
only the bottom 32-bits are defined/used, even though other uses of the
register rely on the top 32-bits being zeroed by the COPY-like
instruction.

This PR changes the RegisterCoalescer to instead emit:
```
    undef %1.sub32:gpr64 = MOVimm32 42, implicit-def %1
```
to express that the entire contents of %1:gpr64 are defined by the
instruction.

This tries to reland #134408 which had to be reverted due to a few reported
failures.
Reverts llvm/llvm-project#169318

Our builders are back online. I see them picking up existing jobs.
This is identical to 'copy' and 'copyin', except it uses 'create' and
'copyout' as its entry/exit op. This patch adds the same tests, and
similar code for all of it.
The `#warning` causes diagnostics if system headers include deprecated
headers. #168041 will add a way to deprecated headers properly, which
then also interacts nicely with system header suppression.
Update getAllocTokenModeFromString() to recognize "default" as a valid
mode string, mapping it to `DefaultAllocTokenMode`.
Signed-off-by: Tikhomirova, Kseniya <kseniya.tikhomirova@intel.com>
`[[nodiscard]]` should be applied to functions where discarding the
return value is most likely a correctness issue.
- https://libcxx.llvm.org/CodingGuidelines.html#apply-nodiscard-where-relevant
This one is another that is effectively identical to copy, copyin, and
copyout, except its entry/exit ops pair is create/delete.
…n (#162458)

The inliner uses DirectSP to check if a function has instructions that
modify the SP. Exceptions are stack Push and Pop instructions.

We can also allow pointer signing and authenticating instructions.

The inliner removes the Return instructions from the inlined functions.
If it is a fused pointer-authentication-and-return (e.g. RETAA), we have
to generate a new authentication instruction.
**Problem**

In Rust, checked math functions (like `checked_mul`, `overflowing_mul`,
`saturating_mul`) are part of the primitive implementation of integers
([see u64](https://doc.rust-lang.org/std/primitive.u64.html) for
instance). The Rust compiler builds the Rust
[compiler-builtins](https://github.com/rust-lang/compiler-builtins)
crate as a step in the compilation processes, since it contains the math
builtins to be lowered in the target.

For BPF, however, when using those functions in Rust we hit the
following errors:

```
ERROR llvm: <unknown>:0:0: in function func i64 (i64, i64): A call to built-in function '__multi3' is not supported.

ERROR llvm: <unknown>:0:0: in function func i64 (i64, i64): only small returns supported
```

Those errors come from the following code:

```
pub fn func(a: u64, b: u64) -> u64 {
    a.saturating_mul(b)
}
```

Those functions invoke underneath the llvm instrinc `{ i64, i1 }
@llvm.umul.with.overflow.i64(i64, i64)` or its variants.

It is very useful to use safe math operations when writing BPF code in
Rust, and I would like to add support for those in the target.

**Changes**

1. Create a target feature `allow-builtin-calls` to enable code
generation for builtin functions.
2. Implement `CanLowerReturn` to fix the error `only small returns
supported`.
3. Add code to correctly invoke lib functions.
4. Add a test case together with the corresponding C code.
This patch fixes a minor typo in the **Kaleidoscope tutorial (Chapter
2)**.

The sentence:
“checks to see if **if** is too low”
has been corrected to:
“checks to see if **it** is too low”.

This is a documentation-only change and does not affect any semantic
behavior or code generation.

Thank you for maintaining the tutorial, and please let me know if any
further adjustments are needed.
This adds some trivial handling to force emitting of child decls inside
C++ records.
…dialect (#169194)

Enables `amdgcn.named.barrier` target extension type as a global
variable type in MLIR.
…8134)

Make sure the CoroSplitter pass correctly handles `#dbg_declare_value`
intrinsics. Which means, it should identify them, and convert them to
`#dbg_declares` so that any subsequent passes do not need to be amended
to support the `#dbg_declare_value` intrinsic.

More information here:
https://discourse.llvm.org/t/rfc-introduce-new-llvm-dbg-coroframe-entry-intrinsic/88269

This patch is the second and last in a stack of patches, with the one
preceding it being: llvm/llvm-project#168132
…#169364)

This is to resolve a regression caused by #168534.

Now when we have an anonymous object like a struct or union that has a
typedef attached, we print the typedef name instead of listing it as
anonymous.
This patch adds Mustache HTML tests alongside the legacy HTML backend
for namespace output. This way, we can see exactly where the output
currently differs before replacing the legacy backend.

The same thing will be done for all other tests where the legacy HTML
backend is tested.
Changes: Fix a missed update to WidenGEP::usesFirstLaneOnly, and include
reduced-case test that was previously hitting the new assert: the
underlying reason was that VPWidenGEP::usesScalars was too weak, and the
single-scalar WidenGEP was not narrowed by narrowToSingleScalarRecipes.

This allows us to strip a special case in VPWidenGEP::execute.
In preparation to extend the work done by dfa665f ([VPlan] Add
transformation to narrow interleave groups) to make the narrowing more
powerful, pre-commit a test case from #128062.
…n (#169114)

The `acc.present` Op as generated by ACCImplicitData does not provide a
way to differentiate between `acc.present` ops that are generated
implicitly and the ones that are generated as result of an explicit
`default(present)` clause in the source code. This differentiation would
allow for better communication to the user on the decisions made by the
compiler while managing data automatically between the host and the
device. This commit adds this information as a discardable attribute on
the `acc.present` op.
…#169055)

This reverts commit b83e458.

Also undo the use of namespace qualifier for `ReducePassList` as that
seems to cause build failures.
Just like the last handful of patches that did copy, copyin, copyout,
     create, etc, this patch has the exact same behavior, except the
     entry op is a present, and the exit is delete.
bashbaug and others added 2 commits December 6, 2025 09:18
Adds initial (preview) support for device scope barriers via
SPV_INTEL_device_barrier.

See: #12092

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@36a6c287e3ecbb7
Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
@iclsrc iclsrc added the disable-lint Skip linter check step and proceed with build jobs label Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disable-lint Skip linter check step and proceed with build jobs

Projects

None yet

Development

Successfully merging this pull request may close these issues.