From f4be2429f38faba0c54862055f808cb242a7eb49 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 3 Apr 2024 18:36:21 +0300 Subject: make regalloc work with ssa form + Still not ideal register allocator, but can be improved with some heuristics and potentially completely replaced in the future if so desired with graph coloring or something. --- src/ssa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ssa.c') diff --git a/src/ssa.c b/src/ssa.c index 59e7254..96d1eb1 100644 --- a/src/ssa.c +++ b/src/ssa.c @@ -78,7 +78,7 @@ static void build_params(struct blk *b, int visited) struct val in2 = i.in[1]; if (in2.class == TMP && !has_val(&generated, in2)) add_val(&required, in2); - + struct val out = i.out; if (out.class == TMP) { add_val(&generated, out); @@ -147,7 +147,7 @@ static void collect_params(struct blk *b, int visited) } } -#define tmpval_at(rmap, i)\ +#define tmpval_at(rmap, i) \ vect_at(struct val, rmap, i) static void add_rewrite_rule(struct vec *rmap, struct val from, struct val to) -- cgit v1.3