diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-27 21:31:11 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-27 21:31:11 -0600 |
commit | dfcf11cb8d7f28acad505c2785831424c38554b8 (patch) | |
tree | 0597a6f912d81ca5881df46a9bd52bebb6bfbc6f /cfg/CFGNode.java | |
parent | 008d0de42fdabb54dc43de5cfa33f4c15bd1d7ba (diff) |
LIRVisitor Correct Liveness Analysis!
Diffstat (limited to 'cfg/CFGNode.java')
-rw-r--r-- | cfg/CFGNode.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cfg/CFGNode.java b/cfg/CFGNode.java index 5ce39b5..41f2c9c 100644 --- a/cfg/CFGNode.java +++ b/cfg/CFGNode.java @@ -10,13 +10,15 @@ public class CFGNode { private Node instruction; private ArrayList<CFGNode> sources; private ArrayList<CFGNode> dests; - protected Set<String> reaching; - protected Set<String> liveness; + public Set<String> defs; + public Set<String> reaching; + public Set<String> liveness; public CFGNode(Node instruction) { this.instruction = instruction; this.sources = new ArrayList<>(); this.dests = new ArrayList<>(); + this.defs = new HashSet<>(); this.reaching = new HashSet<>(); this.liveness = new HashSet<>(); } @@ -70,4 +72,8 @@ public class CFGNode { return Collections.unmodifiableSet(this.liveness); } + public Set<String> getDefinitions() { + return Collections.unmodifiableSet(this.defs); + } + } |