shithub: scc

Download patch

ref: 0221fe4f3687d2482eceacdc21ae7389f4634640
parent: c40ce09e945f1f7fae5347518f85796fb038d053
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Mar 20 12:54:28 EDT 2015

Remove dirty field of Node in cc2

This field is only updated when the variable is spilled to
memory, so it is a non sense.

--- a/cc2/cc2.h
+++ b/cc2/cc2.h
@@ -56,7 +56,6 @@
 	char kind;
 	bool public : 1;
 	bool extrn : 1;
-	bool dirty : 1;
 	bool index : 1;
 	union {
 		/* TODO: Admit inmediate of other type */
--- a/cc2/cgen.c
+++ b/cc2/cgen.c
@@ -126,7 +126,6 @@
 		if (sym) {
 			code(LDL, np, r);
 			np->op = sym->kind;
-			sym->dirty = 0;
 		} else {
 			new = allocreg(1);
 			moveto(np, new);
@@ -338,8 +337,6 @@
 		abort();
 	}
 
-	if (sym)
-		sym->dirty = 0;
 	np->op = REG;
 	np->reg = rp->reg;
 }