[llvm-commits] [poolalloc] r130270 - /poolalloc/trunk/lib/DSA/Local.cpp

Arushi Aggarwal aggarwa4 at illinois.edu
Tue Apr 26 18:07:17 PDT 2011


Author: aggarwa4
Date: Tue Apr 26 20:07:17 2011
New Revision: 130270

URL: http://llvm.org/viewvc/llvm-project?rev=130270&view=rev
Log:
Formatting changes.

Modified:
    poolalloc/trunk/lib/DSA/Local.cpp

Modified: poolalloc/trunk/lib/DSA/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Local.cpp?rev=130270&r1=130269&r2=130270&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/Local.cpp (original)
+++ poolalloc/trunk/lib/DSA/Local.cpp Tue Apr 26 20:07:17 2011
@@ -15,18 +15,19 @@
 #define DEBUG_TYPE "dsa-local"
 #include "dsa/DataStructure.h"
 #include "dsa/DSGraph.h"
+#include "llvm/Use.h"
+#include "llvm/InlineAsm.h"
 #include "llvm/Constants.h"
+#include "llvm/Intrinsics.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Instructions.h"
-#include "llvm/Intrinsics.h"
-#include "llvm/InlineAsm.h"
 #include "llvm/Support/GetElementPtrTypeIterator.h"
 #include "llvm/Support/InstVisitor.h"
-#include "llvm/Target/TargetData.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/FormattedStream.h"
 #include "llvm/Support/Timer.h"
+#include "llvm/Target/TargetData.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/DenseSet.h"
 #include "llvm/ADT/Triple.h"
@@ -420,7 +421,6 @@
 
 
 void GraphBuilder::visitBitCastInst(BitCastInst &I) {
-  
   if (!isa<PointerType>(I.getType())) return; // Only pointers
   DSNodeHandle Ptr = getValueDest(I.getOperand(0));
   if (Ptr.isNull()) return;
@@ -503,7 +503,7 @@
   // Okay, no easy way out.  Calculate the offset into the object being
   // indexed.
   //
- 
+
   int Offset = 0;
 
   // FIXME: I am not sure if the code below is completely correct (especially
@@ -511,7 +511,7 @@
   //        What if the array is indexed using a larger index than its declared
   //        size?  Does the LLVM verifier catch such issues?
   //
-  
+
   //
   // Determine the offset (in bytes) between the result of the GEP and the
   // GEP's pointer operand.
@@ -540,7 +540,6 @@
       }
       Offset += (unsigned)TD.getStructLayout(STy)->getElementOffset(FieldNo);
       if(TypeInferenceOptimize) {
-
         if(const ArrayType* AT = dyn_cast<ArrayType>(STy->getTypeAtIndex(FieldNo))) {
           Value.getNode()->mergeTypeInfo(AT, Value.getOffset() + Offset);
           if((++I) == E) {
@@ -570,7 +569,7 @@
       const Type *CurTy = ATy->getElementType();
 
       if(!isa<ArrayType>(CurTy) &&
-          Value.getNode()->getSize() <= 0) {
+         Value.getNode()->getSize() <= 0) {
         Value.getNode()->growSize(TD.getTypeAllocSize(CurTy));
       } else if(isa<ArrayType>(CurTy) && Value.getNode()->getSize() <= 0){
         const Type *ETy = (cast<ArrayType>(CurTy))->getElementType();
@@ -583,7 +582,7 @@
       // Find if the DSNode belongs to the array
       // If not fold.
       if((Value.getOffset() || Offset != 0)
-          || (!isa<ArrayType>(CurTy)
+         || (!isa<ArrayType>(CurTy)
          && (Value.getNode()->getSize() != TD.getTypeAllocSize(CurTy)))) {
         Value.getNode()->foldNodeCompletely();
         Value.getNode();
@@ -605,7 +604,7 @@
       if (!isa<Constant>(I.getOperand()) ||
           !cast<Constant>(I.getOperand())->isNullValue()) {
         Value.getNode()->setArrayMarker();
-        
+
 
         if(!isa<ArrayType>(CurTy) && Value.getNode()->getSize() <= 0){
           Value.getNode()->growSize(TD.getTypeAllocSize(CurTy));





More information about the llvm-commits mailing list