From 572dee71af1313e6742e1dfd5274fff326b9ef1c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 16 Jan 2008 05:49:24 +0000 Subject: 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 --- include/llvm/CodeGen/SelectionDAGNodes.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') 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; -- cgit v1.2.3-70-g09d2