Added function computeOffsetforLocalVar to check how big the

offset-from-FP will be before allocating space for a local variable.

llvm-svn: 1900
This commit is contained in:
Vikram S. Adve 2002-03-18 03:23:29 +00:00
parent 6547d4c1fe
commit 81622ca144
2 changed files with 8 additions and 2 deletions

View File

@ -31,7 +31,6 @@ class MachineCodeForMethod : private Annotation {
unsigned currentTmpValuesSize; unsigned currentTmpValuesSize;
std::hash_set<const Constant*> constantsForConstPool; std::hash_set<const Constant*> constantsForConstPool;
std::hash_map<const Value*, int> offsets; std::hash_map<const Value*, int> offsets;
// hash_map<const Value*, int> offsetsFromSP;
public: public:
/*ctor*/ MachineCodeForMethod(const Method* method, /*ctor*/ MachineCodeForMethod(const Method* method,
@ -72,6 +71,10 @@ public:
inline void markAsLeafMethod() { compiledAsLeaf = true; } inline void markAsLeafMethod() { compiledAsLeaf = true; }
int computeOffsetforLocalVar (const TargetMachine& target,
const Value* local,
unsigned int size = 0);
int allocateLocalVar (const TargetMachine& target, int allocateLocalVar (const TargetMachine& target,
const Value* local, const Value* local,
unsigned int size = 0); unsigned int size = 0);

View File

@ -31,7 +31,6 @@ class MachineCodeForMethod : private Annotation {
unsigned currentTmpValuesSize; unsigned currentTmpValuesSize;
std::hash_set<const Constant*> constantsForConstPool; std::hash_set<const Constant*> constantsForConstPool;
std::hash_map<const Value*, int> offsets; std::hash_map<const Value*, int> offsets;
// hash_map<const Value*, int> offsetsFromSP;
public: public:
/*ctor*/ MachineCodeForMethod(const Method* method, /*ctor*/ MachineCodeForMethod(const Method* method,
@ -72,6 +71,10 @@ public:
inline void markAsLeafMethod() { compiledAsLeaf = true; } inline void markAsLeafMethod() { compiledAsLeaf = true; }
int computeOffsetforLocalVar (const TargetMachine& target,
const Value* local,
unsigned int size = 0);
int allocateLocalVar (const TargetMachine& target, int allocateLocalVar (const TargetMachine& target,
const Value* local, const Value* local,
unsigned int size = 0); unsigned int size = 0);