Bug 1031410 - IonMonkey: GVN: Don't set isGuard() unnecessarily in IonBuilder. r=sstangl

This commit is contained in:
Dan Gohman 2014-08-21 18:05:33 -07:00
parent 865e06d777
commit 0dce9d91bc

View File

@ -716,10 +716,6 @@ IonBuilder::build()
if (info().needsArgsObj() && !initArgumentsObject())
return false;
// Prevent |this| from being DCE'd: necessary for constructors.
if (info().funMaybeLazy())
current->getSlot(info().thisSlot())->setGuard();
// The type analysis phase attempts to insert unbox operations near
// definitions of values. It also attempts to replace uses in resume points
// with the narrower, unboxed variants. However, we must prevent this
@ -6028,11 +6024,6 @@ IonBuilder::newOsrPreheader(MBasicBlock *predecessor, jsbytecode *loopEntry)
return nullptr;
graph().setOsrBlock(osrBlock);
// Wrap |this| with a guaranteed use, to prevent instruction elimination.
// Prevent |this| from being DCE'd: necessary for constructors.
if (info().funMaybeLazy())
preheader->getSlot(info().thisSlot())->setGuard();
return preheader;
}