[llvm] r197098 - Add isBarrier to SDep

Hal Finkel hfinkel at anl.gov
Wed Dec 11 16:19:07 PST 2013


Author: hfinkel
Date: Wed Dec 11 18:19:07 2013
New Revision: 197098

URL: http://llvm.org/viewvc/llvm-project?rev=197098&view=rev
Log:
Add isBarrier to SDep

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.

Modified:
    llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h

Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=197098&r1=197097&r2=197098&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Wed Dec 11 18:19:07 2013
@@ -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.





More information about the llvm-commits mailing list