[llvm] [SelectionDAG] Virtualize isTargetStrictFPOpcode / isTargetMemoryOpcode (PR #119969)
Sergey Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 06:32:57 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; }
----------------
s-barannikov wrote:
I also see this class as a place for [autogenerated] target-specific queries like RISCV's [hasPassThruOp](https://github.com/llvm/llvm-project/pull/119709/files#diff-c179575972a6aa579b04129e1a96a4c1f4ac0dc457c0f647150eed1b54b5a861R58) (will take some time to scroll to the definition).
https://github.com/llvm/llvm-project/pull/119969
More information about the llvm-commits
mailing list