mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
7153771: array bound check elimination for c1
When possible optimize out array bound checks, inserting predicates when needed. Reviewed-by: never, kvn, twisti
This commit is contained in:
parent
2f4ecb86a2
commit
06ef4cddf7
40 changed files with 2861 additions and 153 deletions
|
@ -987,6 +987,25 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
|||
break;
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
|
||||
case predicate_failed_trap_id:
|
||||
{
|
||||
__ set_info("predicate_failed_trap", dont_gc_arguments);
|
||||
OopMap* oop_map = save_live_registers(sasm);
|
||||
|
||||
int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, predicate_failed_trap));
|
||||
|
||||
oop_maps = new OopMapSet();
|
||||
oop_maps->add_gc_map(call_offset, oop_map);
|
||||
|
||||
DeoptimizationBlob* deopt_blob = SharedRuntime::deopt_blob();
|
||||
assert(deopt_blob != NULL, "deoptimization blob must have been created");
|
||||
restore_live_registers(sasm);
|
||||
__ restore();
|
||||
__ br(Assembler::always, false, Assembler::pt, deopt_blob->unpack_with_reexecution(), relocInfo::runtime_call_type);
|
||||
__ delayed()->nop();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
{ __ set_info("unimplemented entry", dont_gc_arguments);
|
||||
__ save_frame(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue