2163 // check if spill moves could have been appended at the end of this block, but
2164 // before the branch instruction. So the split child information for this branch would
2165 // be incorrect.
2166 LIR_OpBranch* branch = block->lir()->instructions_list()->last()->as_OpBranch();
2167 if (branch != NULL) {
2168 if (block->live_out().at(opr->vreg_number())) {
2169 assert(branch->cond() == lir_cond_always, "block does not end with an unconditional jump");
2170 assert(false, "can't get split child for the last branch of a block because the information would be incorrect (moves are inserted before the branch in resolve_data_flow)");
2171 }
2172 }
2173 }
2174 #endif
2175
2176 // operands are not changed when an interval is split during allocation,
2177 // so search the right interval here
2178 interval = split_child_at_op_id(interval, op_id, mode);
2179 }
2180
2181 LIR_Opr res = operand_for_interval(interval);
2182
2183 #ifdef X86
2184 // new semantic for is_last_use: not only set on definite end of interval,
2185 // but also before hole
2186 // This may still miss some cases (e.g. for dead values), but it is not necessary that the
2187 // last use information is completely correct
2188 // information is only needed for fpu stack allocation
2189 if (res->is_fpu_register()) {
2190 if (opr->is_last_use() || op_id == interval->to() || (op_id != -1 && interval->has_hole_between(op_id, op_id + 1))) {
2191 assert(op_id == -1 || !is_block_begin(op_id), "holes at begin of block may also result from control flow");
2192 res = res->make_last_use();
2193 }
2194 }
2195 #endif
2196
2197 assert(!gen()->is_vreg_flag_set(opr->vreg_number(), LIRGenerator::callee_saved) || !FrameMap::is_caller_save_register(res), "bad allocation");
2198
2199 return res;
2200 }
2201
2202
2203 #ifdef ASSERT
|
2163 // check if spill moves could have been appended at the end of this block, but
2164 // before the branch instruction. So the split child information for this branch would
2165 // be incorrect.
2166 LIR_OpBranch* branch = block->lir()->instructions_list()->last()->as_OpBranch();
2167 if (branch != NULL) {
2168 if (block->live_out().at(opr->vreg_number())) {
2169 assert(branch->cond() == lir_cond_always, "block does not end with an unconditional jump");
2170 assert(false, "can't get split child for the last branch of a block because the information would be incorrect (moves are inserted before the branch in resolve_data_flow)");
2171 }
2172 }
2173 }
2174 #endif
2175
2176 // operands are not changed when an interval is split during allocation,
2177 // so search the right interval here
2178 interval = split_child_at_op_id(interval, op_id, mode);
2179 }
2180
2181 LIR_Opr res = operand_for_interval(interval);
2182
2183 #if defined(X86) || defined(AARCH64)
2184 // new semantic for is_last_use: not only set on definite end of interval,
2185 // but also before hole
2186 // This may still miss some cases (e.g. for dead values), but it is not necessary that the
2187 // last use information is completely correct
2188 // information is only needed for fpu stack allocation
2189 if (res->is_fpu_register()) {
2190 if (opr->is_last_use() || op_id == interval->to() || (op_id != -1 && interval->has_hole_between(op_id, op_id + 1))) {
2191 assert(op_id == -1 || !is_block_begin(op_id), "holes at begin of block may also result from control flow");
2192 res = res->make_last_use();
2193 }
2194 }
2195 #endif
2196
2197 assert(!gen()->is_vreg_flag_set(opr->vreg_number(), LIRGenerator::callee_saved) || !FrameMap::is_caller_save_register(res), "bad allocation");
2198
2199 return res;
2200 }
2201
2202
2203 #ifdef ASSERT
|