aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SelectionDAGNodes.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-16 05:49:24 +0000
committerChris Lattner <sabre@nondot.org>2008-01-16 05:49:24 +0000
commit572dee71af1313e6742e1dfd5274fff326b9ef1c (patch)
tree12c20642044bdae9b10cc2d0a5acc6b713c4e422 /include/llvm/CodeGen/SelectionDAGNodes.h
parent8c231e5dda26b790ff388fe2f70eeeda621c9261 (diff)
Factor the ReachesChainWithoutSideEffects out of dag combiner into
a public SDOperand::reachesChainWithoutSideEffects method. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46050 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 30823833b7..fe1d4b68c2 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -780,6 +780,14 @@ public:
inline bool isTargetOpcode() const;
inline unsigned getTargetOpcode() const;
+
+ /// reachesChainWithoutSideEffects - Return true if this operand (which must
+ /// be a chain) reaches the specified operand without crossing any
+ /// side-effecting instructions. In practice, this looks through token
+ /// factors and non-volatile loads. In order to remain efficient, this only
+ /// looks a couple of nodes in, it does not do an exhaustive search.
+ bool reachesChainWithoutSideEffects(SDOperand Dest, unsigned Depth = 2) const;
+
/// hasOneUse - Return true if there is exactly one operation using this
/// result value of the defining operator.
inline bool hasOneUse() const;