only add site to result if result is live in CombineEvent::compile and TranslateEvent::compile

This commit is contained in:
Joel Dice 2009-02-28 19:08:14 -07:00
parent 5adcfa3341
commit 93ebb571b3

View File

@ -2766,25 +2766,25 @@ maybePreserve(Context* c, Value* v, Site* s)
Site* Site*
getTarget(Context* c, Value* value, Value* result, const SiteMask& resultMask) getTarget(Context* c, Value* value, Value* result, const SiteMask& resultMask)
{ {
Site* s;
Value* v;
if (c->arch->condensedAddressing()) { if (c->arch->condensedAddressing()) {
Site* s = value->source; s = value->source;
v = value;
maybePreserve(c, value, s); maybePreserve(c, value, s);
removeSite(c, value, s);
s->freeze(c, value);
return s;
} else { } else {
SingleRead r(resultMask); SingleRead r(resultMask);
Site* s = pickTargetSite(c, &r); s = pickTargetSite(c, &r);
v = result;
addSite(c, result, s); addSite(c, result, s);
}
removeSite(c, v, s);
s->freeze(c, v);
return s; return s;
} }
}
Site* Site*
source(Value* v) source(Value* v)
@ -2866,7 +2866,6 @@ class CombineEvent: public Event {
popRead(c, this, r->value); popRead(c, this, r->value);
} }
if (c->arch->condensedAddressing()) {
low->thaw(c, second); low->thaw(c, second);
if (resultSize > BytesPerWord) { if (resultSize > BytesPerWord) {
high->thaw(c, second->high); high->thaw(c, second->high);
@ -2879,7 +2878,6 @@ class CombineEvent: public Event {
} }
} }
} }
}
TernaryOperation type; TernaryOperation type;
unsigned firstSize; unsigned firstSize;
@ -3197,7 +3195,6 @@ class TranslateEvent: public Event {
popRead(c, this, r->value); popRead(c, this, r->value);
} }
if (c->arch->condensedAddressing()) {
low->thaw(c, value); low->thaw(c, value);
if (size > BytesPerWord) { if (size > BytesPerWord) {
high->thaw(c, value->high); high->thaw(c, value->high);
@ -3210,7 +3207,6 @@ class TranslateEvent: public Event {
} }
} }
} }
}
BinaryOperation type; BinaryOperation type;
unsigned size; unsigned size;