llvm.org GIT mirror llvm / fa79e6e
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 Vikram S. Adve 18 years ago
3 changed file(s) with 27 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
2828 unsigned currentOptionalArgsSize;
2929 unsigned maxOptionalArgsSize;
3030 unsigned currentTmpValuesSize;
31 unsigned maxTmpValuesSize;
3132 std::hash_set constantsForConstPool;
3233 std::hash_map offsets;
3334
107108 regSpillsSize+= incr;
108109 staticStackSize += incr;
109110 }
111 inline void incrementTmpAreaSize(int incr) {
112 currentTmpValuesSize += incr;
113 if (maxTmpValuesSize < currentTmpValuesSize)
114 {
115 staticStackSize += currentTmpValuesSize - maxTmpValuesSize;
116 maxTmpValuesSize = currentTmpValuesSize;
117 }
118 }
119 inline void resetTmpAreaSize() {
120 currentTmpValuesSize = 0;
121 }
110122 inline void incrementCurrentOptionalArgsSize(int incr) {
111123 currentOptionalArgsSize+= incr; // stack size already includes this!
112124 }
2828 unsigned currentOptionalArgsSize;
2929 unsigned maxOptionalArgsSize;
3030 unsigned currentTmpValuesSize;
31 unsigned maxTmpValuesSize;
3132 std::hash_set constantsForConstPool;
3233 std::hash_map offsets;
3334
107108 regSpillsSize+= incr;
108109 staticStackSize += incr;
109110 }
111 inline void incrementTmpAreaSize(int incr) {
112 currentTmpValuesSize += incr;
113 if (maxTmpValuesSize < currentTmpValuesSize)
114 {
115 staticStackSize += currentTmpValuesSize - maxTmpValuesSize;
116 maxTmpValuesSize = currentTmpValuesSize;
117 }
118 }
119 inline void resetTmpAreaSize() {
120 currentTmpValuesSize = 0;
121 }
110122 inline void incrementCurrentOptionalArgsSize(int incr) {
111123 currentOptionalArgsSize+= incr; // stack size already includes this!
112124 }
123123 method(_M), compiledAsLeaf(false), staticStackSize(0),
124124 automaticVarsSize(0), regSpillsSize(0),
125125 currentOptionalArgsSize(0), maxOptionalArgsSize(0),
126 currentTmpValuesSize(0)
126 currentTmpValuesSize(0), maxTmpValuesSize(0)
127127 {
128128 maxOptionalArgsSize = ComputeMaxOptionalArgsSize(target, method);
129129 staticStackSize = maxOptionalArgsSize
283283
284284 offset = growUp ? firstTmpOffset + offset : firstTmpOffset - offset;
285285
286 currentTmpValuesSize += size;
286 incrementTmpAreaSize(size);
287287 return offset;
288288 }
289289
290290 void
291291 MachineCodeForMethod::popAllTempValues(const TargetMachine& target)
292292 {
293 currentTmpValuesSize = 0;
293 resetTmpAreaSize();
294294 }
295295
296296 int