improve range-checking macros

They are now linear and can be
safely used with arguments that
have side-effects. This patch
also introduces an iscall()
macro and uses it to fix a
missing check for Ovacall in
liveness analysis.
This commit is contained in:
Quentin Carbonneaux 2019-03-12 20:53:18 +01:00
parent c37347a463
commit fd65f4275b
3 changed files with 10 additions and 8 deletions

2
load.c
View file

@ -231,7 +231,7 @@ def(Slice sl, bits msk, Blk *b, Ins *i, Loc *il)
while (i > b->ins) {
--i;
if (killsl(i->to, sl)
|| ((i->op == Ocall || i->op == Ovacall) && escapes(sl.ref, curf)))
|| (iscall(i->op) && escapes(sl.ref, curf)))
goto Load;
ld = isload(i->op);
if (ld) {