[llvm] [LLVM]Add read and write inaccessible memory metadata (PR #154141)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 19 02:22:50 PDT 2025
================
@@ -56,6 +56,11 @@ enum class ModRefInfo : uint8_t {
/// Debug print ModRefInfo.
LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, ModRefInfo MR);
+enum class InaccessibleTargetMemLocation {
+ AARCH64_FPMR = 3,
+ AARCH64_ZA = 4,
+};
----------------
antoniofrighetto wrote:
I still somewhat think we shouldn't embed target-specific bits in IRMemLocation (or at least, I'm not sure having a enum class is a nice idea, doesn't look extendable to other architectures).
@nikic Would it make sense to extend MemoryEffectsBase with a optional storage to maintain target tags (e.g., a vector of `std::pair<TargetMemID, ModRefInfo>`)? The parser/reader could then leverage something similar to getOrInsertSyncScopeID from LLVMContext (i.e., `getOrInsertTargetMemTag("aarch64.za")` to have the TargetMemID, to work on unsigned rather than strings).
https://github.com/llvm/llvm-project/pull/154141
More information about the llvm-commits
mailing list