578 break;
579 }
580 }
581 }
582
583 // Find dominating allocations for each memory access (store or atomic
584 // operation) and elide barriers if there is no safepoint poll in between.
585 elide_dominated_barriers(accesses, allocations);
586 }
587
588 void G1BarrierSetC2::late_barrier_analysis() const {
589 compute_liveness_at_stubs();
590 analyze_dominating_barriers();
591 }
592
593 void G1BarrierSetC2::emit_stubs(CodeBuffer& cb) const {
594 MacroAssembler masm(&cb);
595 GrowableArray<G1BarrierStubC2*>* const stubs = barrier_set_state()->stubs();
596 for (int i = 0; i < stubs->length(); i++) {
597 // Make sure there is enough space in the code buffer
598 if (cb.insts()->maybe_expand_to_ensure_remaining(PhaseOutput::MAX_inst_size) && cb.blob() == nullptr) {
599 ciEnv::current()->record_failure("CodeCache is full");
600 return;
601 }
602 stubs->at(i)->emit_code(masm);
603 }
604 masm.flush();
605 }
606
607 #ifndef PRODUCT
608 void G1BarrierSetC2::dump_barrier_data(const MachNode* mach, outputStream* st) const {
609 if ((mach->barrier_data() & G1C2BarrierPre) != 0) {
610 st->print("pre ");
611 }
612 if ((mach->barrier_data() & G1C2BarrierPost) != 0) {
613 st->print("post ");
614 }
615 if ((mach->barrier_data() & G1C2BarrierPostNotNull) != 0) {
616 st->print("notnull ");
617 }
618 }
|
578 break;
579 }
580 }
581 }
582
583 // Find dominating allocations for each memory access (store or atomic
584 // operation) and elide barriers if there is no safepoint poll in between.
585 elide_dominated_barriers(accesses, allocations);
586 }
587
588 void G1BarrierSetC2::late_barrier_analysis() const {
589 compute_liveness_at_stubs();
590 analyze_dominating_barriers();
591 }
592
593 void G1BarrierSetC2::emit_stubs(CodeBuffer& cb) const {
594 MacroAssembler masm(&cb);
595 GrowableArray<G1BarrierStubC2*>* const stubs = barrier_set_state()->stubs();
596 for (int i = 0; i < stubs->length(); i++) {
597 // Make sure there is enough space in the code buffer
598 if (cb.insts()->maybe_expand_to_ensure_remaining(PhaseOutput::max_inst_gcstub_size()) && cb.blob() == nullptr) {
599 ciEnv::current()->record_failure("CodeCache is full");
600 return;
601 }
602 stubs->at(i)->emit_code(masm);
603 }
604 masm.flush();
605 }
606
607 #ifndef PRODUCT
608 void G1BarrierSetC2::dump_barrier_data(const MachNode* mach, outputStream* st) const {
609 if ((mach->barrier_data() & G1C2BarrierPre) != 0) {
610 st->print("pre ");
611 }
612 if ((mach->barrier_data() & G1C2BarrierPost) != 0) {
613 st->print("post ");
614 }
615 if ((mach->barrier_data() & G1C2BarrierPostNotNull) != 0) {
616 st->print("notnull ");
617 }
618 }
|