[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:12:05 PDT 2025


nikic wrote:

> The printing of _**memory(target1: /_aarch64.fpmr_/ read)**_ is happening in the file Attributes.cpp and that is the part I may lack understanding of how to link this with the target architecture. I will need to add a Target hook in that part of the code, but atm there is not information about the target.

Right, that's the challenge with making any of this target-dependent. The best idea I have to do this without a lot of changes would be to optionally pass down the Triple to `Attribute::getAsString` and make the meaning triple-based, without having to involve the actual backend. (The mapping could be stored in TargetParser, which is where various target-specific but backend-independent information lives. And I think TableGen also links to TargetParser, which is the other place that would need this information.)

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


More information about the llvm-commits mailing list