[llvm] [SandboxIR][Utils] Implement getMemoryLocation() (PR #109724)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 10:20:39 PDT 2024


================
@@ -48,6 +51,12 @@ class Utils {
     Type *Ty = getExpectedType(V);
     return DL.getTypeSizeInBits(Ty->LLVMTy);
   }
+
+  /// Equivalent to MemoryLocation::getOrNone(I).
+  static std::optional<llvm::MemoryLocation>
+  getMemoryLocation(const Instruction *I) {
----------------
vporpo wrote:

Something like `memoryLocationGetOrNone()` ?

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


More information about the llvm-commits mailing list