summaryrefslogtreecommitdiff
path: root/llvm/lib/Support/ModRef.cpp
AgeCommit message (Collapse)Author
2025-02-13[IR][ModRef] Introduce `errno` memory locationAntonio Frighetto
Model C/C++ `errno` macro by adding a corresponding `errno` memory location kind to the IR. Preliminary work to separate `errno` writes from other memory accesses, to the benefit of alias analyses and optimization correctness. Previous discussion: https://discourse.llvm.org/t/rfc-modelling-errno-memory-effects/82972.
2025-01-13[IR] Introduce captures attribute (#116990)Nikita Popov
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.
2024-09-23[NFC] Fix line endings for ModRef.cpp/OptionStrCmp.cpp (#109712)Rahul Joshi
2024-08-29[NFC][Support] Eliminate ',' at end of MemoryEffects print (#106545)Rahul Joshi
- Eliminate comma at end of a MemoryEffects print. - Added basic unit test to validate that.
2024-08-21[NFC][Support] Move ModRef/MemoryEffects printers to their own file (#105367)Rahul Joshi
- Move raw_ostream << operators for `ModRef` and `MemoryEffects` to a new ModRef.cpp file under llvm/Support (instead of AliasAnalysis.cpp) - This enables calling these operators from `Core` files like Instructions.cpp (for instance for debugging). Currently, they live in `LLVMAnalysis` which cannot be linked with `Core`.