From 7d642e85ccb0291a177cb066ab0ea5fe5c76a38b Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Mon, 7 Mar 2016 13:41:18 -0500 Subject: shuffle a bit visitins() --- lisc/copy.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'lisc/copy.c') diff --git a/lisc/copy.c b/lisc/copy.c index 1daca2b..d2b0285 100644 --- a/lisc/copy.c +++ b/lisc/copy.c @@ -56,15 +56,12 @@ visitins(Ins *i, Ref *cp, RList **w) { Ref r; - if (i->op != OCopy) { - if (!req(i->to, R)) { - assert(rtype(i->to) == RTmp); - update(i->to, i->to, cp, w); - } - } else { - assert(rtype(i->to) == RTmp); + if (i->op == OCopy) { r = copyof(i->arg[0], cp); update(i->to, r, cp, w); + } else if (!req(i->to, R)) { + assert(rtype(i->to) == RTmp); + update(i->to, i->to, cp, w); } } -- cgit 1.4.1