/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- * vim: set ts=8 sts=2 et sw=2 tw=80:
*/ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
BEGIN_TEST(testJitGVN_FixupOSROnlyLoop) { // This is a testcase which constructs the very rare circumstances that // require the FixupOSROnlyLoop logic.
// The loops are no longer reachable from the normal entry. They are // doinated by the osrEntry.
MOZ_RELEASE_ASSERT(func.graph.osrBlock() == osrEntry);
MBasicBlock* newInner =
FollowTrivialGotos(osrEntry->lastIns()->toGoto()->target());
MBasicBlock* newOuter =
FollowTrivialGotos(newInner->lastIns()->toTest()->ifFalse());
MBasicBlock* newExit = FollowTrivialGotos(entry);
MOZ_RELEASE_ASSERT(newInner->isLoopHeader());
MOZ_RELEASE_ASSERT(newOuter->isLoopHeader());
MOZ_RELEASE_ASSERT(newExit->lastIns()->isReturn());
// One more time.
ClearDominatorTree(func.graph); if (!func.runGVN()) { returnfalse;
}
// The loops are no longer reachable from the normal entry. They are // doinated by the osrEntry.
MOZ_RELEASE_ASSERT(func.graph.osrBlock() == osrEntry);
newInner = FollowTrivialGotos(osrEntry->lastIns()->toGoto()->target());
newOuter = FollowTrivialGotos(newInner->lastIns()->toTest()->ifFalse());
newExit = FollowTrivialGotos(entry);
MOZ_RELEASE_ASSERT(newInner->isLoopHeader());
MOZ_RELEASE_ASSERT(newOuter->isLoopHeader());
MOZ_RELEASE_ASSERT(newExit->lastIns()->isReturn());
// The loops are no longer reachable from the normal entry. They are // doinated by the osrEntry.
MOZ_RELEASE_ASSERT(func.graph.osrBlock() == osrEntry);
MBasicBlock* newInner =
FollowTrivialGotos(osrEntry->lastIns()->toGoto()->target());
MBasicBlock* newMiddle =
FollowTrivialGotos(newInner->lastIns()->toTest()->ifFalse());
MBasicBlock* newOuter =
FollowTrivialGotos(newMiddle->lastIns()->toTest()->ifFalse());
MBasicBlock* newExit = FollowTrivialGotos(entry);
MOZ_RELEASE_ASSERT(newInner->isLoopHeader());
MOZ_RELEASE_ASSERT(newMiddle->isLoopHeader());
MOZ_RELEASE_ASSERT(newOuter->isLoopHeader());
MOZ_RELEASE_ASSERT(newExit->lastIns()->isReturn());
// One more time.
ClearDominatorTree(func.graph); if (!func.runGVN()) { returnfalse;
}
// The loops are no longer reachable from the normal entry. They are // doinated by the osrEntry.
MOZ_RELEASE_ASSERT(func.graph.osrBlock() == osrEntry);
newInner = FollowTrivialGotos(osrEntry->lastIns()->toGoto()->target());
newMiddle = FollowTrivialGotos(newInner->lastIns()->toTest()->ifFalse());
newOuter = FollowTrivialGotos(newMiddle->lastIns()->toTest()->ifFalse());
newExit = FollowTrivialGotos(entry);
MOZ_RELEASE_ASSERT(newInner->isLoopHeader());
MOZ_RELEASE_ASSERT(newMiddle->isLoopHeader());
MOZ_RELEASE_ASSERT(newOuter->isLoopHeader());
MOZ_RELEASE_ASSERT(newExit->lastIns()->isReturn());
BEGIN_TEST(testJitGVN_PinnedPhis) { // Set up a loop which gets optimized away, with phis which must be // cleaned up, permitting more phis to be cleaned up.
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.15Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.