< prev index next >

src/hotspot/share/opto/compile.cpp

Print this page

 574                   _skeleton_predicate_opaqs (comp_arena(), 8, 0, NULL),
 575                   _expensive_nodes   (comp_arena(), 8, 0, NULL),
 576                   _for_post_loop_igvn(comp_arena(), 8, 0, NULL),
 577                   _coarsened_locks   (comp_arena(), 8, 0, NULL),
 578                   _congraph(NULL),
 579                   NOT_PRODUCT(_printer(NULL) COMMA)
 580                   _dead_node_list(comp_arena()),
 581                   _dead_node_count(0),
 582                   _node_arena(mtCompiler),
 583                   _old_arena(mtCompiler),
 584                   _mach_constant_base_node(NULL),
 585                   _Compile_types(mtCompiler),
 586                   _initial_gvn(NULL),
 587                   _for_igvn(NULL),
 588                   _late_inlines(comp_arena(), 2, 0, NULL),
 589                   _string_late_inlines(comp_arena(), 2, 0, NULL),
 590                   _boxing_late_inlines(comp_arena(), 2, 0, NULL),
 591                   _vector_reboxing_late_inlines(comp_arena(), 2, 0, NULL),
 592                   _late_inlines_pos(0),
 593                   _number_of_mh_late_inlines(0),
 594                   _native_invokers(comp_arena(), 1, 0, NULL),
 595                   _print_inlining_stream(NULL),
 596                   _print_inlining_list(NULL),
 597                   _print_inlining_idx(0),
 598                   _print_inlining_output(NULL),
 599                   _replay_inline_data(NULL),
 600                   _java_calls(0),
 601                   _inner_loops(0),
 602                   _interpreter_frame_size(0)
 603 #ifndef PRODUCT
 604                   , _in_dump_cnt(0)
 605 #endif
 606 {
 607   C = this;
 608   CompileWrapper cw(this);
 609 
 610   if (CITimeVerbose) {
 611     tty->print(" ");
 612     target->holder()->name()->print();
 613     tty->print(".");
 614     target->print_short_name();

 860     _has_method_handle_invokes(false),
 861     _clinit_barrier_on_entry(false),
 862     _stress_seed(0),
 863     _comp_arena(mtCompiler),
 864     _barrier_set_state(BarrierSet::barrier_set()->barrier_set_c2()->create_barrier_state(comp_arena())),
 865     _env(ci_env),
 866     _directive(directive),
 867     _log(ci_env->log()),
 868     _failure_reason(NULL),
 869     _congraph(NULL),
 870     NOT_PRODUCT(_printer(NULL) COMMA)
 871     _dead_node_list(comp_arena()),
 872     _dead_node_count(0),
 873     _node_arena(mtCompiler),
 874     _old_arena(mtCompiler),
 875     _mach_constant_base_node(NULL),
 876     _Compile_types(mtCompiler),
 877     _initial_gvn(NULL),
 878     _for_igvn(NULL),
 879     _number_of_mh_late_inlines(0),
 880     _native_invokers(),
 881     _print_inlining_stream(NULL),
 882     _print_inlining_list(NULL),
 883     _print_inlining_idx(0),
 884     _print_inlining_output(NULL),
 885     _replay_inline_data(NULL),
 886     _java_calls(0),
 887     _inner_loops(0),
 888     _interpreter_frame_size(0),
 889 #ifndef PRODUCT
 890     _in_dump_cnt(0),
 891 #endif
 892     _allowed_reasons(0) {
 893   C = this;
 894 
 895   TraceTime t1(NULL, &_t_totalCompilation, CITime, false);
 896   TraceTime t2(NULL, &_t_stubCompilation, CITime, false);
 897 
 898 #ifndef PRODUCT
 899   set_print_assembly(PrintFrameConverterAssembly);
 900   set_parsed_irreducible_loop(false);

4852   if (_debug_file_printer == NULL) {
4853     _debug_file_printer = new IdealGraphPrinter(C, file_name, append);
4854   } else {
4855     _debug_file_printer->update_compiled_method(C->method());
4856   }
4857   tty->print_cr("Method %s to %s", append ? "appended" : "printed", file_name);
4858   _debug_file_printer->print(phase_name, (Node*)C->root());
4859 }
4860 
4861 void Compile::igv_print_method_to_network(const char* phase_name) {
4862   if (_debug_network_printer == NULL) {
4863     _debug_network_printer = new IdealGraphPrinter(C);
4864   } else {
4865     _debug_network_printer->update_compiled_method(C->method());
4866   }
4867   tty->print_cr("Method printed over network stream to IGV");
4868   _debug_network_printer->print(phase_name, (Node*)C->root());
4869 }
4870 #endif
4871 
4872 void Compile::add_native_invoker(RuntimeStub* stub) {
4873   _native_invokers.append(stub);
4874 }
4875 
4876 Node* Compile::narrow_value(BasicType bt, Node* value, const Type* type, PhaseGVN* phase, bool transform_res) {
4877   if (type != NULL && phase->type(value)->higher_equal(type)) {
4878     return value;
4879   }
4880   Node* result = NULL;
4881   if (bt == T_BYTE) {
4882     result = phase->transform(new LShiftINode(value, phase->intcon(24)));
4883     result = new RShiftINode(result, phase->intcon(24));
4884   } else if (bt == T_BOOLEAN) {
4885     result = new AndINode(value, phase->intcon(0xFF));
4886   } else if (bt == T_CHAR) {
4887     result = new AndINode(value,phase->intcon(0xFFFF));
4888   } else {
4889     assert(bt == T_SHORT, "unexpected narrow type");
4890     result = phase->transform(new LShiftINode(value, phase->intcon(16)));
4891     result = new RShiftINode(result, phase->intcon(16));
4892   }
4893   if (transform_res) {
4894     result = phase->transform(result);
4895   }

 574                   _skeleton_predicate_opaqs (comp_arena(), 8, 0, NULL),
 575                   _expensive_nodes   (comp_arena(), 8, 0, NULL),
 576                   _for_post_loop_igvn(comp_arena(), 8, 0, NULL),
 577                   _coarsened_locks   (comp_arena(), 8, 0, NULL),
 578                   _congraph(NULL),
 579                   NOT_PRODUCT(_printer(NULL) COMMA)
 580                   _dead_node_list(comp_arena()),
 581                   _dead_node_count(0),
 582                   _node_arena(mtCompiler),
 583                   _old_arena(mtCompiler),
 584                   _mach_constant_base_node(NULL),
 585                   _Compile_types(mtCompiler),
 586                   _initial_gvn(NULL),
 587                   _for_igvn(NULL),
 588                   _late_inlines(comp_arena(), 2, 0, NULL),
 589                   _string_late_inlines(comp_arena(), 2, 0, NULL),
 590                   _boxing_late_inlines(comp_arena(), 2, 0, NULL),
 591                   _vector_reboxing_late_inlines(comp_arena(), 2, 0, NULL),
 592                   _late_inlines_pos(0),
 593                   _number_of_mh_late_inlines(0),

 594                   _print_inlining_stream(NULL),
 595                   _print_inlining_list(NULL),
 596                   _print_inlining_idx(0),
 597                   _print_inlining_output(NULL),
 598                   _replay_inline_data(NULL),
 599                   _java_calls(0),
 600                   _inner_loops(0),
 601                   _interpreter_frame_size(0)
 602 #ifndef PRODUCT
 603                   , _in_dump_cnt(0)
 604 #endif
 605 {
 606   C = this;
 607   CompileWrapper cw(this);
 608 
 609   if (CITimeVerbose) {
 610     tty->print(" ");
 611     target->holder()->name()->print();
 612     tty->print(".");
 613     target->print_short_name();

 859     _has_method_handle_invokes(false),
 860     _clinit_barrier_on_entry(false),
 861     _stress_seed(0),
 862     _comp_arena(mtCompiler),
 863     _barrier_set_state(BarrierSet::barrier_set()->barrier_set_c2()->create_barrier_state(comp_arena())),
 864     _env(ci_env),
 865     _directive(directive),
 866     _log(ci_env->log()),
 867     _failure_reason(NULL),
 868     _congraph(NULL),
 869     NOT_PRODUCT(_printer(NULL) COMMA)
 870     _dead_node_list(comp_arena()),
 871     _dead_node_count(0),
 872     _node_arena(mtCompiler),
 873     _old_arena(mtCompiler),
 874     _mach_constant_base_node(NULL),
 875     _Compile_types(mtCompiler),
 876     _initial_gvn(NULL),
 877     _for_igvn(NULL),
 878     _number_of_mh_late_inlines(0),

 879     _print_inlining_stream(NULL),
 880     _print_inlining_list(NULL),
 881     _print_inlining_idx(0),
 882     _print_inlining_output(NULL),
 883     _replay_inline_data(NULL),
 884     _java_calls(0),
 885     _inner_loops(0),
 886     _interpreter_frame_size(0),
 887 #ifndef PRODUCT
 888     _in_dump_cnt(0),
 889 #endif
 890     _allowed_reasons(0) {
 891   C = this;
 892 
 893   TraceTime t1(NULL, &_t_totalCompilation, CITime, false);
 894   TraceTime t2(NULL, &_t_stubCompilation, CITime, false);
 895 
 896 #ifndef PRODUCT
 897   set_print_assembly(PrintFrameConverterAssembly);
 898   set_parsed_irreducible_loop(false);

4850   if (_debug_file_printer == NULL) {
4851     _debug_file_printer = new IdealGraphPrinter(C, file_name, append);
4852   } else {
4853     _debug_file_printer->update_compiled_method(C->method());
4854   }
4855   tty->print_cr("Method %s to %s", append ? "appended" : "printed", file_name);
4856   _debug_file_printer->print(phase_name, (Node*)C->root());
4857 }
4858 
4859 void Compile::igv_print_method_to_network(const char* phase_name) {
4860   if (_debug_network_printer == NULL) {
4861     _debug_network_printer = new IdealGraphPrinter(C);
4862   } else {
4863     _debug_network_printer->update_compiled_method(C->method());
4864   }
4865   tty->print_cr("Method printed over network stream to IGV");
4866   _debug_network_printer->print(phase_name, (Node*)C->root());
4867 }
4868 #endif
4869 




4870 Node* Compile::narrow_value(BasicType bt, Node* value, const Type* type, PhaseGVN* phase, bool transform_res) {
4871   if (type != NULL && phase->type(value)->higher_equal(type)) {
4872     return value;
4873   }
4874   Node* result = NULL;
4875   if (bt == T_BYTE) {
4876     result = phase->transform(new LShiftINode(value, phase->intcon(24)));
4877     result = new RShiftINode(result, phase->intcon(24));
4878   } else if (bt == T_BOOLEAN) {
4879     result = new AndINode(value, phase->intcon(0xFF));
4880   } else if (bt == T_CHAR) {
4881     result = new AndINode(value,phase->intcon(0xFFFF));
4882   } else {
4883     assert(bt == T_SHORT, "unexpected narrow type");
4884     result = phase->transform(new LShiftINode(value, phase->intcon(16)));
4885     result = new RShiftINode(result, phase->intcon(16));
4886   }
4887   if (transform_res) {
4888     result = phase->transform(result);
4889   }
< prev index next >