mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-18 10:24:45 +00:00
Include temp. values when computing max. size of stack frame!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2070 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -29,6 +29,7 @@ class MachineCodeForMethod : private Annotation {
|
||||
unsigned currentOptionalArgsSize;
|
||||
unsigned maxOptionalArgsSize;
|
||||
unsigned currentTmpValuesSize;
|
||||
unsigned maxTmpValuesSize;
|
||||
std::hash_set<const Constant*> constantsForConstPool;
|
||||
std::hash_map<const Value*, int> offsets;
|
||||
|
||||
@@ -108,6 +109,17 @@ private:
|
||||
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!
|
||||
}
|
||||
|
Reference in New Issue
Block a user