[llvm-commits] [llvm] r38513 - in /llvm/trunk/lib/Target/ARM: ARMConstantIslandPass.cpp README.txt

Evan Cheng evan.cheng at apple.com
Tue Jul 10 14:49:47 PDT 2007


Author: evancheng
Date: Tue Jul 10 16:49:47 2007
New Revision: 38513

URL: http://llvm.org/viewvc/llvm-project?rev=38513&view=rev
Log:
Update.

Modified:
    llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp
    llvm/trunk/lib/Target/ARM/README.txt

Modified: llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp?rev=38513&r1=38512&r2=38513&view=diff

==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp Tue Jul 10 16:49:47 2007
@@ -199,8 +199,8 @@
 /// print block size and offset information - debugging
 void ARMConstantIslands::dumpBBs() {
   for (unsigned J = 0, E = BBOffsets.size(); J !=E; ++J) {
-    DOUT << "block" << J << " offset" << BBOffsets[J] << 
-                            " size" << BBSizes[J] << "\n";
+    DOUT << "block " << J << " offset " << BBOffsets[J] << 
+                            " size " << BBSizes[J] << "\n";
   }
 }
 
@@ -255,10 +255,10 @@
     bool Change = false;
     for (unsigned i = 0, e = CPUsers.size(); i != e; ++i)
       Change |= HandleConstantPoolUser(Fn, i);
-    DEBUG(dumpBBs());
+    //DEBUG(dumpBBs());
     for (unsigned i = 0, e = ImmBranches.size(); i != e; ++i)
       Change |= FixUpImmediateBr(Fn, ImmBranches[i]);
-    DEBUG(dumpBBs());
+    //DEBUG(dumpBBs());
     if (!Change)
       break;
     MadeChange = true;
@@ -798,8 +798,8 @@
   MachineInstr *CPEMI  = U.CPEMI;
 
   // Check to see if the CPE is already in-range.
-  if (CPEIsInRange(UserMI, UserOffset, CPEMI, U.MaxDisp, true)) {
-    DOUT << "In range\n";
+  if (CPEIsInRange(UserMI, UserOffset, CPEMI, U.MaxDisp, false /*true*/)) {
+    //DOUT << "In range\n";
     return 1;
   }
 
@@ -1120,11 +1120,13 @@
   unsigned BrOffset   = GetOffsetOf(MI) + PCAdj;
   unsigned DestOffset = BBOffsets[DestBB->getNumber()];
 
+#if 0
   DOUT << "Branch of destination BB#" << DestBB->getNumber()
        << " from BB#" << MI->getParent()->getNumber()
        << " max delta=" << MaxDisp
        << " from " << GetOffsetOf(MI) << " to " << DestOffset
        << " offset " << int(DestOffset-BrOffset) << "\t" << *MI;
+#endif
 
   if (BrOffset <= DestOffset) {
     // Branch before the Dest.

Modified: llvm/trunk/lib/Target/ARM/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/README.txt?rev=38513&r1=38512&r2=38513&view=diff

==============================================================================
--- llvm/trunk/lib/Target/ARM/README.txt (original)
+++ llvm/trunk/lib/Target/ARM/README.txt Tue Jul 10 16:49:47 2007
@@ -7,7 +7,6 @@
 * We would really like to support UXTAB16, but we need to prove that the
   add doesn't need to overflow between the two 16-bit chunks.
 
-* implement predication support
 * Implement pre/post increment support.  (e.g. PR935)
 * Coalesce stack slots!
 * Implement smarter constant generation for binops with large immediates.
@@ -44,16 +43,12 @@
 
 //===---------------------------------------------------------------------===//
 
-We need to start generating predicated instructions.  The .td files have a way
-to express this now (see the PPC conditional return instruction), but the 
-branch folding pass (or a new if-cvt pass) should start producing these, at
-least in the trivial case.
-
-Among the obvious wins, doing so can eliminate the need to custom expand 
-copysign (i.e. we won't need to custom expand it to get the conditional
-negate).
+Eliminate copysign custom expansion. We are still generating crappy code with
+default expansion + if-conversion.
 
-This allows us to eliminate one instruction from:
+//===---------------------------------------------------------------------===//
+
+Eliminate one instruction from:
 
 define i32 @_Z6slow4bii(i32 %x, i32 %y) {
         %tmp = icmp sgt i32 %x, %y
@@ -66,6 +61,12 @@
         movgt r1, r0
         mov r0, r1
         bx lr
+=>
+
+__Z6slow4bii:
+        cmp r0, r1
+        movle r0, r1
+        bx lr
 
 //===---------------------------------------------------------------------===//
 





More information about the llvm-commits mailing list