[llvm] [SandboxIR] Add utility function to find the base Value for Mem instructions (PR #112030)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 11:20:38 PDT 2024
================
@@ -49,6 +49,16 @@ class Utils {
return const_cast<Instruction *>(I);
}
+ /// \Returns the base Value for load or store instruction \p LSI.
+ template <typename LoadOrStoreT>
+ static Value *getMemInstructionBase(const LoadOrStoreT *LSI) {
----------------
vporpo wrote:
Why not use LLVM's name `getUnderlyingObject()` ? getMemInstructionBase() is a better name, but since we are just wrapping LLVM's getUnderlyingObject() we should probably stick to the same name.
https://github.com/llvm/llvm-project/pull/112030
More information about the llvm-commits
mailing list