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:
parent
6547d4c1fe
commit
81622ca144
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue