Mercurial > hg > truffle
comparison src/share/vm/opto/loopopts.cpp @ 14521:29ccc4cbabca
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 12 Mar 2014 13:30:08 +0100 |
parents | cd5d10655495 |
children | 4ca6dc0799b6 cd3c534f8f4a |
comparison
equal
deleted
inserted
replaced
14520:f84115370178 | 14521:29ccc4cbabca |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 2013, 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. | |
49 return NULL; | 43 return NULL; |
50 } | 44 } |
51 | 45 |
52 int wins = 0; | 46 int wins = 0; |
53 assert(!n->is_CFG(), ""); | 47 assert(!n->is_CFG(), ""); |
1113 for( i = 1; i < phi->req(); i++ ) { | 1107 for( i = 1; i < phi->req(); i++ ) { |
1114 Node *n1 = phi->in(i)->in(1)->in(1); | 1108 Node *n1 = phi->in(i)->in(1)->in(1); |
1115 Node *n2 = phi->in(i)->in(1)->in(2); | 1109 Node *n2 = phi->in(i)->in(1)->in(2); |
1116 phi1->set_req( i, n1 ); | 1110 phi1->set_req( i, n1 ); |
1117 phi2->set_req( i, n2 ); | 1111 phi2->set_req( i, n2 ); |
1118 phi1->set_type( phi1->type()->meet(n1->bottom_type()) ); | 1112 phi1->set_type( phi1->type()->meet_speculative(n1->bottom_type())); |
1119 phi2->set_type( phi2->type()->meet(n2->bottom_type()) ); | 1113 phi2->set_type( phi2->type()->meet_speculative(n2->bottom_type())); |
1120 } | 1114 } |
1121 // See if these Phis have been made before. | 1115 // See if these Phis have been made before. |
1122 // Register with optimizer | 1116 // Register with optimizer |
1123 Node *hit1 = _igvn.hash_find_insert(phi1); | 1117 Node *hit1 = _igvn.hash_find_insert(phi1); |
1124 if( hit1 ) { // Hit, toss just made Phi | 1118 if( hit1 ) { // Hit, toss just made Phi |
1187 } else { | 1181 } else { |
1188 n1 = n2 = cmp_top; | 1182 n1 = n2 = cmp_top; |
1189 } | 1183 } |
1190 phi1->set_req( j, n1 ); | 1184 phi1->set_req( j, n1 ); |
1191 phi2->set_req( j, n2 ); | 1185 phi2->set_req( j, n2 ); |
1192 phi1->set_type( phi1->type()->meet(n1->bottom_type()) ); | 1186 phi1->set_type(phi1->type()->meet_speculative(n1->bottom_type())); |
1193 phi2->set_type( phi2->type()->meet(n2->bottom_type()) ); | 1187 phi2->set_type(phi2->type()->meet_speculative(n2->bottom_type())); |
1194 } | 1188 } |
1195 | 1189 |
1196 // See if these Phis have been made before. | 1190 // See if these Phis have been made before. |
1197 // Register with optimizer | 1191 // Register with optimizer |
1198 Node *hit1 = _igvn.hash_find_insert(phi1); | 1192 Node *hit1 = _igvn.hash_find_insert(phi1); |
2360 int opc = n->Opcode(); | 2354 int opc = n->Opcode(); |
2361 if (n->is_Call() || | 2355 if (n->is_Call() || |
2362 opc == Op_Catch || | 2356 opc == Op_Catch || |
2363 opc == Op_CatchProj || | 2357 opc == Op_CatchProj || |
2364 opc == Op_Jump || | 2358 opc == Op_Jump || |
2365 opc == Op_JumpProj || | 2359 opc == Op_JumpProj) { |
2366 opc == Op_FlagsProj) { | |
2367 #if !defined(PRODUCT) | 2360 #if !defined(PRODUCT) |
2368 if (TracePartialPeeling) { | 2361 if (TracePartialPeeling) { |
2369 tty->print_cr("\nExit control too complex: lp: %d", head->_idx); | 2362 tty->print_cr("\nExit control too complex: lp: %d", head->_idx); |
2370 } | 2363 } |
2371 #endif | 2364 #endif |