That is, TEMP nodes with negative index are a bit special, we
use them to optimize the argument passing.
virtual void visitRet(IR::Ret *s) { s->expr->accept(this); }
virtual void visitTemp(IR::Temp *e) {
+ if (e->index < 0)
+ return;
+
if (! _stmt->d->uses.contains(e->index))
_stmt->d->uses.append(e->index);
}
virtual void visitMove(IR::Move *s) {
if (IR::Temp *t = s->target->asTemp()) {
- if (! _stmt->d->defs.contains(t->index))
- _stmt->d->defs.append(t->index);
+ if (t->index >= 0) {
+ if (! _stmt->d->defs.contains(t->index))
+ _stmt->d->defs.append(t->index);
+ }
} else {
s->target->accept(this);
}