summaryrefslogtreecommitdiff
path: root/vaporize/LIRDict.java
diff options
context:
space:
mode:
Diffstat (limited to 'vaporize/LIRDict.java')
-rw-r--r--vaporize/LIRDict.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/vaporize/LIRDict.java b/vaporize/LIRDict.java
index 30bfed3..ffb1c3e 100644
--- a/vaporize/LIRDict.java
+++ b/vaporize/LIRDict.java
@@ -12,14 +12,17 @@ public class LIRDict {
private TreeSet<LIRVar> intervals;
private int spilled_num; // the number of spilled registers
+ private int in_num; // the number of arguments passed in through the stack
+ private int out_num; // the size of the out stack
private ControlFlowGraph cfg;
- public LIRDict(VFunction f, ControlFlowGraph cfg) {
+ public LIRDict(VFunction f, ControlFlowGraph cfg, int out_num) {
this.intervals = new TreeSet<LIRVar>((v1, v2) -> {
return (v1.compareTo(v2) != 0) ? v1.compareTo(v2) : v1.equals(v2) ? 0 : 1;
});
this.cfg = cfg;
+ this.out_num = out_num;
for (VInstr s : f.body) {
CFGNode n = cfg.getNode(s);
@@ -84,4 +87,8 @@ public class LIRDict {
return this.spilled_num;
}
+ public int getOutNum() {
+ return this.out_num;
+ }
+
}