]> granicus.if.org Git - llvm/commitdiff
[PATCH] [MachineScheduler] Check pending instructions when an instruction is scheduled
authorJames Molloy <jmolloy@google.com>
Fri, 19 Apr 2019 09:00:55 +0000 (09:00 +0000)
committerJames Molloy <jmolloy@google.com>
Fri, 19 Apr 2019 09:00:55 +0000 (09:00 +0000)
Pending instructions that may have been blocked from being available by the HazardRecognizer may no longer may not be blocked any more when an instruction is scheduled; pending instructions should be re-checked in this case.

This is primarily aimed at VLIW targets with large parallelism and esoteric constraints.

No testcase as no in-tree targets have this behavior.

Differential revision: https://reviews.llvm.org/D60861

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

lib/CodeGen/MachineScheduler.cpp

index dc2e1f94a244614d05fe0153075fe95e3b94ae1d..d56ea43437ba7739b4fc93327e66a8363960325a 100644 (file)
@@ -2159,6 +2159,8 @@ void SchedBoundary::bumpNode(SUnit *SU) {
       HazardRec->Reset();
     }
     HazardRec->EmitInstruction(SU);
+    // Scheduling an instruction may have made pending instructions available.
+    CheckPending = true;
   }
   // checkHazard should prevent scheduling multiple instructions per cycle that
   // exceed the issue width.