[llvm-commits] CVS: llvm/lib/Reoptimizer/Trigger/Trigger.cpp

Anand Shukla ashukla at cs.uiuc.edu
Mon Oct 7 03:22:01 PDT 2002


Changes in directory llvm/lib/Reoptimizer/Trigger:

Trigger.cpp updated: 1.11 -> 1.12

---
Log message:

Corrected a delay slot problem


---
Diffs of the changes:

Index: llvm/lib/Reoptimizer/Trigger/Trigger.cpp
diff -u llvm/lib/Reoptimizer/Trigger/Trigger.cpp:1.11 llvm/lib/Reoptimizer/Trigger/Trigger.cpp:1.12
--- llvm/lib/Reoptimizer/Trigger/Trigger.cpp:1.11	Sat Sep 21 00:04:26 2002
+++ llvm/lib/Reoptimizer/Trigger/Trigger.cpp	Mon Oct  7 03:21:07 2002
@@ -274,17 +274,22 @@
           //take the target of br2 and inverted condition of br1
           unsigned int invertedBranch = vm->getInvertedBranch(br1);
           
-          //insert ds1, br2, ds2 in the trace (in that order)
+          //only handling the case when ds2 == nop!
+
+          //insert  br2, ds1 in the trace (in that order)
           //store branches and PCs for later correction in branchMap
           
-          trace.push_back(ds1);
-          instIndex++;
+          assert(ds2 == 0x01000000 && 
+                 "Can't handle the case when the unconditional branch doesn't have nop in delay slot!");
+
+            //trace.push_back(ds1);
+            //instIndex++;
           
           trace.push_back(invertedBranch);
           //branchMap[instIndex] = addrbr2;
           targetMap[instIndex] = getBranchTarget(br2, addrbr2);
 
-          trace.push_back(ds2);
+          trace.push_back(ds1);
           instIndex += 2;
         }
         else{
@@ -315,6 +320,12 @@
         assert(tar2 == bbDest.first && "Last BB must point to first BB");
         //remove br1: it ALWAYS goes to target!
 
+        //br1
+        // trace.push_back(br1);
+        //targetMap[instIndex] = getBranchTarget(br1, addrbr1);
+        //instIndex++;
+        //br1 --end
+
         trace.push_back(ds1);
         instIndex++;
 
@@ -409,7 +420,7 @@
     
     //save %io, ad1
     unsigned int stx1 = 0xf077a000|0x7f7; //stx %i0, %fp+offset-8
-    unsigned int stx2 = 0xf277a000|0x7ef; //stx %i1, offset-16
+      unsigned int stx2 = 0xf277a000|0x7ef; //stx %i1, offset-16
 
     //sethi
     uint64_t target = targetMap[MI->first];





More information about the llvm-commits mailing list