aboutsummaryrefslogtreecommitdiffhomepage
path: root/regalloc.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-25 09:30:14 +0200
committerlemon <lsof@mailbox.org>2023-06-25 09:30:14 +0200
commita8441072b129b2d44ed5ff85c67b722071ff34de (patch)
treed9408e5305d6b922762af7a1fa1ca3f1c7115873 /regalloc.c
parent996b0c08e7300bc68e680593c407e8cd1ef73a69 (diff)
regalloc add sources
Diffstat (limited to 'regalloc.c')
-rw-r--r--regalloc.c4
1 files changed, 3 insertions, 1 deletions
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;