[llvm] [LFI][AArch64] Add rewrites for memory accesses (PR #195167)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 10:11:36 PDT 2026


================
@@ -64,6 +66,97 @@ static bool isPrivilegedTPAccess(const MCInst &Inst) {
   return false;
 }
 
+// Instructions that have mayLoad/mayStore set in TableGen but don't actually
+// perform memory accesses.
+static bool isNotMemAccess(const MCInst &Inst) {
----------------
smithp35 wrote:

A couple of thoughts:
* This is only used in a double negative context `if (!isNotMemAccess)` which isn't easy to read.
* The name is a bit too general. For example I would expect lots of instructions to return true for not being a memory access.

Could be worth renaming to something like `isPseudoMemAccess` or `isFakeMemoryAccess` 

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


More information about the llvm-commits mailing list