2068 log->end_elem();
2069 }
2070
2071 // Make sure any guarding test views this path as very unlikely
2072 Node *i0 = control()->in(0);
2073 if (i0 != NULL && i0->is_If()) { // Found a guarding if test?
2074 IfNode *iff = i0->as_If();
2075 float f = iff->_prob; // Get prob
2076 if (control()->Opcode() == Op_IfTrue) {
2077 if (f > PROB_UNLIKELY_MAG(4))
2078 iff->_prob = PROB_MIN;
2079 } else {
2080 if (f < PROB_LIKELY_MAG(4))
2081 iff->_prob = PROB_MAX;
2082 }
2083 }
2084
2085 // Clear out dead values from the debug info.
2086 kill_dead_locals();
2087
2088 // Make sure all value types are allocated before calling uncommon_trap
2089 for (JVMState* jvms = this->jvms(); jvms != NULL; jvms = jvms->caller()) {
2090 SafePointNode* map = jvms->map();
2091 // Search for value type locals
2092 for (int i = 0; i < jvms->loc_size(); ++i) {
2093 Node* local = map->local(jvms, i);
2094 if (local->is_ValueType()) {
2095 // Allocate value type
2096 local = local->as_ValueType()->store_to_memory(this);
2097 map->set_local(jvms, i, local);
2098 }
2099 }
2100 }
2101
2102 // Now insert the uncommon trap subroutine call
2103 address call_addr = SharedRuntime::uncommon_trap_blob()->entry_point();
2104 const TypePtr* no_memory_effects = NULL;
2105 // Pass the index of the class to be loaded
2106 Node* call = make_runtime_call(RC_NO_LEAF | RC_UNCOMMON |
2107 (must_throw ? RC_MUST_THROW : 0),
2108 OptoRuntime::uncommon_trap_Type(),
2109 call_addr, "uncommon_trap", no_memory_effects,
2110 intcon(trap_request));
2111 assert(call->as_CallStaticJava()->uncommon_trap_request() == trap_request,
2112 "must extract request correctly from the graph");
2113 assert(trap_request != 0, "zero value reserved by uncommon_trap_request");
2114
2115 call->set_req(TypeFunc::ReturnAdr, returnadr());
2116 // The debug info is the only real input to this call.
2117
2118 // Halt-and-catch fire here. The above call should never return!
2119 HaltNode* halt = new HaltNode(control(), frameptr());
2120 _gvn.set_type_bottom(halt);
2121 root()->add_req(halt);
|
2068 log->end_elem();
2069 }
2070
2071 // Make sure any guarding test views this path as very unlikely
2072 Node *i0 = control()->in(0);
2073 if (i0 != NULL && i0->is_If()) { // Found a guarding if test?
2074 IfNode *iff = i0->as_If();
2075 float f = iff->_prob; // Get prob
2076 if (control()->Opcode() == Op_IfTrue) {
2077 if (f > PROB_UNLIKELY_MAG(4))
2078 iff->_prob = PROB_MIN;
2079 } else {
2080 if (f < PROB_LIKELY_MAG(4))
2081 iff->_prob = PROB_MAX;
2082 }
2083 }
2084
2085 // Clear out dead values from the debug info.
2086 kill_dead_locals();
2087
2088 // Now insert the uncommon trap subroutine call
2089 address call_addr = SharedRuntime::uncommon_trap_blob()->entry_point();
2090 const TypePtr* no_memory_effects = NULL;
2091 // Pass the index of the class to be loaded
2092 Node* call = make_runtime_call(RC_NO_LEAF | RC_UNCOMMON |
2093 (must_throw ? RC_MUST_THROW : 0),
2094 OptoRuntime::uncommon_trap_Type(),
2095 call_addr, "uncommon_trap", no_memory_effects,
2096 intcon(trap_request));
2097 assert(call->as_CallStaticJava()->uncommon_trap_request() == trap_request,
2098 "must extract request correctly from the graph");
2099 assert(trap_request != 0, "zero value reserved by uncommon_trap_request");
2100
2101 call->set_req(TypeFunc::ReturnAdr, returnadr());
2102 // The debug info is the only real input to this call.
2103
2104 // Halt-and-catch fire here. The above call should never return!
2105 HaltNode* halt = new HaltNode(control(), frameptr());
2106 _gvn.set_type_bottom(halt);
2107 root()->add_req(halt);
|