[llvm] [SandboxIR][Utils] Implement getMemoryLocation() (PR #109724)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 10:24:53 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) {
----------------
Sterling-Augustine wrote:
I think that makes it clearer. In my opinion, the closer we match the LLVM IR name, the easier it is to reason about.
https://github.com/llvm/llvm-project/pull/109724
More information about the llvm-commits
mailing list