From a8441072b129b2d44ed5ff85c67b722071ff34de Mon Sep 17 00:00:00 2001 From: lemon Date: Sun, 25 Jun 2023 09:30:14 +0200 Subject: regalloc add sources --- regalloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'regalloc.c') diff --git a/regalloc.c b/regalloc.c index 6aea986..ee96187 100644 --- a/regalloc.c +++ b/regalloc.c @@ -370,6 +370,8 @@ doins(struct rega *ra, struct block *blk, struct instr *ins, int curi) } } +/* Parallel moves algorithm from QBE: https://c9x.me/git/qbe.git/tree/rega.c?id=e493a7f23352f51acc0a1e12284ab19d7894488a#n201 */ + enum pmstat { PMTOMOVE, PMMOVING, PMDONE }; static struct pmove { uchar k; @@ -583,7 +585,7 @@ regalloc(struct function *fn) fn->isleaf = 1; vinit(&stkslotrefs, stkslotrefsbuf, arraylength(stkslotrefsbuf)); - /* generate copies for phi operands */ + /* generate copies for phi operands to transform into CSSA */ blk = fn->entry; do { if (!blk->phi.n) continue; -- cgit v1.2.3