[PATCH] D136659: [AliasAnalysis] Introduce getModRefInfoMask() as a generalization of pointsToConstantMemory().

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 30 07:24:57 PDT 2022


nikic added inline comments.


================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:683
+  if (!Loc.Ptr)
+    return AAResultBase::getModRefInfoMask(Loc, AAQI, IgnoreLocals);
+
----------------
I'd prefer omitting this check here and instead keeping it in the fence implementation. We should try to move away from locations without pointers rather than pushing them deeper into the API.


================
Comment at: llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp:93
   // by the earlier precise query.
-  return false;
+  return ModRefInfo::ModRef;
 }
----------------
Huh, this whole function is a very complicated way to do nothing at all. The function above it as well. Not related to your patch though...


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp:131
+  if (!Loc.Ptr)
+    return AAResultBase::getModRefInfoMask(Loc, AAQI, IgnoreLocals);
+
----------------
Same here.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp:177
          F->hasParamAttribute(ArgNo, Attribute::ReadOnly))) {
-      return true;
+      return ModRefInfo::Ref;
     }
----------------
Can't we drop this part of the code entirely? This should be subsumed by the generic handling in BasicAA now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136659/new/

https://reviews.llvm.org/D136659



More information about the llvm-commits mailing list