[llvm-commits] [llvm] r141147 - /llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp

Akira Hatanaka ahatanaka at mips.com
Tue Oct 4 18:09:37 PDT 2011


Author: ahatanak
Date: Tue Oct  4 20:09:37 2011
New Revision: 141147

URL: http://llvm.org/viewvc/llvm-project?rev=141147&view=rev
Log:
Add comments and move assignment statement. If sawStore is true, sawLoad does
not have to be set.


Modified:
    llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp

Modified: llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp?rev=141147&r1=141146&r2=141147&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp Tue Oct  4 20:09:37 2011
@@ -174,10 +174,12 @@
   if (candidate->isImplicitDef() || candidate->isKill())
     return true;
 
+  // Loads or stores cannot be moved past a store to the delay slot
+  // and stores cannot be moved past a load. 
   if (candidate->getDesc().mayLoad()) {
-    sawLoad = true;
     if (sawStore)
       return true;
+    sawLoad = true;
   }
 
   if (candidate->getDesc().mayStore()) {





More information about the llvm-commits mailing list