summaryrefslogtreecommitdiff
path: root/vaporize/LIRDict.java
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-04-29 16:44:42 -0600
committerbd-912 <bdunahu@colostate.edu>2024-04-29 16:44:42 -0600
commit3dfeff8e8e4c84929e35880bf0bbdea64c085fc0 (patch)
tree1194536158c8a1c40acd9b19b83a943724c47eca /vaporize/LIRDict.java
parentbc7af8fdf0e2f6560c7d7fa6c17f893409c4830c (diff)
Messy in+out argument passing, observe MoreThan4.vapor passes
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;
+ }
+
}