From 3dfeff8e8e4c84929e35880bf0bbdea64c085fc0 Mon Sep 17 00:00:00 2001 From: bd-912 Date: Mon, 29 Apr 2024 16:44:42 -0600 Subject: Messy in+out argument passing, observe MoreThan4.vapor passes --- vaporize/LIRDict.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'vaporize/LIRDict.java') 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 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((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; + } + } -- cgit v1.2.3