[llvm-commits] [llvm] r62365 - /llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp

Dan Gohman gohman at apple.com
Fri Jan 16 13:57:43 PST 2009


Author: djg
Date: Fri Jan 16 15:57:43 2009
New Revision: 62365

URL: http://llvm.org/viewvc/llvm-project?rev=62365&view=rev
Log:
If an anti-dependence uses a non-allocatable register, set AntiDepReg
to 0, to ensure that the subsequent code doesn't try to break the
dependence.

Modified:
    llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp

Modified: llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp?rev=62365&r1=62364&r2=62365&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp (original)
+++ llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp Fri Jan 16 15:57:43 2009
@@ -442,7 +442,9 @@
           AntiDepReg = Edge->getReg();
           assert(AntiDepReg != 0 && "Anti-dependence on reg0?");
           // Don't break anti-dependencies on non-allocatable registers.
-          if (AllocatableSet.test(AntiDepReg)) {
+          if (!AllocatableSet.test(AntiDepReg))
+            AntiDepReg = 0;
+          else {
             // If the SUnit has other dependencies on the SUnit that it
             // anti-depends on, don't bother breaking the anti-dependency
             // since those edges would prevent such units from being





More information about the llvm-commits mailing list