diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-07 01:29:12 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-07 01:29:12 +0300 |
| commit | 0f8532d4e7315b86e160abf4ced461e7678b5587 (patch) | |
| tree | 2cf1a728b1f4383926a5c39908754b6eb4a5a2dd /src/ssa.c | |
| parent | 68059b52c389143e766c5499c76c6c90c6b82846 (diff) | |
| download | qbt-0f8532d4e7315b86e160abf4ced461e7678b5587.tar.gz qbt-0f8532d4e7315b86e160abf4ced461e7678b5587.zip | |
add features that make machine generation easier
Diffstat (limited to 'src/ssa.c')
| -rw-r--r-- | src/ssa.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,4 @@ #include <assert.h> -#include <qbt/ssa.h> #include <qbt/unreachable.h> static void add_val(struct vec *map, struct val v) @@ -221,7 +220,7 @@ static size_t rename_temps(struct blk *b, size_t i) return i; } -void ssa(struct fn *f) +size_t ssa(struct fn *f) { /* do a depth-first traversal of blocks, mark locations within as either * generated (i.e. we assign something to the register) or required @@ -236,4 +235,6 @@ void ssa(struct fn *f) struct blk *b = blk_at(f->blks, bi); i = rename_temps(b, i); } + + return i; } |
