author | Dan Gohman <sunfish@mozilla.com> |
Wed, 17 Sep 2014 10:27:25 -0700 | |
changeset 205885 | d123ad5677f6be76ba98550876451b743a086de1 |
parent 205884 | b0f729f0e0d38840fcdda9296b62a3d598cc62d0 |
child 205886 | 6e9a69bead52911e66eb586184c558259a344caa |
push id | 27507 |
push user | ryanvm@gmail.com |
push date | Thu, 18 Sep 2014 02:16:54 +0000 |
treeherder | mozilla-central@488d490da742 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | nbp |
bugs | 1029830 |
milestone | 35.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/jit/ValueNumbering.cpp +++ b/js/src/jit/ValueNumbering.cpp @@ -199,16 +199,26 @@ ComputeNewDominator(MBasicBlock *block, // whether the block's new dominator will be closer than its old one and whether // it will expose potential optimization opportunities. static bool IsDominatorRefined(MBasicBlock *block) { MBasicBlock *old = block->immediateDominator(); MBasicBlock *now = ComputeNewDominator(block, old); + // If this block is just a goto and it doesn't dominate its destination, + // removing its predecessors won't refine the dominators of anything + // interesting. + MControlInstruction *control = block->lastIns(); + if (*block->begin() == control && block->phisEmpty() && control->isGoto() && + !block->dominates(control->toGoto()->target())) + { + return false; + } + // We've computed block's new dominator. Test whether there are any // newly-dominating definitions which look interesting. MOZ_ASSERT(old->dominates(now), "Refined dominator not dominated by old dominator"); for (MBasicBlock *i = now; i != old; i = i->immediateDominator()) { if (!i->phisEmpty() || *i->begin() != i->lastIns()) return true; }