[llvm-commits] [SignlessTypes] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Reid Spencer reid at x10sys.com
Thu Oct 19 17:43:32 PDT 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.289.2.2 -> 1.289.2.3
---
Log message:

Remove an un-needed test.


---
Diffs of the changes:  (+20 -21)

 SelectionDAGISel.cpp |   41 ++++++++++++++++++++---------------------
 1 files changed, 20 insertions(+), 21 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289.2.2 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289.2.3
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.289.2.2	Thu Oct 19 19:34:43 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Thu Oct 19 19:43:17 2006
@@ -236,27 +236,26 @@
   Function::iterator BB = Fn.begin(), EB = Fn.end();
   for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)
     if (AllocaInst *AI = dyn_cast<AllocaInst>(I))
-      if (ConstantInt *CUI = dyn_cast<ConstantInt>(AI->getArraySize())) 
-        if (CUI->getType()->isUnsigned()) {
-          const Type *Ty = AI->getAllocatedType();
-          uint64_t TySize = TLI.getTargetData()->getTypeSize(Ty);
-          unsigned Align = 
-            std::max((unsigned)TLI.getTargetData()->getTypeAlignment(Ty),
-                     AI->getAlignment());
-
-          // If the alignment of the value is smaller than the size of the 
-          // value, and if the size of the value is particularly small 
-          // (<= 8 bytes), round up to the size of the value for potentially 
-          // better performance.
-          //
-          // FIXME: This could be made better with a preferred alignment hook in
-          // TargetData.  It serves primarily to 8-byte align doubles for X86.
-          if (Align < TySize && TySize <= 8) Align = TySize;
-          TySize *= CUI->getZExtValue();   // Get total allocated size.
-          if (TySize == 0) TySize = 1; // Don't create zero-sized stack objects.
-          StaticAllocaMap[AI] =
-            MF.getFrameInfo()->CreateStackObject((unsigned)TySize, Align);
-        }
+      if (ConstantInt *CUI = dyn_cast<ConstantInt>(AI->getArraySize())) {
+        const Type *Ty = AI->getAllocatedType();
+        uint64_t TySize = TLI.getTargetData()->getTypeSize(Ty);
+        unsigned Align = 
+          std::max((unsigned)TLI.getTargetData()->getTypeAlignment(Ty),
+                   AI->getAlignment());
+
+        // If the alignment of the value is smaller than the size of the 
+        // value, and if the size of the value is particularly small 
+        // (<= 8 bytes), round up to the size of the value for potentially 
+        // better performance.
+        //
+        // FIXME: This could be made better with a preferred alignment hook in
+        // TargetData.  It serves primarily to 8-byte align doubles for X86.
+        if (Align < TySize && TySize <= 8) Align = TySize;
+        TySize *= CUI->getZExtValue();   // Get total allocated size.
+        if (TySize == 0) TySize = 1; // Don't create zero-sized stack objects.
+        StaticAllocaMap[AI] =
+          MF.getFrameInfo()->CreateStackObject((unsigned)TySize, Align);
+      }
 
   for (; BB != EB; ++BB)
     for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)






More information about the llvm-commits mailing list