[llvm-commits] [llvm] r98372 - in /llvm/trunk/lib/Target/X86: X86COFFMachineModuleInfo.cpp X86COFFMachineModuleInfo.h
Chris Lattner
sabre at nondot.org
Fri Mar 12 11:31:03 PST 2010
Author: lattner
Date: Fri Mar 12 13:31:03 2010
New Revision: 98372
URL: http://llvm.org/viewvc/llvm-project?rev=98372&view=rev
Log:
remove the FnArgWords cache to make way for future changes.
Modified:
llvm/trunk/lib/Target/X86/X86COFFMachineModuleInfo.cpp
llvm/trunk/lib/Target/X86/X86COFFMachineModuleInfo.h
Modified: llvm/trunk/lib/Target/X86/X86COFFMachineModuleInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86COFFMachineModuleInfo.cpp?rev=98372&r1=98371&r2=98372&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86COFFMachineModuleInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86COFFMachineModuleInfo.cpp Fri Mar 12 13:31:03 2010
@@ -45,24 +45,19 @@
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();
-
- // '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;
+
+ // 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();
+
+ // 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.
Modified: llvm/trunk/lib/Target/X86/X86COFFMachineModuleInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86COFFMachineModuleInfo.h?rev=98372&r1=98371&r2=98372&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86COFFMachineModuleInfo.h (original)
+++ llvm/trunk/lib/Target/X86/X86COFFMachineModuleInfo.h Fri Mar 12 13:31:03 2010
@@ -26,7 +26,6 @@
/// for X86 COFF targets.
class X86COFFMachineModuleInfo : public MachineModuleInfoImpl {
StringSet<> CygMingStubs;
- DenseMap<const Function*, unsigned> FnArgWords;
public:
X86COFFMachineModuleInfo(const MachineModuleInfo &);
~X86COFFMachineModuleInfo();
More information about the llvm-commits
mailing list