4 Commits

Author SHA1 Message Date
Orlando Cazalet-Hyams
54d544b831
[KeyInstr][Clang] Ret atom (#134652)
This patch is part of a stack that teaches Clang to generate Key Instructions
metadata for C and C++.

When returning a value, stores to the `retval` allocas and branches to `return`
block are put in the same atom group. They are both rank 1, which could in
theory introduce an extra step in some optimized code. This low risk currently
feels an acceptable for keeping the code a bit simpler (as opposed to adding
scaffolding to make the store rank 2).

In the case of a single return (no control flow) the return instruction inherits
the atom group of the branch to the return block when the blocks get folded
togather.

RFC:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668

The feature is only functional in LLVM if LLVM is built with CMake flag
LLVM_EXPERIMENTAL_KEY_INSTRUCTIONs. Eventually that flag will be removed.
2025-06-04 15:43:49 +01:00
Orlando Cazalet-Hyams
94929b725f [KeyInstr] Add triple to Clang tests
Fixes various downstream bot failures ocurring with different default targets
e.g., windows due to mangling assumptions baked into the tests.
2025-05-27 10:54:44 +01:00
Orlando Cazalet-Hyams
435a542009 [KeyInstr] Fix clang tests
These broke some downstream bots for a few reasons:

init-agg.c(pp) - Hard coded GEP index size. Merged init-agg.c and
init-agg.cpp as that was the intention, and they diverged as a result
of a bad rebase.

init-static.cpp - Hard coded register names and mangling assumptions.
2025-05-23 11:19:30 +01:00
Orlando Cazalet-Hyams
398a1ac821
[KeyInstr][Clang] Static variable init atom (#134636)
This patch is part of a stack that teaches Clang to generate Key Instructions
metadata for C and C++.

RFC:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668

The feature is only functional in LLVM if LLVM is built with CMake flag
LLVM_EXPERIMENTAL_KEY_INSTRUCTIONs. Eventually that flag will be removed.
2025-05-22 17:07:43 +01:00