/* -*- 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/. */
// x = phi(1.0, 2.0, 1.0) // y = phi(3.0, 4.0, 5.0) // z = x * y // return y
joinBlock->addPhi(x);
joinBlock->addPhi(y);
MMul* z = MMul::New(func.alloc, x, y, MIRType::Double);
joinBlock->add(z);
MReturn* ret = MReturn::New(func.alloc, y);
joinBlock->end(ret);
if (!func.runGVN()) { returnfalse;
}
// c1 should be deleted. for (MInstructionIterator ins = block->begin(); ins != block->end(); ins++) {
CHECK(!ins->isConstant() || (ins->toConstant()->numberToDouble() != 1.0));
} returntrue;
}
END_TEST(testJitDCEinGVN_phi)
¤ Dauer der Verarbeitung: 0.21 Sekunden
(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.