[llvm] [VPlan] Handle some VPInstructions in may{Read,Write}FromMemory (PR #120058)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 13:44:17 PST 2025


================
@@ -1351,6 +1351,27 @@ class VPInstruction : public VPRecipeWithIRFlags,
     }
   }
 
+  /// Returns true if the underlying opcode may read from or write to memory.
+  bool opcodeMayReadOrWriteFromMemory() const {
+    if (Instruction::isBinaryOp(getOpcode()))
----------------
fhahn wrote:

Would probably be better to move this to VPlanRecipes.cpp, so it is slightly easier to look up from the uses in the file

And also make private, to encourage the other general helpers to be used.

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


More information about the llvm-commits mailing list