[llvm] [RFC] Extend MemoryEffects to Support Target-Specific Memory Locations (PR #148650)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 20 03:04:02 PDT 2025


nikic wrote:

> > However, I guess that generic code doesn't actually care about what a target-specific memory location refers to. So a possible approach would be to just reserve a fixed number of target-memory locations like target1, target2, target3 etc. and then have the backend assign specific meanings to those locations. This can involve some support to register names for these memory locations, so they can be printed in a friendlier way. E.g. we could print them as memory(target1: /_aarch64.fpmr_/ read) or something, if the target information is available.
> 
> I think one of the advantage of having out-of-line target-memory locations instead of a fixed target1..targetN bitset is that we could print them friendlier, e.g., `memory(targetmem("aarch64.za": read, "aarch64.fpmr": read))`.

But how would you represent this without making MemoryEffects an expensive data structure?

https://github.com/llvm/llvm-project/pull/148650


More information about the llvm-commits mailing list