aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineFunction.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index d8f3339e17..01c9fd9d24 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -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!
}