Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/loopPredicate.cpp @ 23286:dd9cc155639c
Merge with jdk8u66-b17
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Thu, 07 Jan 2016 17:28:46 +0100 |
parents | 52b4284cb496 c1c199dde5c9 |
children | 719853999215 |
comparison
equal
deleted
inserted
replaced
22786:ac649db7fec4 | 23286:dd9cc155639c |
---|---|
436 all_inputs_invariant = false; | 436 all_inputs_invariant = false; |
437 break; | 437 break; |
438 } | 438 } |
439 } | 439 } |
440 if (all_inputs_invariant) { | 440 if (all_inputs_invariant) { |
441 _invariant.set(n->_idx); // I am a invariant too | 441 // If n's control is a predicate that was moved out of the |
442 // loop, it was marked invariant but n is only invariant if | |
443 // it depends only on that test. Otherwise, unless that test | |
444 // is out of the loop, it's not invariant. | |
445 if (n->is_CFG() || n->depends_only_on_test() || n->in(0) == NULL || !_phase->is_member(_lpt, n->in(0))) { | |
446 _invariant.set(n->_idx); // I am a invariant too | |
447 } | |
442 } | 448 } |
443 } else { // process next input | 449 } else { // process next input |
444 _stack.set_index(idx + 1); | 450 _stack.set_index(idx + 1); |
445 Node* m = n->in(idx); | 451 Node* m = n->in(idx); |
446 if (m != NULL && !_visited.test_set(m->_idx)) { | 452 if (m != NULL && !_visited.test_set(m->_idx)) { |