11339 Commits

Author SHA1 Message Date
Michal Paszkowski
5af7905302
Revert "[SPIR-V] Add SPIRV to LLVM_ALL_TARGETS" (#123532)
Reverts llvm/llvm-project#119653
2025-01-20 00:33:14 +01:00
Michal Paszkowski
c46df85380
[SPIR-V] Add SPIRV to LLVM_ALL_TARGETS (#119653)
This commit promotes the SPIR-V backend from experimental to official
status. As a result, SPIR-V will be built by default, simplifying
integration and increasing accessibility for downstream projects.

Discussion and RFC on Discourse:
https://discourse.llvm.org/t/rfc-promoting-spir-v-to-an-official-target/83614
2025-01-20 00:02:46 +01:00
DeNiCoN
293dbea8b0
Fix some typos (#123506)
Fixes some typos in the documentation
2025-01-19 16:53:39 +01:00
Pavel Labath
f711aa9e5d
[llvm][Docs] Add release note about LLDB core file improvements (#123062) 2025-01-16 08:29:40 +01:00
Min Hsu
72225ca27f Revert "Reland: "[Exegesis] Add the ability to dry-run the measurement phase (#121991)" (#122775)"
This reverts commit a39aaf35d3858a5542f532e399482c2bb0259dac and
63d3bd6d0caf8185aba49540fe2f67512fdf3a98.

Due to test failures on MacOSX.
2025-01-14 14:18:58 -08:00
Pavel Labath
7900769985
[llvm][Docs] Add a release note about the lldb DWARF indexing speedup (#122870)
The figure includes works that's already committed. In does not include
the WIP/RFC proposal in
https://discourse.llvm.org/t/rfc-speeding-up-dwarf-indexing-again/83979.
2025-01-14 15:54:19 +01:00
David Spickett
cfd7e024c6 [llvm][Docs] Add release note for lldb-server port mapping changes 2025-01-14 10:01:08 +00:00
David Spickett
04733fac10 [llvm][Docs] Formatting changes to LLDB release notes 2025-01-14 10:01:07 +00:00
Jacob Lalonde
df1a84d2ed
[llvm][Docs] Add Minidump related LLDB release notes (#122759)
Add some release notes for the Minidump work I did over the last few
months.
2025-01-14 09:35:41 +00:00
jimingham
386dec2be9
Update ReleaseNotes.md
Mentioned native command definitions and support for breaking on inlined call-sites.
2025-01-13 14:43:19 -08:00
Min-Yih Hsu
a39aaf35d3
Reland: "[Exegesis] Add the ability to dry-run the measurement phase (#121991)" (#122775)
This relands f8f8598fd886cddfd374fa43eb6d7d37d301b576

Follow up on #122371:
The problem here is a little subtle: when we dry-run the measurement
phase, we create a LLJIT instance without actually executing the
snippets. The key is, LLJIT has its own TargetMachine which uses triple
designated by LLVM_TARGET_ARCH (which is default to host). On a machine
that does not support Exegesis, the LLJIT would fail to create its
TargetMachine because llvm-exegesis don't even register the host's
target!

Putting this test into any of the target-specific folder won't help,
because it's about the host. And personally I don't really want to use
`exegesis-can-execute-<arch>` for generic tests like this -- it's too
strict as we don't actually need to execute the snippet.

My solution here is creating another test feature which is added only
when LLVM_TARGET_ARCH is supported by llvm-exegesis. This feature is
something in between `<arch>-registered-target` and
`exegesis-can-execute-<arch>`.
2025-01-13 13:42:59 -08:00
David Spickett
3d507a8905
[llvm][Docs] Add new LLDB Python guidance to release notes (#122719)
As decided in
https://discourse.llvm.org/t/rfc-lets-document-and-enforce-a-minimum-python-version-for-lldb/82731
and implemented by https://github.com/llvm/llvm-project/pull/114807.
2025-01-13 16:31:01 +00:00
Nikita Popov
22e9024c9f
[IR] Introduce captures attribute (#116990)
This introduces the `captures` attribute as described in:
https://discourse.llvm.org/t/rfc-improvements-to-capture-tracking/81420

This initial patch only introduces the IR/bitcode support for the
attribute and its in-memory representation as `CaptureInfo`. This will
be followed by a patch to upgrade and remove the `nocapture` attribute,
and then by actual inference/analysis support.

Based on the RFC feedback, I've used a syntax similar to the `memory`
attribute, though the only "location" that can be specified is `ret`.

I've added some pretty extensive documentation to LangRef on the
semantics. One non-obvious bit here is that using ptrtoint will not
result in a "return-only" capture, even if the ptrtoint result is only
used in the return value. Without this requirement we wouldn't be able
to continue ordinary capture analysis on the return value.
2025-01-13 14:40:25 +01:00
quic_hchandel
171d3edd05
[RISCV] Add Qualcomm uC Xqciint (Interrupts) extension (#122256)
This extension adds eleven instructions to accelerate interrupt
servicing.

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>
2025-01-13 16:36:05 +05:30
Justin Bogner
0e51b54b7a
[DirectX] Implement the resource.store.rawbuffer intrinsic (#121282)
This introduces `@llvm.dx.resource.store.rawbuffer` and generalizes the
buffer store docs under DirectX/DXILResources.

Fixes #106188
2025-01-12 18:52:20 -07:00
Austin Kerbow
2e5c298281
[AMDGPU] Add backward compatibility layer for kernarg preloading (#119167)
Add a prologue to the kernel entry to handle cases where code designed
for kernarg preloading is executed on hardware equipped with
incompatible firmware. If hardware has compatible firmware the 256 bytes
at the start of the kernel entry will be skipped. This skipping is done
automatically by hardware that supports the feature.

A pass is added which is intended to be run at the very end of the
pipeline to avoid any optimizations that would assume the prologue is a
real predecessor block to the actual code start. In reality we have two
possible entry points for the function. 1. The optimized path that
supports kernarg preloading which begins at an offset of 256 bytes. 2.
The backwards compatible entry point which starts at offset 0.
2025-01-10 11:39:02 -08:00
Durgadoss R
372044ee09
[NVPTX] Add TMA Bulk Copy intrinsics (#122344)
PR #96083 added intrinsics for async copy of 'tensor' data
using TMA. Following a similar design, this PR adds intrinsics
for async copy of bulk data (non-tensor variants) through TMA.

* These intrinsics optionally support multicast and cache_hints,
   as indicated by the boolean arguments at the end of the intrinsics.
* The backend looks through these flag arguments and lowers to the
   appropriate PTX instructions.
* Lit tests are added for all combinations of these intrinsics in
   cp-async-bulk.ll.
* The generated PTX is verified with a 12.3 ptxas executable.
* Added docs for these intrinsics in NVPTXUsage.rst file.

PTX Spec reference:
https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-cp-async-bulk

Signed-off-by: Durgadoss R <durgadossr@nvidia.com>
2025-01-10 22:31:53 +05:30
Ayokunle Amodu
a2995cb4bb
[LangRef] Fix code segment and numbering issue in the 'call' instruction section (#122294)
Fixes issue #122084.

Under "Arguments" in the 'call' instruction section, there was some text
included in the code segment so I edited it out. Also fixed the
numbering issue in that section.
2025-01-10 15:30:51 +01:00
Heejin Ahn
a8e1135baa
[WebAssembly] Add -wasm-use-legacy-eh option (#122158)
This replaces the existing `-wasm-enable-exnref` with
`-wasm-use-legacy-eh` option, in an effort to make the new standardized
exnref proposal the 'default' state and the legacy proposal needs to be
separately enabled an option. But given that most users haven't switched
to the new proposal and major web browsers haven't turned it on by
default, this `-wasm-use-legacy-eh` is turned on by default, so nothing
will change for now for the functionality perspective.

This also removes the restriction that `-wasm-enable-exnref` be only
used with `-wasm-enable-eh` because this option is enabled by default.
This option does not have any effect when `-wasm-enable-eh` is not used.
2025-01-09 22:36:10 -08:00
Min-Yih Hsu
d01ae56774
Revert "[Exegesis] Add the ability to dry-run the measurement phase (… (#122371)
…#121991)"

This reverts commit f8f8598fd886cddfd374fa43eb6d7d37d301b576.

This breaks ARMv7 and s390x buildbot with the following message:
```
llvm-exegesis error: No available targets are compatible with triple "armv8l-unknown-linux-gnueabihf"
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/tcwg-buildbot/worker/clang-armv7-2stage/stage2/bin/FileCheck /home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/llvm/test/tools/llvm-exegesis/dry-run-measurement.test
```
2025-01-09 12:59:57 -08:00
Heejin Ahn
876841b0e2
[WebAssembly] Format WebAssembly ReleaseNote entries (#122203) 2025-01-09 11:37:40 -08:00
Min-Yih Hsu
f8f8598fd8
[Exegesis] Add the ability to dry-run the measurement phase (#121991)
With the new benchmark phase, `dry-run-measurement`, llvm-exegesis can
run everything except the actual snippet execution. It is useful when we
want to test some parts of the code between the `assemble-measured-code`
and `measure` phase without actually running on native platforms.
2025-01-09 09:25:51 -08:00
George Burgess IV
24203613a2
[llvm][Docs] add discord bot calendar capability notes (#122140)
The LLVM Discord bot now has the ability to scrape the LLVM calendar &
send reminders about upcoming office hours events and sync-ups. Document
that here.

While I'm in the area, add a note about the bot's ability to @mention
people when they're on buildbot blamelists.

Related to llvm/Community.o#19
2025-01-09 08:28:47 -07:00
Nikita Popov
38565da525
[LangRef] Add some documentation for ABI / call-site attributes (#121930)
Explicitly mention that attributes can be applied to call-sites, and
explain that ABI attributes between the call-site and called function
should match.

Companion lint change: https://github.com/llvm/llvm-project/pull/121929

Inspired by:
https://discourse.llvm.org/t/difference-between-call-site-attributes-and-declaration-attributes/83902
2025-01-09 09:36:04 +01:00
Craig Topper
5d03235c73
[RISCV] Add -mcpu=sifive-p550. (#122164)
This is the CPU in SiFive's HiFive Premier P550 development board.

Scheduler model will come in a later patch.
2025-01-08 21:02:46 -08:00
Justin Bogner
cba9bd5cb0
[DirectX] Implement the resource.load.rawbuffer intrinsic (#121012)
This introduces `@llvm.dx.resource.load.rawbuffer` and generalizes the
buffer load docs under DirectX/DXILResources.

This resolves the "load" parts of #106188
2025-01-08 16:56:05 -08:00
Justin Bogner
8178d3c964
[DirectX] Add getpointer docs to DXILResources.rst (#120779) 2025-01-07 07:19:41 -08:00
Justin Bogner
2c7c07df82
[DirectX] Remove the "checked" variants of dx.resource.load (#120778)
We'd introduced separate versions of `llvm.dx.resource.load` with a
struct return to handle the CheckAccessFullyMapped case without making
the IR for the common case unnecessarily complicated. However, at this
point the common case is really `resource.getpointer`, so the ergonomics
of a simplified version of `load` don't actually gain us as much as the
cost of having multiple opcodes.

Drop the `dx.resource.loadchecked` functions and have `dx.resource.load`
consistently return `{element_type, i1}`.
2025-01-07 07:18:54 -08:00
David Spickett
0fa59c6362
[llvm][Docs] Update supported hardware (#121743)
Since someone on Discord asked why macOS arm64 was not listed.

https://llvm.org/docs/GettingStarted.html#hardware

Add a few known platforms:
* Linux AArch64
* FreeBSD AArch64
* macOS arm64 (Clang build only, there might be a GCC port but I've not
used it myself)
* Windows on Arm (ARM64 as Microsoft refers to it)
2025-01-07 09:15:25 +00:00
quic_hchandel
737d6ca44d
[RISCV] Add Qualcomm uC Xqcicm (Conditional Move) extension (#121752)
The Qualcomm uC Xqcicm extension adds 13 conditional move 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>
2025-01-07 08:25:00 +05:30
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