< prev index next >

src/share/vm/opto/escape.cpp

Print this page




 965                   strcmp(call->as_CallLeaf()->_name, "updateBytesCRC32C") == 0 ||
 966                   strcmp(call->as_CallLeaf()->_name, "updateBytesAdler32") == 0 ||
 967                   strcmp(call->as_CallLeaf()->_name, "aescrypt_encryptBlock") == 0 ||
 968                   strcmp(call->as_CallLeaf()->_name, "aescrypt_decryptBlock") == 0 ||
 969                   strcmp(call->as_CallLeaf()->_name, "cipherBlockChaining_encryptAESCrypt") == 0 ||
 970                   strcmp(call->as_CallLeaf()->_name, "cipherBlockChaining_decryptAESCrypt") == 0 ||
 971                   strcmp(call->as_CallLeaf()->_name, "ghash_processBlocks") == 0 ||
 972                   strcmp(call->as_CallLeaf()->_name, "sha1_implCompress") == 0 ||
 973                   strcmp(call->as_CallLeaf()->_name, "sha1_implCompressMB") == 0 ||
 974                   strcmp(call->as_CallLeaf()->_name, "sha256_implCompress") == 0 ||
 975                   strcmp(call->as_CallLeaf()->_name, "sha256_implCompressMB") == 0 ||
 976                   strcmp(call->as_CallLeaf()->_name, "sha512_implCompress") == 0 ||
 977                   strcmp(call->as_CallLeaf()->_name, "sha512_implCompressMB") == 0 ||
 978                   strcmp(call->as_CallLeaf()->_name, "multiplyToLen") == 0 ||
 979                   strcmp(call->as_CallLeaf()->_name, "squareToLen") == 0 ||
 980                   strcmp(call->as_CallLeaf()->_name, "mulAdd") == 0 ||
 981                   strcmp(call->as_CallLeaf()->_name, "montgomery_multiply") == 0 ||
 982                   strcmp(call->as_CallLeaf()->_name, "montgomery_square") == 0)
 983                  ))) {
 984             call->dump();
 985             fatal(err_msg_res("EA unexpected CallLeaf %s", call->as_CallLeaf()->_name));
 986           }
 987 #endif
 988           // Always process arraycopy's destination object since
 989           // we need to add all possible edges to references in
 990           // source object.
 991           if (arg_esc >= PointsToNode::ArgEscape &&
 992               !arg_is_arraycopy_dest) {
 993             continue;
 994           }
 995           PointsToNode::EscapeState es = PointsToNode::ArgEscape;
 996           if (call->is_ArrayCopy()) {
 997             ArrayCopyNode* ac = call->as_ArrayCopy();
 998             if (ac->is_clonebasic() ||
 999                 ac->is_arraycopy_validated() ||
1000                 ac->is_copyof_validated() ||
1001                 ac->is_copyofrange_validated()) {
1002               es = PointsToNode::NoEscape;
1003             }
1004           }
1005           set_escape_state(arg_ptn, es);


