remove the FnArgWords cache to make way for future changes.
authorChris Lattner <sabre@nondot.org>
Fri, 12 Mar 2010 19:31:03 +0000 (19:31 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 12 Mar 2010 19:31:03 +0000 (19:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98372 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86COFFMachineModuleInfo.cpp
lib/Target/X86/X86COFFMachineModuleInfo.h

index ab67acbadb52db41a33a81ce9e773af9357bb474..fcdeba1b1cc598210e9c621f924eda87c03efbdd 100644 (file)
@@ -45,24 +45,19 @@ void X86COFFMachineModuleInfo::DecorateCygMingName(SmallVectorImpl<char> &Name,
     return;
 
   unsigned ArgWords = 0;
-  DenseMap<const Function*, unsigned>::const_iterator item = FnArgWords.find(F);
-  if (item == FnArgWords.end()) {
-    // Calculate arguments sizes
-    for (Function::const_arg_iterator AI = F->arg_begin(), AE = F->arg_end();
-         AI != AE; ++AI) {
-      const Type* Ty = AI->getType();
+  
+  // Calculate arguments sizes
+  for (Function::const_arg_iterator AI = F->arg_begin(), AE = F->arg_end();
+       AI != AE; ++AI) {
+    const Type *Ty = AI->getType();
 
-      // 'Dereference' type in case of byval parameter attribute
-      if (AI->hasByValAttr())
-        Ty = cast<PointerType>(Ty)->getElementType();
+    // 'Dereference' type in case of byval parameter attribute
+    if (AI->hasByValAttr())
+      Ty = cast<PointerType>(Ty)->getElementType();
 
-      // Size should be aligned to DWORD boundary
-      ArgWords += ((TD.getTypeAllocSize(Ty) + 3)/4)*4;
-    }
-
-    FnArgWords[F] = ArgWords;
-  } else
-    ArgWords = item->second;
+    // Size should be aligned to DWORD boundary
+    ArgWords += ((TD.getTypeAllocSize(Ty) + 3)/4)*4;
+  }
 
   const FunctionType *FT = F->getFunctionType();
   // "Pure" variadic functions do not receive @0 suffix.
index 9de3dcd634956bdfdb779c92c9fe4c7984ed0e96..1552ce117dccd8df5a9e616cc68ae471c48302d0 100644 (file)
@@ -26,7 +26,6 @@ namespace llvm {
 /// for X86 COFF targets.
 class X86COFFMachineModuleInfo : public MachineModuleInfoImpl {
   StringSet<> CygMingStubs;
-  DenseMap<const Function*, unsigned> FnArgWords;
 public:
   X86COFFMachineModuleInfo(const MachineModuleInfo &);
   ~X86COFFMachineModuleInfo();