diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-07 13:41:18 -0500 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-07 13:41:18 -0500 |
commit | 7d642e85ccb0291a177cb066ab0ea5fe5c76a38b (patch) | |
tree | 32dab405cf86a9babb7150b403ec8daaef34f7b3 | |
parent | a55dd6fc07b38599e012f664c90125838009134a (diff) | |
download | roux-7d642e85ccb0291a177cb066ab0ea5fe5c76a38b.tar.gz |
shuffle a bit visitins()
-rw-r--r-- | lisc/copy.c | 11 |
1 files changed, 4 insertions, 7 deletions
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); } } |