misched: Don't consider artificial edges weak edges.

For now be more conservative in case other out-of-tree schedulers rely
on the old behavior of artificial edges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167808 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/ScheduleDAG.cpp b/lib/CodeGen/ScheduleDAG.cpp
index 6224036..0c50db8 100644
--- a/lib/CodeGen/ScheduleDAG.cpp
+++ b/lib/CodeGen/ScheduleDAG.cpp
@@ -100,11 +100,8 @@
     ++NumPreds;
     ++N->NumSuccs;
   }
-  // SD scheduler relies on artificial edges to enforce physreg
-  // antidependence, so it doesn't treat them as weak edges.
-  bool isWeak = D.isWeak() && N->isInstr();
   if (!N->isScheduled) {
-    if (isWeak) {
+    if (D.isWeak()) {
       ++WeakPredsLeft;
     }
     else {
@@ -113,7 +110,7 @@
     }
   }
   if (!isScheduled) {
-    if (isWeak) {
+    if (D.isWeak()) {
       ++N->WeakSuccsLeft;
     }
     else {
@@ -160,9 +157,8 @@
         --NumPreds;
         --N->NumSuccs;
       }
-      bool isWeak = D.isWeak() && N->isInstr();
       if (!N->isScheduled) {
-        if (isWeak)
+        if (D.isWeak())
           --WeakPredsLeft;
         else {
           assert(NumPredsLeft > 0 && "NumPredsLeft will underflow!");
@@ -170,7 +166,7 @@
         }
       }
       if (!isScheduled) {
-        if (isWeak)
+        if (D.isWeak())
           --N->WeakSuccsLeft;
         else {
           assert(N->NumSuccsLeft > 0 && "NumSuccsLeft will underflow!");