Add isBarrier to SDep
authorHal Finkel <hfinkel@anl.gov>
Thu, 12 Dec 2013 00:19:07 +0000 (00:19 +0000)
committerHal Finkel <hfinkel@anl.gov>
Thu, 12 Dec 2013 00:19:07 +0000 (00:19 +0000)
SDep had is* functions for the other kinds of order dependencies (isMustAlias,
isWeak, isArtificial, etc.), but not for barrier. Upcoming commits in the
PowerPC backend will make use of this function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197098 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/ScheduleDAG.h

index 66bf8c5dd77c5ed01b0d8ec1687431bbb1115ec9..c49a9a7f569a9bf1a42bc2235f2079a07e89148b 100644 (file)
@@ -184,6 +184,12 @@ namespace llvm {
                                     || Contents.OrdKind == MustAliasMem);
     }
 
+    /// isBarrier - Test if this is an Order dependence that is marked
+    /// as a barrier.
+    bool isBarrier() const {
+      return getKind() == Order && Contents.OrdKind == Barrier;
+    }
+
     /// isMustAlias - Test if this is an Order dependence that is marked
     /// as "must alias", meaning that the SUnits at either end of the edge
     /// have a memory dependence on a known memory location.