diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-24 21:05:15 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-24 21:05:15 -0600 |
commit | 62091005231095abbf8e2cebbfce708815cb63f0 (patch) | |
tree | 5186bf7db88b20704a48ab14413349291675ea82 /V2VM.java | |
parent | 0bbc4cb511bd90cebf94ccfcfce5ff8983ebb918 (diff) |
Added VaporizeVisitor, with VAssign, VMemRead, and VMemWrite
Diffstat (limited to 'V2VM.java')
-rw-r--r-- | V2VM.java | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -38,9 +38,20 @@ public class V2VM { for (LIRDict interval : lvs) { MinimalLogger.info(String.format("Starting Linear Allocation for %s...", interval.getFunction())); - new RegisterAlloc(interval, Arrays.copyOfRange(prog.registers, 6, 22)); + new RegisterAlloc(interval, Arrays.copyOfRange(prog.registers, 9, 22)); // spill registers: t0, t1, t2 } + MinimalLogger.info("Removing extraneous lines from the program representation..."); + for (String line : new ArrayList<String>(strProg)) { + // delete all lines not a function table! + if (!line.trim().startsWith("const") && !line.trim().startsWith(":")) + strProg.remove(line); + } + MinimalLogger.info(String.format("New program: %s", + strProg.toString())); + VaporizeVisitor vv = new VaporizeVisitor(prog, strProg, lvs); + System.out.println(String.join("\n", vv.getVaporm())); + } catch (IOException e) { System.out.println(e.toString()); System.exit(1); |