637 _node_bundling_base(NULL),
638 _java_calls(0),
639 _inner_loops(0),
640 _scratch_const_size(-1),
641 _in_scratch_emit_size(false),
642 _dead_node_list(comp_arena()),
643 _dead_node_count(0),
644 #ifndef PRODUCT
645 _trace_opto_output(TraceOptoOutput || method()->has_option("TraceOptoOutput")),
646 _printer(IdealGraphPrinter::printer()),
647 #endif
648 _congraph(NULL),
649 _late_inlines(comp_arena(), 2, 0, NULL),
650 _string_late_inlines(comp_arena(), 2, 0, NULL),
651 _boxing_late_inlines(comp_arena(), 2, 0, NULL),
652 _late_inlines_pos(0),
653 _number_of_mh_late_inlines(0),
654 _inlining_progress(false),
655 _inlining_incrementally(false),
656 _print_inlining_list(NULL),
657 _print_inlining_idx(0) {
658 C = this;
659
660 CompileWrapper cw(this);
661 #ifndef PRODUCT
662 if (TimeCompiler2) {
663 tty->print(" ");
664 target->holder()->name()->print();
665 tty->print(".");
666 target->print_short_name();
667 tty->print(" ");
668 }
669 TraceTime t1("Total compilation time", &_t_totalCompilation, TimeCompiler, TimeCompiler2);
670 TraceTime t2(NULL, &_t_methodCompilation, TimeCompiler, false);
671 bool print_opto_assembly = PrintOptoAssembly || _method->has_option("PrintOptoAssembly");
672 if (!print_opto_assembly) {
673 bool print_assembly = (PrintAssembly || _method->should_print_assembly());
674 if (print_assembly && !Disassembler::can_decode()) {
675 tty->print_cr("PrintAssembly request changed to PrintOptoAssembly");
676 print_opto_assembly = true;
677 }
745 // the pre-barrier code.
746 // Specifically, if G1 is enabled, the value in the referent
747 // field is recorded by the G1 SATB pre barrier. This will
748 // result in the referent being marked live and the reference
749 // object removed from the list of discovered references during
750 // reference processing.
751 cg = find_intrinsic(method(), false);
752 }
753 if (cg == NULL) {
754 float past_uses = method()->interpreter_invocation_count();
755 float expected_uses = past_uses;
756 cg = CallGenerator::for_inline(method(), expected_uses);
757 }
758 }
759 if (failing()) return;
760 if (cg == NULL) {
761 record_method_not_compilable_all_tiers("cannot parse method");
762 return;
763 }
764 JVMState* jvms = build_start_state(start(), tf());
765 if ((jvms = cg->generate(jvms)) == NULL) {
766 record_method_not_compilable("method parse failed");
767 return;
768 }
769 GraphKit kit(jvms);
770
771 if (!kit.stopped()) {
772 // Accept return values, and transfer control we know not where.
773 // This is done by a special, unique ReturnNode bound to root.
774 return_values(kit.jvms());
775 }
776
777 if (kit.has_exceptions()) {
778 // Any exceptions that escape from this call must be rethrown
779 // to whatever caller is dynamically above us on the stack.
780 // This is done by a special, unique RethrowNode bound to root.
781 rethrow_exceptions(kit.transfer_exceptions_into_jvms());
782 }
783
784 assert(IncrementalInline || (_late_inlines.length() == 0 && !has_mh_late_inlines()), "incremental inlining is off");
785
922 _eliminate_boxing(false),
923 _failure_reason(NULL),
924 _code_buffer("Compile::Fill_buffer"),
925 _has_method_handle_invokes(false),
926 _mach_constant_base_node(NULL),
927 _node_bundling_limit(0),
928 _node_bundling_base(NULL),
929 _java_calls(0),
930 _inner_loops(0),
931 #ifndef PRODUCT
932 _trace_opto_output(TraceOptoOutput),
933 _printer(NULL),
934 #endif
935 _dead_node_list(comp_arena()),
936 _dead_node_count(0),
937 _congraph(NULL),
938 _number_of_mh_late_inlines(0),
939 _inlining_progress(false),
940 _inlining_incrementally(false),
941 _print_inlining_list(NULL),
942 _print_inlining_idx(0) {
943 C = this;
944
945 #ifndef PRODUCT
946 TraceTime t1(NULL, &_t_totalCompilation, TimeCompiler, false);
947 TraceTime t2(NULL, &_t_stubCompilation, TimeCompiler, false);
948 set_print_assembly(PrintFrameConverterAssembly);
949 set_parsed_irreducible_loop(false);
950 #endif
951 CompileWrapper cw(this);
952 Init(/*AliasLevel=*/ 0);
953 init_tf((*generator)());
954
955 {
956 // The following is a dummy for the sake of GraphKit::gen_stub
957 Unique_Node_List for_igvn(comp_arena());
958 set_for_igvn(&for_igvn); // not used, but some GraphKit guys push on this
959 PhaseGVN gvn(Thread::current()->resource_area(),255);
960 set_initial_gvn(&gvn); // not significant, but GraphKit guys use it pervasively
961 gvn.transform_no_reclaim(top());
962
|
637 _node_bundling_base(NULL),
638 _java_calls(0),
639 _inner_loops(0),
640 _scratch_const_size(-1),
641 _in_scratch_emit_size(false),
642 _dead_node_list(comp_arena()),
643 _dead_node_count(0),
644 #ifndef PRODUCT
645 _trace_opto_output(TraceOptoOutput || method()->has_option("TraceOptoOutput")),
646 _printer(IdealGraphPrinter::printer()),
647 #endif
648 _congraph(NULL),
649 _late_inlines(comp_arena(), 2, 0, NULL),
650 _string_late_inlines(comp_arena(), 2, 0, NULL),
651 _boxing_late_inlines(comp_arena(), 2, 0, NULL),
652 _late_inlines_pos(0),
653 _number_of_mh_late_inlines(0),
654 _inlining_progress(false),
655 _inlining_incrementally(false),
656 _print_inlining_list(NULL),
657 _print_inlining_idx(0),
658 _preserve_jvm_state(0) {
659 C = this;
660
661 CompileWrapper cw(this);
662 #ifndef PRODUCT
663 if (TimeCompiler2) {
664 tty->print(" ");
665 target->holder()->name()->print();
666 tty->print(".");
667 target->print_short_name();
668 tty->print(" ");
669 }
670 TraceTime t1("Total compilation time", &_t_totalCompilation, TimeCompiler, TimeCompiler2);
671 TraceTime t2(NULL, &_t_methodCompilation, TimeCompiler, false);
672 bool print_opto_assembly = PrintOptoAssembly || _method->has_option("PrintOptoAssembly");
673 if (!print_opto_assembly) {
674 bool print_assembly = (PrintAssembly || _method->should_print_assembly());
675 if (print_assembly && !Disassembler::can_decode()) {
676 tty->print_cr("PrintAssembly request changed to PrintOptoAssembly");
677 print_opto_assembly = true;
678 }
746 // the pre-barrier code.
747 // Specifically, if G1 is enabled, the value in the referent
748 // field is recorded by the G1 SATB pre barrier. This will
749 // result in the referent being marked live and the reference
750 // object removed from the list of discovered references during
751 // reference processing.
752 cg = find_intrinsic(method(), false);
753 }
754 if (cg == NULL) {
755 float past_uses = method()->interpreter_invocation_count();
756 float expected_uses = past_uses;
757 cg = CallGenerator::for_inline(method(), expected_uses);
758 }
759 }
760 if (failing()) return;
761 if (cg == NULL) {
762 record_method_not_compilable_all_tiers("cannot parse method");
763 return;
764 }
765 JVMState* jvms = build_start_state(start(), tf());
766 if ((jvms = cg->generate(jvms, NULL)) == NULL) {
767 record_method_not_compilable("method parse failed");
768 return;
769 }
770 GraphKit kit(jvms);
771
772 if (!kit.stopped()) {
773 // Accept return values, and transfer control we know not where.
774 // This is done by a special, unique ReturnNode bound to root.
775 return_values(kit.jvms());
776 }
777
778 if (kit.has_exceptions()) {
779 // Any exceptions that escape from this call must be rethrown
780 // to whatever caller is dynamically above us on the stack.
781 // This is done by a special, unique RethrowNode bound to root.
782 rethrow_exceptions(kit.transfer_exceptions_into_jvms());
783 }
784
785 assert(IncrementalInline || (_late_inlines.length() == 0 && !has_mh_late_inlines()), "incremental inlining is off");
786
923 _eliminate_boxing(false),
924 _failure_reason(NULL),
925 _code_buffer("Compile::Fill_buffer"),
926 _has_method_handle_invokes(false),
927 _mach_constant_base_node(NULL),
928 _node_bundling_limit(0),
929 _node_bundling_base(NULL),
930 _java_calls(0),
931 _inner_loops(0),
932 #ifndef PRODUCT
933 _trace_opto_output(TraceOptoOutput),
934 _printer(NULL),
935 #endif
936 _dead_node_list(comp_arena()),
937 _dead_node_count(0),
938 _congraph(NULL),
939 _number_of_mh_late_inlines(0),
940 _inlining_progress(false),
941 _inlining_incrementally(false),
942 _print_inlining_list(NULL),
943 _print_inlining_idx(0),
944 _preserve_jvm_state(0) {
945 C = this;
946
947 #ifndef PRODUCT
948 TraceTime t1(NULL, &_t_totalCompilation, TimeCompiler, false);
949 TraceTime t2(NULL, &_t_stubCompilation, TimeCompiler, false);
950 set_print_assembly(PrintFrameConverterAssembly);
951 set_parsed_irreducible_loop(false);
952 #endif
953 CompileWrapper cw(this);
954 Init(/*AliasLevel=*/ 0);
955 init_tf((*generator)());
956
957 {
958 // The following is a dummy for the sake of GraphKit::gen_stub
959 Unique_Node_List for_igvn(comp_arena());
960 set_for_igvn(&for_igvn); // not used, but some GraphKit guys push on this
961 PhaseGVN gvn(Thread::current()->resource_area(),255);
962 set_initial_gvn(&gvn); // not significant, but GraphKit guys use it pervasively
963 gvn.transform_no_reclaim(top());
964
|