diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-12 19:31:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-12 19:31:03 +0000 |
commit | 355670bf0fe759b6562ad1411642806fcc64af3c (patch) | |
tree | 034c586d9b694e2aa6c8c7c28fc25dbe309af639 /lib/Target | |
parent | ec041eba384a5553b47295361fde15acc21d5607 (diff) | |
download | external_llvm-355670bf0fe759b6562ad1411642806fcc64af3c.tar.gz external_llvm-355670bf0fe759b6562ad1411642806fcc64af3c.tar.bz2 external_llvm-355670bf0fe759b6562ad1411642806fcc64af3c.zip |
remove the FnArgWords cache to make way for future changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/X86/X86COFFMachineModuleInfo.cpp | 27 | ||||
-rw-r--r-- | lib/Target/X86/X86COFFMachineModuleInfo.h | 1 |
2 files changed, 11 insertions, 17 deletions
diff --git a/lib/Target/X86/X86COFFMachineModuleInfo.cpp b/lib/Target/X86/X86COFFMachineModuleInfo.cpp index ab67acbadb..fcdeba1b1c 100644 --- a/lib/Target/X86/X86COFFMachineModuleInfo.cpp +++ b/lib/Target/X86/X86COFFMachineModuleInfo.cpp @@ -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. diff --git a/lib/Target/X86/X86COFFMachineModuleInfo.h b/lib/Target/X86/X86COFFMachineModuleInfo.h index 9de3dcd634..1552ce117d 100644 --- a/lib/Target/X86/X86COFFMachineModuleInfo.h +++ b/lib/Target/X86/X86COFFMachineModuleInfo.h @@ -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(); |