[llvm] [SelectionDAG] Virtualize isTargetStrictFPOpcode / isTargetMemoryOpcode (PR #119969)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 01:26:27 PST 2024


================
@@ -35,6 +35,19 @@ class SelectionDAGTargetInfo {
   SelectionDAGTargetInfo &operator=(const SelectionDAGTargetInfo &) = delete;
   virtual ~SelectionDAGTargetInfo();
 
+  /// Returns true if a node with the given target-specific opcode has
+  /// a memory operand. Nodes with such opcodes can only be created with
+  /// `SelectionDAG::getMemIntrinsicNode`.
+  virtual bool isTargetMemoryOpcode(unsigned Opcode) const { return false; }
----------------
RKSimon wrote:

We already have isBinOp / isCommutativeBinOp that do something similar that inherit from TargetLoweringBase - why not put them there instead?

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


More information about the llvm-commits mailing list