[llvm] [RISCV][IA] Factor out code for extracting operands from mem insts [nfc] (PR #149344)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 18 10:01:31 PDT 2025


================
@@ -102,6 +102,52 @@ static bool isMultipleOfN(const Value *V, const DataLayout &DL, unsigned N) {
   return false;
 }
 
+static bool getMemOperands(IRBuilderBase &Builder, unsigned Factor,
----------------
mshockwave wrote:

for reducing the number of function arguments, DataLayout could be obtained from the load instruction; I don't think we really need to pass in the IRBuilder here: we can just create a new local one inside this function using the load instruction as the insert point, since all the new instructions we'll insert here always go before the load instruction.

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


More information about the llvm-commits mailing list