aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/TargetParser/TargetParserTest.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2025-01-13 14:40:25 +0100
committerGitHub <noreply@github.com>2025-01-13 14:40:25 +0100
commit22e9024c9f374c0c740647829050c289673dbb11 (patch)
treee922529b1189c0423dfad083bd757023201bf16a /llvm/unittests/TargetParser/TargetParserTest.cpp
parentd6f7f2a5fa0e305253f936cdc8364eecfd568121 (diff)
downloadllvm-22e9024c9f374c0c740647829050c289673dbb11.zip
llvm-22e9024c9f374c0c740647829050c289673dbb11.tar.gz
llvm-22e9024c9f374c0c740647829050c289673dbb11.tar.bz2
[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.
Diffstat (limited to 'llvm/unittests/TargetParser/TargetParserTest.cpp')
0 files changed, 0 insertions, 0 deletions