11515 Commits

Author SHA1 Message Date
Jonas Devlieghere
ea8573aca5
[lldb] Add statusline to the release notes (#133281)
Add a release note for the LLDB statusline: #121860
2025-03-28 09:16:55 -07:00
Andras Gemes
579379cf7f
[Nomination] Add HighTec representatives to the Security Group (#124142)
I would like to nominate Mario Cupelli (@mariocup) and myself to join
the LLVM Security Group as representatives (vendor contacts) of [HighTec
EDV Systeme](https://github.com/hightec-rt).

Mario is the CTO of HighTec and has a strong background in compiler
safety qualification. I am a SW engineer with a focus on cybersecurity
and a goal to contribute to the LLVM Security Group.

HighTec collaborates with major silicon vendors and offers
safety-qualified C/C++ and Rust compilers based on LLVM. Our active
contributions to LLVM include work on the linker and various patches and
we are committed to further improving LLVM’s security.

Our motivation for joining the LLVM Security Group is to collaborate
with LLVM security experts, stay informed about the latest CVEs in LLVM
and meet the cybersecurity requirements of the automotive industry.
2025-03-28 14:02:57 +00:00
Pengcheng Wang
883612859b
[TableGen] Add !instances operator to get defined records (#129680)
The format is: `!instances<T>([regex])`.
    
This operator produces a list of records whose type is `T`. If
`regex` is provided, only records whose name matches the regular
expression `regex` will be included. The format of `regex` is ERE
(Extended POSIX Regular Expressions).
2025-03-28 16:31:00 +08:00
Luke Lau
cc30fbacec
[Docs][RISCV] Update RISCVVectorExtension.rst to reflect RISCVVMV0Elimination. NFC (#133058)
Also correct the old name of RISCVFoldMasks to RISCVVectorPeephole
2025-03-27 06:24:35 +02:00
Sam Elliott
6a371c7744
[RISCV] Support .option {no}exact (#122483)
This implements [the `.option exact` and `.option noexact`
proposal](https://github.com/riscv-non-isa/riscv-asm-manual/pull/122)
for RISC-V.

`.option exact` turns off:
- Compression
- Branch Relaxation
- Linker Relaxation

`.option noexact` turns these back on, and is also the default, matching
the current behaviour.
2025-03-26 11:14:16 -07:00
Ryotaro Kasuga
29ca03f19a
[Docs] Fix link in LoopTerminology (NFC) (#131138)
The link should refer to the section of 'phi' Instruction in the
LangRef, but it referred to the subsection of 'fcmp' Instruction.
Replace it with appropriate one.
2025-03-26 17:59:38 +09:00
Tom Tromey
f89129af8a
Add bit stride to DICompositeType (#131680)
In Ada, an array can be packed and the elements can take less space than
their natural object size. For example, for this type:

   type Packed_Array is array (4 .. 8) of Boolean;
   pragma pack (Packed_Array);

... each element of the array occupies a single bit, even though the
"natural" size for a Boolean in memory is a byte.

In DWARF, this is represented by putting a DW_AT_bit_stride onto the
array type itself.

This patch adds a bit stride to DICompositeType so that gnat-llvm can
emit DWARF for these sorts of arrays.
2025-03-25 17:14:07 -07:00
Julien Villette
f4bb9b53ad
[MCA] Extend -instruction-tables option with verbosity levels (#130574)
Option becomes: -instruction-tables=`<level>`
 
The choice of `<level>` controls number of printed information.
`<level>` may be `none` (default), `normal`, `full`.
Note: If the option is used without `<label>`, default is `normal`
(legacy).

When `<level>` is `full`, additional information are:
- `<Bypass Latency>`: Latency when a bypass is implemented between
operands
  in pipelines (see SchedReadAdvance).
  - `<LLVM Opcode Name>`: mnemonic plus operands identifier.
  - `<Resources units>`: Used resources associated with LLVM Opcode.
- `<instruction comment>`: reports comment if any from source assembly.

Level `full` can be used to better check scheduling info when TableGen
is modified.
LLVM Opcode name help to find right instruction regexp to fix TableGen
Scheduling Info.

-instruction-tables=full option is validated on
AArch64/Neoverse/V1-sve-instructions.s

Follow up of MR #126703

---------

Co-authored-by: Julien Villette <julien.villette@sipearl.com>
2025-03-25 09:19:57 -07:00
Sam Elliott
629ff2d7ba
[RISCV][Xqcili] Implement Load Immediate Support (#132496)
This is required to support `li`, but the code is also shared with
CodeGen so the compiler will now emit instructions from Xqcili when that
extension is enabled during compilation.

Also implemented some missed verifiers in
`RISCVInstrInfo::verifyInstruction`, some of which are required for this
change.
2025-03-25 07:59:44 -07:00
Juan Manuel Martinez Caamaño
db33978c46
[AMDGPU][GFX11] buffer_load_lds_{size} instructions do not exist (#132916)
According to the shader manual there are not buffer load lds
instructions of gfx11.

The tests for the regular `buffer_load ... lds` instructions for gfx11
are already present in AMDGPU/gfx11_asm_mubuf.s, where the compiler
fails to encode the instructions for this target.
2025-03-25 15:24:06 +01:00
Sam Elliott
4fb9650b21 [clang][docs] Release Note for RISC-V qci-(no)nest
These were omitted from the original PR (#129957)
2025-03-24 13:04:00 -07:00
Peter Collingbourne
11044de3dc Reapply "lit: Move RUN at line comment after the command."
This reverts commit 57e89c97c2c1b4e41f07a90c2f4d36649696e619.

Updated lit tests.
2025-03-24 12:01:49 -07:00
Peter Collingbourne
57e89c97c2 Revert "lit: Move RUN at line comment after the command."
This reverts commit 8d3dc1ed5656a3e69e4195d58684a7f4bf0ff5cc.

Test needs to be updated.
2025-03-24 11:47:56 -07:00
Peter Collingbourne
8d3dc1ed56
lit: Move RUN at line comment after the command.
When a developer copy/pastes a failing command line into their
shell to rerun it, they have to manually delete the "RUN: at line
N:" prefix. To make life easier for such developers, let's make it
possible to copy/paste a command without needing to modify it while
still showing the line number in the output by moving the line number
to a comment at the end of the command line.

Reviewers: jroelofs, MaskRay

Reviewed By: jroelofs, MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/132485
2025-03-24 11:29:57 -07:00
Sudharsan Veeravalli
e7107973b8
Recommit "[RISCV] Add Qualcomm uC Xqcisync (Sync Delay) extension (#132184)" (#132520)
With a minor fix for the build failures.

Original message:

This extension adds nine instructions, eight for non-memory-mapped devices synchronization and delay instruction.

The current spec can be found at:
https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.7.0

This patch adds assembler only support.

Co-authored-by: Sudharsan Veeravalli quic_svs@quicinc.com
2025-03-22 11:07:48 +05:30
Kazu Hirata
fe7776eab8 Revert "[RISCV] Add Qualcomm uC Xqcisync (Sync Delay) extension (#132184)"
This reverts commit 3840f787a21a66686f5d8bf61877d41f3a65f205.

Multiple builtbot failures have been reported:
https://github.com/llvm/llvm-project/pull/132184
2025-03-21 20:28:11 -07:00
quic_hchandel
3840f787a2
[RISCV] Add Qualcomm uC Xqcisync (Sync Delay) extension (#132184)
This extension adds nine instructions, eight for non-memory-mapped
devices synchronization and delay instruction.

The current spec can be found at:
https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.7.0

This patch adds assembler only support.

Co-authored-by: Sudharsan Veeravalli <quic_svs@quicinc.com>
2025-03-22 07:57:07 +05:30
Alexey Karyakin
c0b2c10e9f
[hexagon] Bump the default version to v68 (#132304)
Set the default processor version to v68 when the user does not specify
one in the command line. This includes changes in the LLVM backed and
linker (lld). Since lld normally sets the version based on inputs, this
change will only affect cases when there are no inputs.

Fixes #127558
2025-03-21 20:08:45 -05:00
Reid Kleckner
5b09079374
Minor developer policy edits for clarity (#132313)
There should be no substantial policy change here.

I reordered the breaking change docs after the major change docs, since
that flow made sense to me. I smoothed out some of the incremental
development policy wording to be a bit less black and white, and talk
about "preferred" and "discouraged" approaches.
2025-03-21 13:29:24 -07:00
Shilei Tian
f1ac2afe21
Reapply "[AMDGPU] Use COV6 by default (#118515)" (#130963)
This reverts commit 68bcba6d7a1cc18996c0bcb7c62267c62d2040d0.
2025-03-21 15:26:45 -04:00
Mallikarjuna Gouda
0ca10ef51b
[MIPS] Add MIPS i6400 and i6500 processors (#130587)
The i6400 and i6500 are high performance multi-core microprocessors from
MIPS that provide best in class power efficiency for use in
system-on-chip (SoC) applications. i6400 and i6500 implements Release 6
of the MIPS64 Instruction Set Architecture with full hardware
multithreading and hardware virtualization support.
2025-03-20 23:08:33 -04:00
hev
2d876ed33e
[llvm][LoongArch] Changing the default code model from small to medium for 64-bit (#132173)
Link: https://discourse.llvm.org/t/rfc-changing-the-default-code-model-for-loongarch
2025-03-21 10:15:31 +08:00
Cassandra Beckley
864a83deb0
[SPIR-V] Add support for inline SPIR-V types (#125316)
Using HLSL's [Inline
SPIR-V](https://microsoft.github.io/hlsl-specs/proposals/0011-inline-spirv.html)
features, users have the ability to use
[`SpirvType`](https://microsoft.github.io/hlsl-specs/proposals/0011-inline-spirv.html#types)
to have fine-grained control over the SPIR-V representation of a type.
As explained in the spec, this is useful because it enables vendors to
author headers with types for their own extensions.

As discussed in [Target Extension Types for Inline SPIR-V and Decorated
Types](https://github.com/llvm/wg-hlsl/pull/105), we would like to
represent the HLSL SpirvType type using a 'spirv.Type' target extension
type in LLVM IR. This pull request lowers that type to SPIR-V.
2025-03-20 15:49:44 -04:00
Craig Topper
eb77061a42
[RISCV] Add assembler support for Zvqdotq. (#132118)
Based on the 0.0.1 spec here
https://github.com/riscv/riscv-dot-product/releases/tag/v0.0.1
2025-03-20 08:38:15 -07:00
quic_hchandel
0744d4926a
[RISCV] Add Qualcomm uC Xqcilb (Long Branch) extension (#131996)
This extension adds two long branch instructions.

The current spec can be found at:
https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.7.0

This patch adds assembler only support.

Co-authored-by: Sudharsan Veeravalli <quic_svs@quicinc.com>
2025-03-20 11:14:53 +05:30
joaosaffran
d0d33d2b5b
[DirectX] Documenting Root Signature Binary representation (#131011)
Closes: #131009, #129796, #129749, #129561

---------

Co-authored-by: joaosaffran <joao.saffran@microsoft.com>
2025-03-19 21:10:32 -07:00
Kristof Beyls
9a078a372e
2024 Security Group Transparency Report (#132011)
This adds the Security Response Group's transparency report for 2024.
2025-03-19 16:26:41 +00:00
dong-miao
480202f0d1
[RISCV] Add Zilsd and Zclsd Extensions (#131094)
This commit adds the Load/Store pair instructions (Zilsd) and Compressed
Load/Store pair instructions (Zclsd).

[Specification
link](https://github.com/riscv/riscv-isa-manual/blob/main/src/zilsd.adoc).
2025-03-19 08:53:41 -07:00
Joseph Huber
cc2a86ad35
[LLVM][Docs] Add language reference for llvm.readsteadycounter (#132040)
Summary:
This was not added in the original patch, add LLVM documentation.
2025-03-19 10:30:10 -05:00
Cassandra Beckley
1f152527e0
[SPIR-V] Add support for HLSL SV_GroupIndex (#130670)
This PR lowers the `llvm.spv.flattened.thread.id.in.group` intrinsic as
a `LocalInvocationIndex` builtin variable.
2025-03-19 11:04:41 -04:00
Alex Bradbury
be0a3b223a
[IR] Allow llvm.experimental.memset.pattern to take any sized type as the pattern argument (#132026)
I initially thought starting with a more narrow definition and later
expanding would make more sense. But as pointed out in review for PR
#129220, this restriction is generating additional unnecessary work.

This patch alters the intrinsic to accept patterns of any type. Future
patches will update LoopIdiomRecognize and PreISelIntrinsicLowering to
take advantage of this. The verifier will complain if an unsized type is
used. I've additionally taken the opportunity to remove a comment from
the LangRef about some bit widths potentially not being supported by the
target. I don't think this is any more true than it is for arbitrary
width loads/stores which don't carry a similar warning that I can see.

A verifier check ensures that only sized types are used for the pattern.
2025-03-19 14:17:42 +00:00
Diana Picus
72c3c30452
[AMDGPU] Allocate scratch space for dVGPRs for CWSR (#130055)
The CWSR trap handler needs to save and restore the VGPRs. When dynamic
VGPRs are in use, the fixed function hardware will only allocate enough
space for one VGPR block. The rest will have to be stored in scratch, at
offset 0.

This patch allocates the necessary space by:
- generating a prologue that checks at runtime if we're on a compute
queue (since CWSR only works on compute queues); for this we will have
to check the ME_ID bits of the ID_HW_ID2 register - if that is non-zero,
we can assume we're on a compute queue and initialize the SP and FP with
enough room for the dynamic VGPRs
- forcing all compute entry functions to use a FP so they can access
their locals/spills correctly (this isn't ideal but it's the quickest to
implement)

Note that at the moment we allocate enough space for the theoretical
maximum number of VGPRs that can be allocated dynamically (for blocks of
16 registers, this will be 128, of which we subtract the first 16, which
are already allocated by the fixed function hardware). Future patches
may decide to allocate less if they can prove the shader never allocates
that many blocks.

Also note that this should not affect any reported stack sizes (e.g. PAL
backend_stack_size etc).
2025-03-19 13:49:19 +01:00
john-stuart2
ecae8d0f77
[Docs] Add more vector examples (#131887)
The order of parameters is derived from GenericOpcodes.td. I wanted to
keep the examples separate from the fix.
2025-03-19 08:19:20 +07:00
john-stuart2
d3bcbd6b32
[Docs] Fix concat vectors (#131860)
GenericOpcodes.td states that the number of operands are variadic.

let InOperandList = (ins type1:$src0, variable_ops);

X86 supports up to 4 inputs. The example uses 512-bit aka AVX-512 to
make it look real and show the effect of the ~many operands.

Test plan: ninja docs-llvm-html
2025-03-19 00:22:57 +07:00
Sudharsan Veeravalli
467e5a1d41
[RISCV] Add Qualcomm uC Xqcisim (Simulation Hint) extension (#128833)
This extension adds 10 instructions that provide hints to the interface
simulation environment.

The current spec can be found at:
https://github.com/quic/riscv-unified-db/releases/

This patch adds assembler only support.
2025-03-18 09:05:22 -07:00
Diana Picus
0a21ef9536
[AMDGPU] Add SubtargetFeature for dynamic VGPR mode (#130030)
This represents a hardware mode supported only for wave32 compute
shaders. When enabled, we set the `.dynamic_vgpr_en` field of
`.compute_registers` to true in the PAL metadata.

This will be changed to use an attribute after downstream consumers
have been migrated.
2025-03-18 11:48:01 +01:00
quic_hchandel
036c6cb37c
[RISCV] Add Qualcomm uC Xqcibi (Branch Immediate) extension (#130779)
This extension adds twelve conditional branch instructions that use an
immediate operand for the source.

The current spec can be found at:
https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.7.0

This patch adds assembler only support.

Co-authored-by: Sudharsan Veeravalli <quic_svs@quicinc.com>
2025-03-18 15:18:43 +05:30
Fangrui Song
e758237352
[docs] Mention --discard-locals/--discard-all change for llvm-strip
PR #130704 updated llvm-strip as well.

Suggested by @nga888

Pull Request: https://github.com/llvm/llvm-project/pull/131491
2025-03-17 20:09:52 -07:00
Alex Voicu
c1fabd681f
[llvm][AMDGPU] Enable FWD_PROGRESS bit for GFX10+ (#128367)
From GFX10 onwards it is possible to employ benevolent scheduling of
waves. This patch unconditionally enables, for the `amdhsa` OS, the bit
which controls that capability, as it is beneficial for algorithms that
rely on more complex concurrent coordination and it is generally
performance neutral otherwise.
2025-03-17 23:17:46 +00:00
Alex MacLean
0191307bb2
[IR] Allow alignstack attribute on return values (#130439)
The PTX target allows an alignment to be specified on both return values
and parameters to allow for more efficient vectorized stores. Currently
we represent these parameter alignments via the "alignstack" attribute,
but must fall back to metadata for the return value. This PR allows
"alignstack" on return values as well.
2025-03-17 14:22:08 -07:00
Shilei Tian
3959bbc134 [NFC] Remove trailing white spaces from llvm/docs/LangRef.rst 2025-03-17 11:19:09 -04:00
Aiden Grossman
1e02442df6
[Github][Docs] Add best practice for top level read permissions (#131470)
This patch adds a section pointing out how permissions should be done
within Github workflows. I believe all of our workflows are currently
compliant with this, but it helps to have something to point to
documenting the practice and especially the motivation.
2025-03-15 23:35:18 -07:00
Frederik Harwath
6962cf1700
Rename ExpandLargeFpConvertPass to ExpandFpPass (#131128)
This is meant as a preparation for PR #130988 "[AMDGPU] Implement IR
expansion for frem instruction" which implements the expansion of
another instruction in this pass. The more general name seems more
appropriate given this change and quite reasonable even without it.
2025-03-14 13:11:45 +01:00
Viktoria Maximova
a58a6a95b0
[SPIR-V] Support SPV_INTEL_fp_max_error extension for !fpmath metadata (#130619)
Specification:

https://github.khronos.org/SPIRV-Registry/extensions/INTEL/SPV_INTEL_fp_max_error.html
2025-03-14 12:12:28 +01:00
Nicolas van Kempen
0ab9f78957
[docs] Fix link appearing improperly (#131225)
See current live website:
https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access

![image](https://github.com/user-attachments/assets/f3212ca6-b2a6-4d83-9323-11ba4148d991)

Building locally, it appears correctly:

![image](https://github.com/user-attachments/assets/68f5e932-1abf-48cf-93f0-30dacb0910c6)

Feel free to merge immediately.
2025-03-13 14:51:35 -07:00
PiJoules
0f8c075f7c
[llvm] Match llvm.type.checked.load.relative semantics to llvm.load.r… (#129583)
…elative

The semantics of `llvm.type.checked.load.relative` seem to be a little
different from that of `llvm.load.relative`. It looks like the semantics
for `llvm.type.checked.load.relative` is `ptr + offset + *(ptr +
offset)` whereas the semantics for `llvm.load.relative` is `ptr + *(ptr
+ offset)`. That is, the offset for the former is added to the offset
address whereas the later has the offset added to the original pointer.

It really feels like the checked intrinsic was meant to match the
semantics of the non-checked intrinsic, but I think for all cases the
checked intrinsic is used (swift being the only use I know of), the
calculation just happens to be the same because swift always uses an
offset of zero. Likewise, all llvm tests for this intrinsic happen to
use an offset of zero.

Relative vtables in clang happens to be the first time where we're using
this intrinsic and using it with non-zero values. This updates the
semantics of the checked intrinsic to match the non-checked one.
Effectively this shouldn't change any codegen by any users of this since
all current users seem to use a zero offset.

This PR also updates some tests with non-zero offsets.
2025-03-13 14:50:41 -07:00
u4f3
e61859f14d
[RISCV] Add Qualcomm uC Xqcili (load large immediates) extension (#130012)
The Xqcili extension includes a two instructions that load large
immediates than is available with the base RISC-V ISA.

The current spec can be found at:
https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.7.0

This patch adds assembler only support.
2025-03-13 11:13:02 -07:00
Pengcheng Wang
376e3b62cd
[TableGen] Add !match operator to do regex matching (#130759)
The grammar is `!match(str, regex)` and this operator produces 1
if the `str` matches the regular expression `regex`.

The format of `regex` is ERE (Extended POSIX Regular Expressions).
2025-03-13 12:13:09 +08:00
Andrzej Warzyński
77b55c76ac
[llvm][docs] Add notes on upstreaming code from downstream projects (#129743)
For context, see:
* https://discourse.llvm.org/t/code-review-process-when-upstreaming-patches
2025-03-12 11:17:19 +00:00
Carl Ritson
d921bf233c
[AMDGPU] Extend promotion of alloca to vectors (#127973)
* Add multi dimensional array support
* Make maximum vector size tunable
* Make ratio of VGPRs used for vector promotion tunable
* Maximum array size now based on VGPR count (32b) instead of element count
2025-03-12 15:11:30 +09:00