提交 7916a4d7 编写于 作者: S stefank

8240223: Use consistent predicate order in and with PhaseIdealLoop::find_predicate

Reviewed-by: thartmann, neliasso, chagedorn
上级 bbfea276
......@@ -152,7 +152,7 @@ void PhaseIdealLoop::do_unswitching (IdealLoopTree *loop, Node_List &old_new) {
if (predicate != NULL) {
entry = skip_loop_predicates(entry);
}
if (predicate != NULL && UseLoopPredicate) {
if (predicate != NULL && UseProfiledLoopPredicate) {
// We may have two predicates, find first.
Node* n = find_predicate(entry);
if (n != NULL) {
......@@ -160,7 +160,7 @@ void PhaseIdealLoop::do_unswitching (IdealLoopTree *loop, Node_List &old_new) {
entry = skip_loop_predicates(entry);
}
}
if (predicate != NULL && UseProfiledLoopPredicate) {
if (predicate != NULL && UseLoopPredicate) {
entry = find_predicate(entry);
if (entry != NULL) predicate = entry;
}
......
......@@ -2576,22 +2576,22 @@ void PhaseIdealLoop::collect_potentially_useful_predicates(
LoopNode* lpn = loop->_head->as_Loop();
Node* entry = lpn->in(LoopNode::EntryControl);
Node* predicate_proj = find_predicate(entry); // loop_limit_check first
if (predicate_proj != NULL ) { // right pattern that can be used by loop predication
if (predicate_proj != NULL) { // right pattern that can be used by loop predication
assert(entry->in(0)->in(1)->in(1)->Opcode() == Op_Opaque1, "must be");
useful_predicates.push(entry->in(0)->in(1)->in(1)); // good one
entry = skip_loop_predicates(entry);
}
predicate_proj = find_predicate(entry); // Predicate
if (predicate_proj != NULL ) {
useful_predicates.push(entry->in(0)->in(1)->in(1)); // good one
entry = skip_loop_predicates(entry);
}
if (UseProfiledLoopPredicate) {
predicate_proj = find_predicate(entry); // Predicate
if (predicate_proj != NULL ) {
if (predicate_proj != NULL) {
useful_predicates.push(entry->in(0)->in(1)->in(1)); // good one
entry = skip_loop_predicates(entry);
}
}
predicate_proj = find_predicate(entry); // Predicate
if (predicate_proj != NULL) {
useful_predicates.push(entry->in(0)->in(1)->in(1)); // good one
}
}
if (loop->_next) { // sibling
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册