diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2022-11-20 21:36:51 +0100 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2022-11-20 21:44:25 +0100 |
commit | 1f696fed0dd9f9019209f3f8178f599d1e25c782 (patch) | |
tree | 38fc007b260d360a7ab41da693fd8c60bafb1572 /alias.c | |
parent | 0d50ebaed94f595961d88544a028bf7f523d3eac (diff) | |
download | roux-1f696fed0dd9f9019209f3f8178f599d1e25c782.tar.gz |
make Alias.base an int
We had the invariant that it'd always be a temporary.
Diffstat (limited to 'alias.c')
-rw-r--r-- | alias.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alias.c b/alias.c index b4bb0fb..3fd7d83 100644 --- a/alias.c +++ b/alias.c @@ -43,7 +43,7 @@ alias(Ref p, int sp, Ref q, int sq, int *delta, Fn *fn) /* if both are offsets of the same * stack slot, they alias iif they * overlap */ - if (req(ap.base, aq.base) && ovlap) + if (ap.base == aq.base && ovlap) return MustAlias; return NoAlias; } @@ -60,7 +60,7 @@ alias(Ref p, int sp, Ref q, int sq, int *delta, Fn *fn) } if ((ap.type == ACon && aq.type == ACon) - || (ap.type == aq.type && req(ap.base, aq.base))) { + || (ap.type == aq.type && ap.base == aq.base)) { assert(ap.type == ACon || ap.type == AUnk); /* if they have the same base, we * can rely on the offsets only */ @@ -122,7 +122,7 @@ fillalias(Fn *fn) a = &fn->tmp[p->to.val].alias; assert(a->type == ABot); a->type = AUnk; - a->base = p->to; + a->base = p->to.val; a->offset = 0; a->slot = 0; } @@ -139,7 +139,7 @@ fillalias(Fn *fn) a->type = AUnk; a->slot = 0; } - a->base = i->to; + a->base = i->to.val; a->offset = 0; } if (i->op == Ocopy) { |