aboutsummaryrefslogtreecommitdiff
path: root/ssa.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssa.c')
-rw-r--r--ssa.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ssa.c b/ssa.c
index d69c959..31b82d7 100644
--- a/ssa.c
+++ b/ssa.c
@@ -1895,6 +1895,7 @@ void cinterv_union(COpr_t a, COpr_t b) {
if (a == b) return;
b->range = crange_merge(b->range, a->range);
a->par = b;
+ b->mod |= a->mod;
}
void init_def() {
@@ -2132,6 +2133,11 @@ void register_alloc() {
colist_add(active, c); /* move cur to active */
}
}
+ else if (cur->mod) /* may be referenced by a pointer */
+ {
+ cur->reg = -1; /* assign a memory location to cur */
+ free(c); /* and move cur to handled */
+ }
else
{
cur->reg = reg; /* cur.reg <- any register in f */