11309 Commits

Author SHA1 Message Date
jmriesen
18b47373cb
Updating broken/outdated links in the ProgrammerManual (#119472)
Fixes llvm/llvm-project#117897
2025-01-03 22:18:39 +01:00
Craig Topper
5ee8418057 [Docs][TableGen] Remove ReturnRange from the SearchIndex documentation. NFC
SearchIndex doesn't support ReturnRange. It is only supported for
the primary key.
2025-01-03 11:19:23 -08:00
Shao-Ce SUN
2fae5bdea7
[RISCV] Add support of Sdext,Sdtrig extentions (#120936)
`Sdext` and `Sdtrig` are RISC-V extensions related to debugging.

The full specification can be found at

https://github.com/riscv/riscv-debug-spec/releases/download/1.0.0-rc4/riscv-debug-specification.pdf
2025-01-03 17:25:42 +08:00
Sudharsan Veeravalli
532a2691bc
[RISCV] Add Qualcomm uC Xqcicli (Conditional Load Immediate) extension (#121292)
This extension adds 12 instructions that conditionally load an immediate
value.

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

This patch adds assembler only support.
2025-01-03 06:33:27 +05:30
quic_hchandel
1557eeda73
[RISCV] Add Qualcomm uC Xqciac (Load-Store Adress calculation) extension (#121037)
This extension adds 3 instructions that perform load-store address
calculation.

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

This patch adds assembler only support.

---------

Co-authored-by: Harsh Chandel <hchandel@qti.qualcomm.com>
Co-authored-by: Sudharsan Veeravalli <quic_svs@quicinc.com>
2024-12-29 11:14:12 +05:30
Kinoshita Kotaro
88d04be815
[AArch64][docs] Add release notes for FUJITSU-MONAKA support (#120684)
Adds release notes for the FUJITSU-MONAKA support introduced in PR #118432.
These notes were missing from the original PR.
2024-12-25 10:59:59 +09:00
Aiden Grossman
24ff23fb3a [llvm-exegesis][Docs] Add documentation on benchmark-process-cpu option
This patch adds documentation on the benchmark-process-cpu option. I
apparently did not add any documentation when originally implementing
the feature.
2024-12-24 21:54:30 +00:00
Richard Dzenis
334a5766d7
[llvm-objcopy] Add support of symbol modification flags for MachO (#120895)
This patch adds support of the following llvm-objcopy flags for MachO:

- `--globalize-symbol`, `--globalize-symbols`,
- `--keep-global-symbol`, `-G`, `--keep-global-symbols`,
- `--localize-symbol`, `-L`, `--localize-symbols`,
- `--skip-symbol`, `--skip-symbols`.

Code in `updateAndRemoveSymbols` for MachO
is kept similar to its version for ELF.

Fixes #120894
2024-12-24 16:05:10 +02:00
Vy Nguyen
dbae7176a6
Reapply "[llvm]Add a simple Telemetry framework" (#120769) (#121003)
This reverts commit 2ec6174bef4bc9ef3d5cedbffd7169017c9669c3.

New changes:
 - Use explicit overloads of write(<int types>)
 - Fix link error due to missing dependency (lib/Support)
 - Updated tests and docs
2024-12-23 17:23:43 -05:00
Richard Dzenis
944b6f8523 [llvm][NFC] Fix typo in ReleaseNotes 2024-12-23 13:37:00 +02:00
Srinivasa R
3f89279609
[NVPTX] Add intrinsics for wgmma.fence PTX instructions (#120523)
This PR adds NVVM intrinsics and NVPTX codegen for:

-
[wgmma.fence.sync.aligned](https://docs.nvidia.com/cuda/parallel-thread-execution/#asynchronous-warpgroup-level-matrix-instructions-wgmma-fence)
-
[wgmma.commit_group.sync.aligned](https://docs.nvidia.com/cuda/parallel-thread-execution/#asynchronous-warpgroup-level-matrix-instructions-wgmma-commit-group)
-
[wgmma.wait_group.sync.aligned](https://docs.nvidia.com/cuda/parallel-thread-execution/#asynchronous-warpgroup-level-matrix-instructions-wgmma-wait-group)
2024-12-20 15:25:06 -05:00
Vy Nguyen
2ec6174bef
Revert "[llvm]Add a simple Telemetry framework" (#120769)
Reverts llvm/llvm-project#102323
Reason: broke CI
2024-12-20 11:27:04 -05:00
Vy Nguyen
8c0090030b
[llvm]Add a simple Telemetry framework (#102323)
Objective:

- Provide a common framework in LLVM for collecting various usage
metrics
-  Characteristics: 
  -   Extensible and configurable by: 
    -  tools in LLVM that want to use it 
    -  vendors in their downstream codebase 
    -  tools users (as allowed by vendor)


Background:
The framework was originally proposed only for LLDB, but there were
quite a few requests  to move it to llvm/lib given telemetry
is a common use case in a lot of tools, not just LLDB.

See more details on the design and discussions here on the RFC:
https://discourse.llvm.org/t/rfc-lldb-telemetry-metrics/64588/20?u=oontvoo

---------

Co-authored-by: Alina Sbirlea <alina.g.simion@gmail.com>
Co-authored-by: James Henderson <James.Henderson@sony.com>
Co-authored-by: Pavel Labath <pavel@labath.sk>
2024-12-20 11:04:55 -05:00
Martin Storsjö
451a80ccc0
[docs] Mention ffmpeg and dav1d in llvm-test-suite (#120570)
Since https://github.com/llvm/llvm-test-suite/pull/182 and
https://github.com/llvm/llvm-test-suite/pull/188, these projects can now
be added as external projects within llvm-test-suite.
2024-12-20 14:39:05 +02:00
David Spickett
2fa2c2197d
[llvm][docs] MemTagSanitizer is only supported on AArch64 Android (#120545)
```
$ ./bin/clang /tmp/test.c -o /tmp/test.o -target aarch64-linux -march=armv8+memtag -fsanitize=memtag-stack
clang: error: unsupported option '-fsanitize=memtag*' for target 'aarch64-unknown-linux'
```
But this works:
```
$ ./bin/clang /tmp/test.c -o /tmp/test.o --target=aarch64-linux-android -march=armv8+memtag -fsanitize=memtag-stack
```

Due to this check in Clang:

2210da3b82/clang/lib/Driver/ToolChains/CommonArgs.cpp (L1651)

Likely because the required notes and dynamic loader support only exist
for Android.

You can get around this, sort of, by not linking the file. However this
means you have to provide your own way of loading it, so it doesn't
change the statement that this feature is Android only.

https://github.com/llvm/llvm-project/issues/64692 also confirms that the
intent is to only support Android at this time.

And while I'm here, suggest an additive set of flags that can also be
used.
2024-12-20 10:24:23 +00:00
Mehdi Amini
b13592219c
[Doc] Add a section on CI to the GitHub documentation (#85376)
See
https://discourse.llvm.org/t/rfc-add-a-warning-when-bypassing-the-premerge-testing/77610
for context.
2024-12-20 01:28:36 +01:00
Justin Bogner
aa07f92210
[DirectX][SPIRV] Consistent names for HLSL resource intrinsics (#120466)
Rename HLSL resource-related intrinsics to be consistent with the naming
conventions discussed in [wg-hlsl:0014].

This is an entirely mechanical change, consisting of the following
commands and automated formatting.

```sh
git grep -l handle.fromBinding | xargs perl -pi -e \
  's/(dx|spv)(.)handle.fromBinding/$1$2resource$2handlefrombinding/g'
git grep -l typedBufferLoad_checkbit | xargs perl -pi -e \
  's/(dx|spv)(.)typedBufferLoad_checkbit/$1$2resource$2loadchecked$2typedbuffer/g'
git grep -l typedBufferLoad | xargs perl -pi -e \
  's/(dx|spv)(.)typedBufferLoad/$1$2resource$2load$2typedbuffer/g'
git grep -l typedBufferStore | xargs perl -pi -e \
  's/(dx|spv)(.)typedBufferStore/$1$2resource$2store$2typedbuffer/g'
git grep -l bufferUpdateCounter | xargs perl -pi -e \
  's/(dx|spv)(.)bufferUpdateCounter/$1$2resource$2updatecounter/g'
git grep -l cast_handle | xargs perl -pi -e \
  's/(dx|spv)(.)cast.handle/$1$2resource$2casthandle/g'
```

[wg-hlsl:0014]: https://github.com/llvm/wg-hlsl/blob/main/proposals/0014-consistent-naming-for-dx-intrinsics.md
2024-12-19 12:17:21 -07:00
Tyler Nowicki
2302142f23
[Coroutines][Docs] Add a discussion on the handling of certain parameter attribs (#117183)
ByVal arguments and Swifterror require special handling in the coroutine
passes. The goal of this section is to provide a description of how
these parameter attributes are handled.
2024-12-18 23:47:00 -05:00
Peter Smith
0e324b3f95
[DOCS] Remove bullet point on improving security over time. (#116980)
Remove the 6th bullet point "Strive to improve security over time, for
example by adding additional testing, fuzzing and hardening after fixing
issues."

At the security group meeting on 2024-11-19 we discussed the role the
security group was performing in practice. We are in effect acting as a
security response group, dealing with issues raised via the process
given in the LLVM Security group page. We are not proactively adding
additional testing fuzzing and hardening. While this could be considered
an aspirational goal, it may give the implication that the LLVM Security
Group is handling or at worst guaranteeing security for the LLVM project
when in practice it is not.

Meeting notes:

https://discourse.llvm.org/t/llvm-security-group-public-sync-ups/62735/32
2024-12-18 08:41:20 +00:00
Peter Smith
ccb66bff3c
[DOCS] Rename LLVM Security Group to LLVM Security Response Group. (#116986)
Rename LLVM Security Group to LLVM Security Response Group. Take the
opportunity to canonicalise security group and Security Group to LLVM
Security Response Group.

At the 2024-11-19 LLVM Security Group meeting [1] we discussed that in
practice the LLVM Security Group was performing an incident response
role, but it was not proactively adding additional testing, fuzzing and
hardening. We do not want projects that use LLVM to see the LLVM
Security Group as guaranteeing security for LLVM.

We decided that it would be useful to rename the group to LLVM Security
Response Group as that reflects the work that it is doing.

There may be a case for a proactive security group with a different
remit, but this is out of scope of this commit.

[1]

https://discourse.llvm.org/t/llvm-security-group-public-sync-ups/62735/32
2024-12-18 08:39:22 +00:00
Craig Topper
6fbfbd7c88
[RISCV] Add some additional notes about mask pseudo instructions to RISCVVectorExtension.rst. NFC (#120337) 2024-12-17 21:32:06 -08:00
Krzysztof Drewniak
b24caf3d2b
[llvm][TableGen] Add a !initialized predicate to allow testing for ? (#117964)
There are cases (like in an upcoming patch to MLIR's `Property` class)
where the ? value is a useful null value. However, existing predicates
make ti difficult to test if the value in a record one is operating is ?
or not.

This commit adds the !initialized predicate, which is 1 on concrete,
non-? values and 0 on ?.

---------

Co-authored-by: Akshat Oke <Akshat.Oke@amd.com>
2024-12-17 20:34:35 -06:00
Nick Desaulniers
7153a21916
[libc][docs] update sphinx requirement hashes (#120315)
Link: #120274
2024-12-17 14:14:03 -08:00
Nick Desaulniers
4c5ddc9ed4
[libc][docs] add redirect for math/index.html (#120274)
commit a9aff440d9dd ("[libc][docs] reorganize documentation (#118836)")

moved https://libc.llvm.org/math/index.html to
https://libc.llvm.org/headers/math/index.html which makes links from
various slide decks stale.

There's an extension for sphinx that can generate redirects. Add a dependency
on that, then use it to create a redirect so that those older links still work.

I was able to install this sphinx extension via:

    $ sudo apt install python3-sphinx-reredirects

We may need to install this on whatever server generates the llvm
documentation.
2024-12-17 10:37:21 -08:00
Fangrui Song
c6ff809ae9
[llvm-mc] Add --hex to disassemble hex bytes
`--disassemble`/`--cdis` parses input bytes as decimal, 0bbin, 0ooct, or
0xhex. While the hexadecimal digit form is most commonly used, requiring
a 0x prefix for each byte (`0x48 0x29 0xc3`) is cumbersome.

Tools like xxd -p and rz-asm use a plain hex dump form without the 0x
prefix or space separator. This patch adds --hex to disassemble such hex
bytes with optional whitespace.

```
% rz-asm -a x86 -b 64 -d 4829c34829c4
sub rbx, rax
sub rsp, rax

% llvm-mc -triple=x86_64 --cdis --hex --output-asm-variant=1 <<< 4829c34829c4
        .text
        sub     rbx, rax
        sub     rsp, rax
```

Pull Request: https://github.com/llvm/llvm-project/pull/119992
2024-12-16 21:05:08 -08:00
Vyacheslav Levytskyy
978de2d666
[SPIR-V] Add saturation and float rounding mode decorations, a subset of arithmetic constrained floating-point intrinsics, and SPV_INTEL_float_controls2 extension (#119862)
This PR adds the following features:
* saturation and float rounding mode decorations,
* arithmetic constrained floating-point intrinsics (strict_fadd,
strict_fsub, strict_fmul, strict_fdiv, strict_frem, strict_fma and
strict_fldexp),
* and SPV_INTEL_float_controls2 extension,
* using recent improvements of emit-intrinsics step, this PR also
simplifies pre- and post-legalizer steps and improves instruction
selection.
2024-12-16 10:29:46 +01:00
Djordje Todorovic
52e9f2c52c
[RISCV] Add MIPS P8700 processor (#119882)
The P8700 is a high-performance processor from MIPS designed to meet the
demands of modern workloads, offering exceptional scalability and
efficiency. It builds on MIPS's established architectural strengths
while introducing enhancements that set it apart. For more details, you
can check out the official product page here:
https://mips.com/products/hardware/p8700/.

Scheduling model will be added in a separate commit/PR.
2024-12-13 20:54:25 +01:00
Sudharsan Veeravalli
668d9688ac
[RISCV] Add Qualcomm uC Xqcilsm (Load Store Multiple) extension (#119823)
This extension adds 6 instructions that can do multi-word load/store.

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

This patch adds assembler only support.
2024-12-14 00:06:58 +05:30
AidinT
6f8a363a48
[Kaleidoscope] Add mem2reg pass to function pass manager (#119707)
Kaleidoscope has switched to new pass manager before (#72324), but both
code and tutorial document have some missing parts.

This pull request fixes the following problems:
1. Adds `PromotePass` to the function pass manager. This pass was
removed during the switch from legacy pass manager to the new pass
manager.
2. Syncs the tutorial with the code.
2024-12-12 16:25:09 +01:00
quic_hchandel
0614c601b4
[RISCV] Add Qualcomm uC Xqcics(Conditional Select) extension (#119504)
The Qualcomm uC Xqcics extension adds 8 conditional select instructions.

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

This patch adds assembler only support.

---------

Co-authored-by: Harsh Chandel <hchandel@qti.qualcomm.com>
2024-12-12 11:12:09 +05:30
Florian Hahn
5fae408d3a
[VPlan] Dispatch to multiple exit blocks via middle blocks. (#112138)
A more lightweight variant of
https://github.com/llvm/llvm-project/pull/109193,
which dispatches to multiple exit blocks via the middle blocks.

The patch also introduces a bit of required scaffolding to enable
early-exit vectorization, including an option. At the moment, early-exit
vectorization doesn't come with legality checks, and is only used if the
option is provided and the loop has metadata forcing vectorization. This
is only intended to be used for testing during bring-up, with @david-arm
enabling auto early-exit vectorization plugging in the changes from
https://github.com/llvm/llvm-project/pull/88385.

PR: https://github.com/llvm/llvm-project/pull/112138
2024-12-11 21:11:05 +00:00
Abhay Kanhere
de56df9eb5
[Nomination] Add additional Apple representative to the Security Group (#118571)
I'd like to nominate myself as an additional Apple representative
(vendor contact) on the llvm security group.

I met many of you at the llvm-dev meeting roundtable(s) in Santa Clara.
I closely work with @ahmedbougacha @jroelofs at Apple.

- Abhay
2024-12-11 11:00:08 -08:00
Nuno Lopes
03661fbe45 [docs][UB] add section on poison propagation through select
Examples from Nikita Popov, thank you!
2024-12-11 16:52:03 +00:00
Nuno Lopes
0100c631f8
[docs] Add guide about Undefined Behavior (#119220)
Thanks Antonio Frighetto, John Regehr, and Nikita Popov for reviewing this!
2024-12-11 12:23:51 +00:00
Guillaume DI FATTA
a1ee1a9126
[CodeGen] @llvm.experimental.stackmap make operands immediate (#117932)
This pull request modifies the behavior of the
`@llvm.experimental.stackmap` intrinsic to require that its two first
operands (`id` and `numShadowBytes`) be **immediate values**. This
change ensures that variables cannot be passed as two first arguments to
this intrinsic.


Related Issue: https://github.com/llvm/llvm-project/issues/115733

### Testing
- Added new test cases to ensure errors are emitted for non-immediate
operands.
- Ran the full LLVM test suite to verify no regressions were introduced.
2024-12-11 17:41:19 +08:00
anoopkg6
dc04d414df
SystemZ: Add support for __builtin_setjmp and __builtin_longjmp. (#119257)
This pr includes fixes for original pr##116642.
Implementation for __builtin_setjmp and __builtin_longjmp for SystemZ..
2024-12-10 19:50:51 +01:00
Anastasia Stulova
dadd8455fe
Removed Anastasia Stulova from Office Hours Calendar. (#119384)
Unfortunately, due to other commitments I am no longer able to host this
community meeting.

Co-authored-by: Anastasia Stulova <astulova@nvidia.com>
2024-12-10 14:52:01 +00:00
Amara Emerson
a4c7c66098
[GlobalISel] Document minimum legality requirements for G_IMPLICIT_DEF. (#117609)
The reason for this change is to clarify an existing technical
restriction of LLVM: there needs to be a way to implicitly define a type
if there is any way to legally define that type by another means.
2024-12-09 22:10:13 -08:00
Simon Pilgrim
290a111792
[docs] Add a brief description of using -fveclib to enable some math library vectorizations (#119215)
Fixes #62283
2024-12-09 15:06:23 +00:00
Thorsten Schütt
fc2cc018ec
[GlobalISel] list undocumented opcodes in docs (#119089) 2024-12-08 16:35:33 +01:00
Austin Kerbow
aebd3389a9
[AMDGPU] Fix user SGPR alloc order in docs (#119092)
NFC. Preload kernarg SGPRs are allocated after the private segment size
SGPR. This patch updates AMDGPUUsage.rst to reflect this.
2024-12-07 13:08:35 -08:00
Feng Zou
94c6dd62fa
[docs] Update release notes for APX relocation types (#118575) 2024-12-07 21:27:10 +08:00
Ulrich Weigand
8787bc72a6 Revert "[SystemZ] Add support for __builtin_setjmp and __builtin_longjmp (#116642)"
This reverts commit 030bbc92a705758f1131fb29cab5be6d6a27dd1f.
2024-12-07 00:55:54 +01:00
Jeffrey Byrnes
9ac52ce8d6
[AMDGPU] Add iglp_opt(3) for simple mfma / exp interleaving (#117269)
Adds a minimal iglp_opt to do simple exp / mfma interleaving.
2024-12-06 15:19:07 -08:00
anoopkg6
030bbc92a7
[SystemZ] Add support for __builtin_setjmp and __builtin_longjmp (#116642)
Implementation for __builtin_setjmp and __builtin_longjmp for SystemZ.
2024-12-06 23:33:33 +01:00
Chandler Carruth
28bba0d717
Bump minimum MSVC version by one dot release to VS 2019 16.8 (#118833)
This is a small change, but unblocks using longer string literals in
LLVM's source code, and hopefully isn't disruptive.

Discussed in an RFC here:
https://discourse.llvm.org/t/rfc-raising-minimum-msvc-version-by-one-dot-release/
2024-12-06 01:48:02 -08:00
Dmitry Sidorov
d057b53a7d
[SPIR-V] Add SPV_INTEL_joint_matrix extension (#118578)
The spec is available here:
https://github.com/intel/llvm/pull/12497

The PR doesn't add OpCooperativeMatrixApplyFunctionINTEL instruction as
it's still experimental and not properly tested E2E.

The PR also fixes few bugs in the related code:
1. CooperativeMatrixMulAddKHR optional operand must be literal, not a
constant;
2. Fixed available capabilities table creation for a case, when a single
extension adds few capabilities, that occupy not contiguous op codes.

---------

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
2024-12-04 19:00:19 +01:00
Rahul Joshi
e2c3d16282
[NFC] Eliminate need of Emacs tag and file name in file header (#118553)
- Simplify file header to not require file name and C++ Emacs tag.

See
https://discourse.llvm.org/t/is-c-in-header-files-still-relevant/83124/1
2024-12-04 08:57:27 -08:00
Thorsten Schütt
148fdc519c
[GlobalISel] Add G_ABDS and G_ABDU instructions (#118122)
The DAG has the same instructions: the signed and unsigned absolute
difference of it's input. For AArch64, they map to uabd and sabd for
Neon and SVE. The Neon and SVE instructions will require custom
patterns.

They are pseudo opcodes and are not imported by the IRTranslator. We
need combines to create them.

PowerPC, ARM, and AArch64 have native instructions.

/// i.e trunc(abs(sext(Op0) - sext(Op1))) becomes abds(Op0, Op1) 
///  or trunc(abs(zext(Op0) - zext(Op1))) becomes abdu(Op0, Op1)

For GlobalISel, we are going to write the combines in MIR patterns.

see:
llvm/test/CodeGen/AArch64/abd-combine.ll

- [ ] combine into abd
- [ ] legalize and add td patterns
2024-12-04 12:53:15 +01:00
John Brawn
ecbe4d1e36
[IR] Allow fast math flags on fptrunc and fpext (#115894)
This consists of:
 * Make these instructions part of FPMathOperator.
* Adjust bitcode/ir readers/writers to expect fast math flags on these
instructions.
 * Make IRBuilder set the fast math flags on these instructions.
 * Update langref and release notes.
* Update a bunch of tests. Some of these are due to InstCombineCasts
incorrectly adding fast math flags to fptrunc, which will be fixed in a
later patch.
2024-12-04 10:53:04 +00:00