Mercurial > hg > truffle
comparison src/share/vm/opto/loopopts.cpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | cd5d10655495 |
children | 89152779163c |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
38 // Split Node 'n' through merge point if there is enough win. | 38 // Split Node 'n' through merge point if there is enough win. |
39 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) { | 39 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) { |
40 if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) { | 40 if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) { |
41 // ConvI2L may have type information on it which is unsafe to push up | 41 // ConvI2L may have type information on it which is unsafe to push up |
42 // so disable this for now | 42 // so disable this for now |
43 return NULL; | |
44 } | |
45 | |
46 if (n->is_MathExact()) { | |
47 // MathExact has projections that are not correctly handled in the code | |
48 // below. | |
43 return NULL; | 49 return NULL; |
44 } | 50 } |
45 | 51 |
46 int wins = 0; | 52 int wins = 0; |
47 assert(!n->is_CFG(), ""); | 53 assert(!n->is_CFG(), ""); |
1107 for( i = 1; i < phi->req(); i++ ) { | 1113 for( i = 1; i < phi->req(); i++ ) { |
1108 Node *n1 = phi->in(i)->in(1)->in(1); | 1114 Node *n1 = phi->in(i)->in(1)->in(1); |
1109 Node *n2 = phi->in(i)->in(1)->in(2); | 1115 Node *n2 = phi->in(i)->in(1)->in(2); |
1110 phi1->set_req( i, n1 ); | 1116 phi1->set_req( i, n1 ); |
1111 phi2->set_req( i, n2 ); | 1117 phi2->set_req( i, n2 ); |
1112 phi1->set_type( phi1->type()->meet_speculative(n1->bottom_type())); | 1118 phi1->set_type( phi1->type()->meet(n1->bottom_type()) ); |
1113 phi2->set_type( phi2->type()->meet_speculative(n2->bottom_type())); | 1119 phi2->set_type( phi2->type()->meet(n2->bottom_type()) ); |
1114 } | 1120 } |
1115 // See if these Phis have been made before. | 1121 // See if these Phis have been made before. |
1116 // Register with optimizer | 1122 // Register with optimizer |
1117 Node *hit1 = _igvn.hash_find_insert(phi1); | 1123 Node *hit1 = _igvn.hash_find_insert(phi1); |
1118 if( hit1 ) { // Hit, toss just made Phi | 1124 if( hit1 ) { // Hit, toss just made Phi |
1181 } else { | 1187 } else { |
1182 n1 = n2 = cmp_top; | 1188 n1 = n2 = cmp_top; |
1183 } | 1189 } |
1184 phi1->set_req( j, n1 ); | 1190 phi1->set_req( j, n1 ); |
1185 phi2->set_req( j, n2 ); | 1191 phi2->set_req( j, n2 ); |
1186 phi1->set_type(phi1->type()->meet_speculative(n1->bottom_type())); | 1192 phi1->set_type( phi1->type()->meet(n1->bottom_type()) ); |
1187 phi2->set_type(phi2->type()->meet_speculative(n2->bottom_type())); | 1193 phi2->set_type( phi2->type()->meet(n2->bottom_type()) ); |
1188 } | 1194 } |
1189 | 1195 |
1190 // See if these Phis have been made before. | 1196 // See if these Phis have been made before. |
1191 // Register with optimizer | 1197 // Register with optimizer |
1192 Node *hit1 = _igvn.hash_find_insert(phi1); | 1198 Node *hit1 = _igvn.hash_find_insert(phi1); |
2354 int opc = n->Opcode(); | 2360 int opc = n->Opcode(); |
2355 if (n->is_Call() || | 2361 if (n->is_Call() || |
2356 opc == Op_Catch || | 2362 opc == Op_Catch || |
2357 opc == Op_CatchProj || | 2363 opc == Op_CatchProj || |
2358 opc == Op_Jump || | 2364 opc == Op_Jump || |
2359 opc == Op_JumpProj) { | 2365 opc == Op_JumpProj || |
2366 opc == Op_FlagsProj) { | |
2360 #if !defined(PRODUCT) | 2367 #if !defined(PRODUCT) |
2361 if (TracePartialPeeling) { | 2368 if (TracePartialPeeling) { |
2362 tty->print_cr("\nExit control too complex: lp: %d", head->_idx); | 2369 tty->print_cr("\nExit control too complex: lp: %d", head->_idx); |
2363 } | 2370 } |
2364 #endif | 2371 #endif |