1184         }
1185       }
1186       time.stop();
1187       if (time.seconds() >= EscapeAnalysisTimeout) {
1188         timeout = true;
1189         break;
1190       }
1191     } else {
1192       new_edges = 0; // Bailout
1193     }
1194   } while (new_edges > 0);
1195 
1196   // Bailout if passed limits.
1197   if ((iterations >= CG_BUILD_ITER_LIMIT) || timeout) {
1198     Compile* C = _compile;
1199     if (C->log() != NULL) {
1200       C->log()->begin_elem("connectionGraph_bailout reason='reached ");
1201       C->log()->text("%s", timeout ? "time" : "iterations");
1202       C->log()->end_elem(" limit'");
1203     }
1204     assert(ExitEscapeAnalysisOnTimeout, err_msg_res("infinite EA connection graph build (%f sec, %d iterations) with %d nodes and worklist size %d",
1205            time.seconds(), iterations, nodes_size(), ptnodes_worklist.length()));
1206     // Possible infinite build_connection_graph loop,
1207     // bailout (no changes to ideal graph were made).
1208     return false;
1209   }
1210 #ifdef ASSERT
1211   if (Verbose && PrintEscapeAnalysis) {
1212     tty->print_cr("EA: %d iterations to build connection graph with %d nodes and worklist size %d",
1213                   iterations, nodes_size(), ptnodes_worklist.length());
1214   }
1215 #endif
1216 
1217 #undef CG_BUILD_ITER_LIMIT
1218 
1219   // Find fields initialized by NULL for non-escaping Allocations.
1220   int non_escaped_length = non_escaped_worklist.length();
1221   for (int next = 0; next < non_escaped_length; next++) {
1222     JavaObjectNode* ptn = non_escaped_worklist.at(next);
1223     PointsToNode::EscapeState es = ptn->escape_state();
1224     assert(es <= PointsToNode::ArgEscape, "sanity");
1225     if (es == PointsToNode::NoEscape) {




 965                   strcmp(call->as_CallLeaf()->_name, "updateBytesCRC32C") == 0 ||
 966                   strcmp(call->as_CallLeaf()->_name, "updateBytesAdler32") == 0 ||
 967                   strcmp(call->as_CallLeaf()->_name, "aescrypt_encryptBlock") == 0 ||
 968                   strcmp(call->as_CallLeaf()->_name, "aescrypt_decryptBlock") == 0 ||
 969                   strcmp(call->as_CallLeaf()->_name, "cipherBlockChaining_encryptAESCrypt") == 0 ||
 970                   strcmp(call->as_CallLeaf()->_name, "cipherBlockChaining_decryptAESCrypt") == 0 ||
 971                   strcmp(call->as_CallLeaf()->_name, "ghash_processBlocks") == 0 ||
 972                   strcmp(call->as_CallLeaf()->_name, "sha1_implCompress") == 0 ||
 973                   strcmp(call->as_CallLeaf()->_name, "sha1_implCompressMB") == 0 ||
 974                   strcmp(call->as_CallLeaf()->_name, "sha256_implCompress") == 0 ||
 975                   strcmp(call->as_CallLeaf()->_name, "sha256_implCompressMB") == 0 ||
 976                   strcmp(call->as_CallLeaf()->_name, "sha512_implCompress") == 0 ||
 977                   strcmp(call->as_CallLeaf()->_name, "sha512_implCompressMB") == 0 ||
 978                   strcmp(call->as_CallLeaf()->_name, "multiplyToLen") == 0 ||
 979                   strcmp(call->as_CallLeaf()->_name, "squareToLen") == 0 ||
 980                   strcmp(call->as_CallLeaf()->_name, "mulAdd") == 0 ||
 981                   strcmp(call->as_CallLeaf()->_name, "montgomery_multiply") == 0 ||
 982                   strcmp(call->as_CallLeaf()->_name, "montgomery_square") == 0)
 983                  ))) {
 984             call->dump();
 985             fatal("EA unexpected CallLeaf %s", call->as_CallLeaf()->_name);
 986           }
 987 #endif
 988           // Always process arraycopy's destination object since
 989           // we need to add all possible edges to references in
 990           // source object.
 991           if (arg_esc >= PointsToNode::ArgEscape &&
 992               !arg_is_arraycopy_dest) {
 993             continue;
 994           }
 995           PointsToNode::EscapeState es = PointsToNode::ArgEscape;
 996           if (call->is_ArrayCopy()) {
 997             ArrayCopyNode* ac = call->as_ArrayCopy();
 998             if (ac->is_clonebasic() ||
 999                 ac->is_arraycopy_validated() ||
1000                 ac->is_copyof_validated() ||
1001                 ac->is_copyofrange_validated()) {
1002               es = PointsToNode::NoEscape;
1003             }
1004           }
1005           set_escape_state(arg_ptn, es);


1184         }
1185       }
1186       time.stop();
1187       if (time.seconds() >= EscapeAnalysisTimeout) {
1188         timeout = true;
1189         break;
1190       }
1191     } else {
1192       new_edges = 0; // Bailout
1193     }
1194   } while (new_edges > 0);
1195 
1196   // Bailout if passed limits.
1197   if ((iterations >= CG_BUILD_ITER_LIMIT) || timeout) {
1198     Compile* C = _compile;
1199     if (C->log() != NULL) {
1200       C->log()->begin_elem("connectionGraph_bailout reason='reached ");
1201       C->log()->text("%s", timeout ? "time" : "iterations");
1202       C->log()->end_elem(" limit'");
1203     }
1204     assert(ExitEscapeAnalysisOnTimeout, "infinite EA connection graph build (%f sec, %d iterations) with %d nodes and worklist size %d",
1205            time.seconds(), iterations, nodes_size(), ptnodes_worklist.length());
1206     // Possible infinite build_connection_graph loop,
1207     // bailout (no changes to ideal graph were made).
1208     return false;
1209   }
1210 #ifdef ASSERT
1211   if (Verbose && PrintEscapeAnalysis) {
1212     tty->print_cr("EA: %d iterations to build connection graph with %d nodes and worklist size %d",
1213                   iterations, nodes_size(), ptnodes_worklist.length());
1214   }
1215 #endif
1216 
1217 #undef CG_BUILD_ITER_LIMIT
1218 
1219   // Find fields initialized by NULL for non-escaping Allocations.
1220   int non_escaped_length = non_escaped_worklist.length();
1221   for (int next = 0; next < non_escaped_length; next++) {
1222     JavaObjectNode* ptn = non_escaped_worklist.at(next);
1223     PointsToNode::EscapeState es = ptn->escape_state();
1224     assert(es <= PointsToNode::ArgEscape, "sanity");
1225     if (es == PointsToNode::NoEscape) {


< prev index next >