Skip to content

Commit

Permalink
Added isUndef() interface for SDNode
Browse files Browse the repository at this point in the history
Differential Revision: http://reviews.llvm.org/D12720

llvm-svn: 247246
  • Loading branch information
Elena Demikhovsky committed Sep 10, 2015
1 parent e4405e9 commit 5cf3a02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions llvm/include/llvm/CodeGen/SelectionDAGNodes.h
Expand Up @@ -167,6 +167,7 @@ class SDValue {
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;
Expand Down Expand Up @@ -395,6 +396,9 @@ class SDNode : public FoldingSetNode, public ilist_node<SDNode> {
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
Expand Down Expand Up @@ -909,6 +913,9 @@ inline bool SDValue::isMachineOpcode() const {
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);
}
Expand Down

0 comments on commit 5cf3a02

Please sign in to comment.