unsigned currentOptionalArgsSize;
unsigned maxOptionalArgsSize;
unsigned currentTmpValuesSize;
+ unsigned maxTmpValuesSize;
std::hash_set<const Constant*> constantsForConstPool;
std::hash_map<const Value*, int> offsets;
regSpillsSize+= incr;
staticStackSize += incr;
}
+ inline void incrementTmpAreaSize(int incr) {
+ currentTmpValuesSize += incr;
+ if (maxTmpValuesSize < currentTmpValuesSize)
+ {
+ staticStackSize += currentTmpValuesSize - maxTmpValuesSize;
+ maxTmpValuesSize = currentTmpValuesSize;
+ }
+ }
+ inline void resetTmpAreaSize() {
+ currentTmpValuesSize = 0;
+ }
inline void incrementCurrentOptionalArgsSize(int incr) {
currentOptionalArgsSize+= incr; // stack size already includes this!
}
unsigned currentOptionalArgsSize;
unsigned maxOptionalArgsSize;
unsigned currentTmpValuesSize;
+ unsigned maxTmpValuesSize;
std::hash_set<const Constant*> constantsForConstPool;
std::hash_map<const Value*, int> offsets;
regSpillsSize+= incr;
staticStackSize += incr;
}
+ inline void incrementTmpAreaSize(int incr) {
+ currentTmpValuesSize += incr;
+ if (maxTmpValuesSize < currentTmpValuesSize)
+ {
+ staticStackSize += currentTmpValuesSize - maxTmpValuesSize;
+ maxTmpValuesSize = currentTmpValuesSize;
+ }
+ }
+ inline void resetTmpAreaSize() {
+ currentTmpValuesSize = 0;
+ }
inline void incrementCurrentOptionalArgsSize(int incr) {
currentOptionalArgsSize+= incr; // stack size already includes this!
}
method(_M), compiledAsLeaf(false), staticStackSize(0),
automaticVarsSize(0), regSpillsSize(0),
currentOptionalArgsSize(0), maxOptionalArgsSize(0),
- currentTmpValuesSize(0)
+ currentTmpValuesSize(0), maxTmpValuesSize(0)
{
maxOptionalArgsSize = ComputeMaxOptionalArgsSize(target, method);
staticStackSize = maxOptionalArgsSize
offset = growUp ? firstTmpOffset + offset : firstTmpOffset - offset;
- currentTmpValuesSize += size;
+ incrementTmpAreaSize(size);
return offset;
}
void
MachineCodeForMethod::popAllTempValues(const TargetMachine& target)
{
- currentTmpValuesSize = 0;
+ resetTmpAreaSize();
}
int