865
866 #ifndef PRODUCT
867 if (should_print_ideal()) {
868 print_ideal_ir("PrintIdeal");
869 }
870 #endif
871
872 #ifdef ASSERT
873 BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
874 bs->verify_gc_barriers(this, BarrierSetC2::BeforeCodeGen);
875 #endif
876
877 // Dump compilation data to replay it.
878 if (directive->DumpReplayOption) {
879 env()->dump_replay_data(_compile_id);
880 }
881 if (directive->DumpInlineOption && (ilt() != nullptr)) {
882 env()->dump_inline_data(_compile_id);
883 }
884
885 // Now that we know the size of all the monitors we can add a fixed slot
886 // for the original deopt pc.
887 int next_slot = fixed_slots() + (sizeof(address) / VMRegImpl::stack_slot_size);
888 set_fixed_slots(next_slot);
889
890 // Compute when to use implicit null checks. Used by matching trap based
891 // nodes and NullCheck optimization.
892 set_allowed_deopt_reasons();
893
894 // Now generate code
895 Code_Gen();
896 }
897
898 //------------------------------Compile----------------------------------------
899 // Compile a runtime stub
900 Compile::Compile(ciEnv* ci_env,
901 TypeFunc_generator generator,
902 address stub_function,
903 const char* stub_name,
904 StubId stub_id,
905 int is_fancy_jump,
906 bool pass_tls,
907 bool return_pc,
|
865
866 #ifndef PRODUCT
867 if (should_print_ideal()) {
868 print_ideal_ir("PrintIdeal");
869 }
870 #endif
871
872 #ifdef ASSERT
873 BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
874 bs->verify_gc_barriers(this, BarrierSetC2::BeforeCodeGen);
875 #endif
876
877 // Dump compilation data to replay it.
878 if (directive->DumpReplayOption) {
879 env()->dump_replay_data(_compile_id);
880 }
881 if (directive->DumpInlineOption && (ilt() != nullptr)) {
882 env()->dump_inline_data(_compile_id);
883 }
884
885 // Now that we know the size of all the monitors we can add the fixed slots
886 // for GC barriers and the original deopt pc. All these slots should be able
887 // to fit an address. The reserved GC slots are used, for instance, by
888 // slowpath GC barrier stubs that need to save registers to the stack when
889 // making calls to GC runtime.
890 int reserved_gc_slots = BarrierSet::barrier_set()->barrier_set_c2()->reserved_slots();
891 int next_slot = fixed_slots() + (reserved_gc_slots + 1) * sizeof(address) / VMRegImpl::stack_slot_size;
892 set_fixed_slots(next_slot);
893
894 // Compute when to use implicit null checks. Used by matching trap based
895 // nodes and NullCheck optimization.
896 set_allowed_deopt_reasons();
897
898 // Now generate code
899 Code_Gen();
900 }
901
902 //------------------------------Compile----------------------------------------
903 // Compile a runtime stub
904 Compile::Compile(ciEnv* ci_env,
905 TypeFunc_generator generator,
906 address stub_function,
907 const char* stub_name,
908 StubId stub_id,
909 int is_fancy_jump,
910 bool pass_tls,
911 bool return_pc,
|