< prev index next >

src/share/vm/opto/parse1.cpp

Print this page
rev 11416 : [mq]: With tiered C2 should not mark methods as not compilable with all tiers


 408   debug_only(_block_count = -1);
 409   debug_only(_blocks = (Block*)-1);
 410 #ifndef PRODUCT
 411   if (PrintCompilation || PrintOpto) {
 412     // Make sure I have an inline tree, so I can print messages about it.
 413     JVMState* ilt_caller = is_osr_parse() ? caller->caller() : caller;
 414     InlineTree::find_subtree_from_root(C->ilt(), ilt_caller, parse_method);
 415   }
 416   _max_switch_depth = 0;
 417   _est_switch_depth = 0;
 418 #endif
 419 
 420   if (parse_method->has_reserved_stack_access()) {
 421     C->set_has_reserved_stack_access(true);
 422   }
 423 
 424   _tf = TypeFunc::make(method());
 425   _iter.reset_to_method(method());
 426   _flow = method()->get_flow_analysis();
 427   if (_flow->failing()) {
 428     C->record_method_not_compilable_all_tiers(_flow->failure_reason());
 429   }
 430 
 431 #ifndef PRODUCT
 432   if (_flow->has_irreducible_entry()) {
 433     C->set_parsed_irreducible_loop(true);
 434   }
 435 #endif
 436 
 437   if (_expected_uses <= 0) {
 438     _prof_factor = 1;
 439   } else {
 440     float prof_total = parse_method->interpreter_invocation_count();
 441     if (prof_total <= _expected_uses) {
 442       _prof_factor = 1;
 443     } else {
 444       _prof_factor = _expected_uses / prof_total;
 445     }
 446   }
 447 
 448   CompileLog* log = C->log();


1101 
1102   {
1103     // Capture very early exceptions (receiver null checks) from caller JVMS
1104     GraphKit caller(_caller);
1105     SafePointNode* ex_map;
1106     while ((ex_map = caller.pop_exception_state()) != NULL) {
1107       _exits.add_exception_state(ex_map);
1108     }
1109   }
1110   _exits.map()->apply_replaced_nodes();
1111 }
1112 
1113 //-----------------------------create_entry_map-------------------------------
1114 // Initialize our parser map to contain the types at method entry.
1115 // For OSR, the map contains a single RawPtr parameter.
1116 // Initial monitor locking for sync. methods is performed by do_method_entry.
1117 SafePointNode* Parse::create_entry_map() {
1118   // Check for really stupid bail-out cases.
1119   uint len = TypeFunc::Parms + method()->max_locals() + method()->max_stack();
1120   if (len >= 32760) {
1121     C->record_method_not_compilable_all_tiers("too many local variables");
1122     return NULL;
1123   }
1124 
1125   // clear current replaced nodes that are of no use from here on (map was cloned in build_exits).
1126   _caller->map()->delete_replaced_nodes();
1127 
1128   // If this is an inlined method, we may have to do a receiver null check.
1129   if (_caller->has_method() && is_normal_parse() && !method()->is_static()) {
1130     GraphKit kit(_caller);
1131     kit.null_check_receiver_before_call(method());
1132     _caller = kit.transfer_exceptions_into_jvms();
1133     if (kit.stopped()) {
1134       _exits.add_exception_states_from(_caller);
1135       _exits.set_jvms(_caller);
1136       return NULL;
1137     }
1138   }
1139 
1140   assert(method() != NULL, "parser must have a method");
1141 




 408   debug_only(_block_count = -1);
 409   debug_only(_blocks = (Block*)-1);
 410 #ifndef PRODUCT
 411   if (PrintCompilation || PrintOpto) {
 412     // Make sure I have an inline tree, so I can print messages about it.
 413     JVMState* ilt_caller = is_osr_parse() ? caller->caller() : caller;
 414     InlineTree::find_subtree_from_root(C->ilt(), ilt_caller, parse_method);
 415   }
 416   _max_switch_depth = 0;
 417   _est_switch_depth = 0;
 418 #endif
 419 
 420   if (parse_method->has_reserved_stack_access()) {
 421     C->set_has_reserved_stack_access(true);
 422   }
 423 
 424   _tf = TypeFunc::make(method());
 425   _iter.reset_to_method(method());
 426   _flow = method()->get_flow_analysis();
 427   if (_flow->failing()) {
 428     C->record_method_not_compilable(_flow->failure_reason());
 429   }
 430 
 431 #ifndef PRODUCT
 432   if (_flow->has_irreducible_entry()) {
 433     C->set_parsed_irreducible_loop(true);
 434   }
 435 #endif
 436 
 437   if (_expected_uses <= 0) {
 438     _prof_factor = 1;
 439   } else {
 440     float prof_total = parse_method->interpreter_invocation_count();
 441     if (prof_total <= _expected_uses) {
 442       _prof_factor = 1;
 443     } else {
 444       _prof_factor = _expected_uses / prof_total;
 445     }
 446   }
 447 
 448   CompileLog* log = C->log();


1101 
1102   {
1103     // Capture very early exceptions (receiver null checks) from caller JVMS
1104     GraphKit caller(_caller);
1105     SafePointNode* ex_map;
1106     while ((ex_map = caller.pop_exception_state()) != NULL) {
1107       _exits.add_exception_state(ex_map);
1108     }
1109   }
1110   _exits.map()->apply_replaced_nodes();
1111 }
1112 
1113 //-----------------------------create_entry_map-------------------------------
1114 // Initialize our parser map to contain the types at method entry.
1115 // For OSR, the map contains a single RawPtr parameter.
1116 // Initial monitor locking for sync. methods is performed by do_method_entry.
1117 SafePointNode* Parse::create_entry_map() {
1118   // Check for really stupid bail-out cases.
1119   uint len = TypeFunc::Parms + method()->max_locals() + method()->max_stack();
1120   if (len >= 32760) {
1121     C->record_method_not_compilable("too many local variables");
1122     return NULL;
1123   }
1124 
1125   // clear current replaced nodes that are of no use from here on (map was cloned in build_exits).
1126   _caller->map()->delete_replaced_nodes();
1127 
1128   // If this is an inlined method, we may have to do a receiver null check.
1129   if (_caller->has_method() && is_normal_parse() && !method()->is_static()) {
1130     GraphKit kit(_caller);
1131     kit.null_check_receiver_before_call(method());
1132     _caller = kit.transfer_exceptions_into_jvms();
1133     if (kit.stopped()) {
1134       _exits.add_exception_states_from(_caller);
1135       _exits.set_jvms(_caller);
1136       return NULL;
1137     }
1138   }
1139 
1140   assert(method() != NULL, "parser must have a method");
1141 


< prev index next >