summaryrefslogtreecommitdiff
path: root/src/spiglet/spiglet2kanga/SpgStmt.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/spiglet/spiglet2kanga/SpgStmt.java')
-rw-r--r--src/spiglet/spiglet2kanga/SpgStmt.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/spiglet/spiglet2kanga/SpgStmt.java b/src/spiglet/spiglet2kanga/SpgStmt.java
index 4f2ffb2..e6298dc 100644
--- a/src/spiglet/spiglet2kanga/SpgStmt.java
+++ b/src/spiglet/spiglet2kanga/SpgStmt.java
@@ -83,4 +83,23 @@ public class SpgStmt extends SpgSym{
}
}
+
+ public void printDefUse() {
+ if (def!=null) {
+ System.err.print("def: ");
+ SpgTemp[] d = def.toArray(new SpgTemp[0]);
+ for (int i=0; i<d.length; i++) {
+ System.err.print(d[i].num+" ");
+ }
+ }
+ System.err.println();
+ if (use!=null) {
+ System.err.print("use: ");
+ SpgTemp[] u = use.toArray(new SpgTemp[0]);
+ for (int i=0; i<u.length; i++) {
+ System.err.print(u[i].num+" ");
+ }
+ }
+ System.err.println();
+ }
}