[llvm-commits] [poolalloc] r129075 - /poolalloc/trunk/lib/DSA/DataStructureStats.cpp

Arushi Aggarwal aggarwa4 at illinois.edu
Thu Apr 7 09:31:22 PDT 2011


Author: aggarwa4
Date: Thu Apr  7 11:31:22 2011
New Revision: 129075

URL: http://llvm.org/viewvc/llvm-project?rev=129075&view=rev
Log:
We dont need to track insert/extract value. They are not
loading/storing out of memory, just out of an aggregate
in a register.

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

Modified: poolalloc/trunk/lib/DSA/DataStructureStats.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructureStats.cpp?rev=129075&r1=129074&r2=129075&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructureStats.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructureStats.cpp Thu Apr  7 11:31:22 2011
@@ -82,8 +82,6 @@
 
     void visitLoad(LoadInst &LI);
     void visitStore(StoreInst &SI);
-    void visitInsertValue(InsertValueInst &I);
-    void visitExtractValue(ExtractValueInst &I);
 
     /// Debugging support methods
     void print(llvm::raw_ostream &O, const Module* = 0) const { }
@@ -228,38 +226,6 @@
   }
 }
 
-void DSGraphStats::visitInsertValue(InsertValueInst &I) {
-  unsigned Offset = 0;
-  const Type* STy = I.getAggregateOperand()->getType();
-  llvm::InsertValueInst::idx_iterator i = I.idx_begin(), e = I.idx_end(); 
-  for (; i != e; i++) {
-    const StructLayout *SL = TD->getStructLayout(cast<StructType>(STy));
-    Offset += SL->getElementOffset(*i);
-    STy = (cast<StructType>(STy))->getTypeAtIndex(*i);
-  }
-  if (isNodeForValueUntyped(&I, Offset, I.getParent()->getParent())) {
-    NumUntypedMemAccesses++;
-  } else {
-    NumTypedMemAccesses++;
-  }
-}
-
-void DSGraphStats::visitExtractValue(ExtractValueInst &I) {
-  unsigned Offset = 0;
-  const Type* STy = I.getAggregateOperand()->getType();
-  llvm::ExtractValueInst::idx_iterator i = I.idx_begin(), e = I.idx_end();
-  for (; i != e; i++) {
-    const StructLayout *SL = TD->getStructLayout(cast<StructType>(STy));
-    Offset += SL->getElementOffset(*i);
-    STy = (cast<StructType>(STy))->getTypeAtIndex(*i);
-  }
-  if (isNodeForValueUntyped(I.getAggregateOperand(), Offset, I.getParent()->getParent())) {
-    NumUntypedMemAccesses++;
-  } else {
-    NumTypedMemAccesses++;
-  }
-}
-
 bool DSGraphStats::runOnFunction(Function& F) {
   DS = &getAnalysis<TDDataStructures>();
   TD = &getAnalysis<TargetData>();





More information about the llvm-commits mailing list