[PATCH] D12720: isUndef() interface for SDNode - proposal

Elena Demikhovsky via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 23:34:39 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL247246: Added isUndef() interface for SDNode (authored by delena).

Changed prior to commit:
  http://reviews.llvm.org/D12720?vs=34300&id=34413#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12720

Files:
  llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h

Index: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
===================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -167,6 +167,7 @@
   inline bool isTargetMemoryOpcode() const;
   inline bool isTargetOpcode() const;
   inline bool isMachineOpcode() const;
+  inline bool isUndef() const;
   inline unsigned getMachineOpcode() const;
   inline const DebugLoc &getDebugLoc() const;
   inline void dump() const;
@@ -395,6 +396,9 @@
     return NodeType >= ISD::FIRST_TARGET_MEMORY_OPCODE;
   }
 
+  /// Return true if the type of the node type undefined.
+  bool isUndef() const { return NodeType == ISD::UNDEF; }
+
   /// Test if this node is a memory intrinsic (with valid pointer information).
   /// INTRINSIC_W_CHAIN and INTRINSIC_VOID nodes are sometimes created for
   /// non-memory intrinsics (with chains) that are not really instances of
@@ -909,6 +913,9 @@
 inline unsigned SDValue::getMachineOpcode() const {
   return Node->getMachineOpcode();
 }
+inline bool SDValue::isUndef() const {
+  return Node->isUndef();
+}
 inline bool SDValue::use_empty() const {
   return !Node->hasAnyUseOfValue(ResNo);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12720.34413.patch
Type: text/x-patch
Size: 1242 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150910/399d6daf/attachment.bin>


More information about the llvm-commits mailing list