qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 7d642e85ccb0291a177cb066ab0ea5fe5c76a38b
parent a55dd6fc07b38599e012f664c90125838009134a
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Mon,  7 Mar 2016 13:41:18 -0500

shuffle a bit visitins()

Diffstat:
Mlisc/copy.c | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git 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); } }