< prev index next >

src/hotspot/share/opto/compile.cpp

Print this page

 605                   _skeleton_predicate_opaqs (comp_arena(), 8, 0, NULL),
 606                   _expensive_nodes   (comp_arena(), 8, 0, NULL),
 607                   _for_post_loop_igvn(comp_arena(), 8, 0, NULL),
 608                   _coarsened_locks   (comp_arena(), 8, 0, NULL),
 609                   _congraph(NULL),
 610                   NOT_PRODUCT(_igv_printer(NULL) COMMA)
 611                   _dead_node_list(comp_arena()),
 612                   _dead_node_count(0),
 613                   _node_arena(mtCompiler),
 614                   _old_arena(mtCompiler),
 615                   _mach_constant_base_node(NULL),
 616                   _Compile_types(mtCompiler),
 617                   _initial_gvn(NULL),
 618                   _for_igvn(NULL),
 619                   _late_inlines(comp_arena(), 2, 0, NULL),
 620                   _string_late_inlines(comp_arena(), 2, 0, NULL),
 621                   _boxing_late_inlines(comp_arena(), 2, 0, NULL),
 622                   _vector_reboxing_late_inlines(comp_arena(), 2, 0, NULL),
 623                   _late_inlines_pos(0),
 624                   _number_of_mh_late_inlines(0),
 625                   _native_invokers(comp_arena(), 1, 0, NULL),
 626                   _print_inlining_stream(NULL),
 627                   _print_inlining_list(NULL),
 628                   _print_inlining_idx(0),
 629                   _print_inlining_output(NULL),
 630                   _replay_inline_data(NULL),
 631                   _java_calls(0),
 632                   _inner_loops(0),
 633                   _interpreter_frame_size(0),
 634                   _output(NULL)
 635 #ifndef PRODUCT
 636                   , _in_dump_cnt(0)
 637 #endif
 638 {
 639   C = this;
 640   CompileWrapper cw(this);
 641 
 642   if (CITimeVerbose) {
 643     tty->print(" ");
 644     target->holder()->name()->print();
 645     tty->print(".");

 879     _has_method_handle_invokes(false),
 880     _clinit_barrier_on_entry(false),
 881     _stress_seed(0),
 882     _comp_arena(mtCompiler),
 883     _barrier_set_state(BarrierSet::barrier_set()->barrier_set_c2()->create_barrier_state(comp_arena())),
 884     _env(ci_env),
 885     _directive(directive),
 886     _log(ci_env->log()),
 887     _failure_reason(NULL),
 888     _congraph(NULL),
 889     NOT_PRODUCT(_igv_printer(NULL) COMMA)
 890     _dead_node_list(comp_arena()),
 891     _dead_node_count(0),
 892     _node_arena(mtCompiler),
 893     _old_arena(mtCompiler),
 894     _mach_constant_base_node(NULL),
 895     _Compile_types(mtCompiler),
 896     _initial_gvn(NULL),
 897     _for_igvn(NULL),
 898     _number_of_mh_late_inlines(0),
 899     _native_invokers(),
 900     _print_inlining_stream(NULL),
 901     _print_inlining_list(NULL),
 902     _print_inlining_idx(0),
 903     _print_inlining_output(NULL),
 904     _replay_inline_data(NULL),
 905     _java_calls(0),
 906     _inner_loops(0),
 907     _interpreter_frame_size(0),
 908     _output(NULL),
 909 #ifndef PRODUCT
 910     _in_dump_cnt(0),
 911 #endif
 912     _allowed_reasons(0) {
 913   C = this;
 914 
 915   TraceTime t1(NULL, &_t_totalCompilation, CITime, false);
 916   TraceTime t2(NULL, &_t_stubCompilation, CITime, false);
 917 
 918 #ifndef PRODUCT
 919   set_print_assembly(PrintFrameConverterAssembly);

5044   if (_debug_file_printer == NULL) {
5045     _debug_file_printer = new IdealGraphPrinter(C, file_name, append);
5046   } else {
5047     _debug_file_printer->update_compiled_method(C->method());
5048   }
5049   tty->print_cr("Method %s to %s", append ? "appended" : "printed", file_name);
5050   _debug_file_printer->print(phase_name, (Node*)C->root());
5051 }
5052 
5053 void Compile::igv_print_method_to_network(const char* phase_name) {
5054   if (_debug_network_printer == NULL) {
5055     _debug_network_printer = new IdealGraphPrinter(C);
5056   } else {
5057     _debug_network_printer->update_compiled_method(C->method());
5058   }
5059   tty->print_cr("Method printed over network stream to IGV");
5060   _debug_network_printer->print(phase_name, (Node*)C->root());
5061 }
5062 #endif
5063 
5064 void Compile::add_native_invoker(RuntimeStub* stub) {
5065   _native_invokers.append(stub);
5066 }
5067 
5068 Node* Compile::narrow_value(BasicType bt, Node* value, const Type* type, PhaseGVN* phase, bool transform_res) {
5069   if (type != NULL && phase->type(value)->higher_equal(type)) {
5070     return value;
5071   }
5072   Node* result = NULL;
5073   if (bt == T_BYTE) {
5074     result = phase->transform(new LShiftINode(value, phase->intcon(24)));
5075     result = new RShiftINode(result, phase->intcon(24));
5076   } else if (bt == T_BOOLEAN) {
5077     result = new AndINode(value, phase->intcon(0xFF));
5078   } else if (bt == T_CHAR) {
5079     result = new AndINode(value,phase->intcon(0xFFFF));
5080   } else {
5081     assert(bt == T_SHORT, "unexpected narrow type");
5082     result = phase->transform(new LShiftINode(value, phase->intcon(16)));
5083     result = new RShiftINode(result, phase->intcon(16));
5084   }
5085   if (transform_res) {
5086     result = phase->transform(result);
5087   }

 605                   _skeleton_predicate_opaqs (comp_arena(), 8, 0, NULL),
 606                   _expensive_nodes   (comp_arena(), 8, 0, NULL),
 607                   _for_post_loop_igvn(comp_arena(), 8, 0, NULL),
 608                   _coarsened_locks   (comp_arena(), 8, 0, NULL),
 609                   _congraph(NULL),
 610                   NOT_PRODUCT(_igv_printer(NULL) COMMA)
 611                   _dead_node_list(comp_arena()),
 612                   _dead_node_count(0),
 613                   _node_arena(mtCompiler),
 614                   _old_arena(mtCompiler),
 615                   _mach_constant_base_node(NULL),
 616                   _Compile_types(mtCompiler),
 617                   _initial_gvn(NULL),
 618                   _for_igvn(NULL),
 619                   _late_inlines(comp_arena(), 2, 0, NULL),
 620                   _string_late_inlines(comp_arena(), 2, 0, NULL),
 621                   _boxing_late_inlines(comp_arena(), 2, 0, NULL),
 622                   _vector_reboxing_late_inlines(comp_arena(), 2, 0, NULL),
 623                   _late_inlines_pos(0),
 624                   _number_of_mh_late_inlines(0),

 625                   _print_inlining_stream(NULL),
 626                   _print_inlining_list(NULL),
 627                   _print_inlining_idx(0),
 628                   _print_inlining_output(NULL),
 629                   _replay_inline_data(NULL),
 630                   _java_calls(0),
 631                   _inner_loops(0),
 632                   _interpreter_frame_size(0),
 633                   _output(NULL)
 634 #ifndef PRODUCT
 635                   , _in_dump_cnt(0)
 636 #endif
 637 {
 638   C = this;
 639   CompileWrapper cw(this);
 640 
 641   if (CITimeVerbose) {
 642     tty->print(" ");
 643     target->holder()->name()->print();
 644     tty->print(".");

 878     _has_method_handle_invokes(false),
 879     _clinit_barrier_on_entry(false),
 880     _stress_seed(0),
 881     _comp_arena(mtCompiler),
 882     _barrier_set_state(BarrierSet::barrier_set()->barrier_set_c2()->create_barrier_state(comp_arena())),
 883     _env(ci_env),
 884     _directive(directive),
 885     _log(ci_env->log()),
 886     _failure_reason(NULL),
 887     _congraph(NULL),
 888     NOT_PRODUCT(_igv_printer(NULL) COMMA)
 889     _dead_node_list(comp_arena()),
 890     _dead_node_count(0),
 891     _node_arena(mtCompiler),
 892     _old_arena(mtCompiler),
 893     _mach_constant_base_node(NULL),
 894     _Compile_types(mtCompiler),
 895     _initial_gvn(NULL),
 896     _for_igvn(NULL),
 897     _number_of_mh_late_inlines(0),

 898     _print_inlining_stream(NULL),
 899     _print_inlining_list(NULL),
 900     _print_inlining_idx(0),
 901     _print_inlining_output(NULL),
 902     _replay_inline_data(NULL),
 903     _java_calls(0),
 904     _inner_loops(0),
 905     _interpreter_frame_size(0),
 906     _output(NULL),
 907 #ifndef PRODUCT
 908     _in_dump_cnt(0),
 909 #endif
 910     _allowed_reasons(0) {
 911   C = this;
 912 
 913   TraceTime t1(NULL, &_t_totalCompilation, CITime, false);
 914   TraceTime t2(NULL, &_t_stubCompilation, CITime, false);
 915 
 916 #ifndef PRODUCT
 917   set_print_assembly(PrintFrameConverterAssembly);

5042   if (_debug_file_printer == NULL) {
5043     _debug_file_printer = new IdealGraphPrinter(C, file_name, append);
5044   } else {
5045     _debug_file_printer->update_compiled_method(C->method());
5046   }
5047   tty->print_cr("Method %s to %s", append ? "appended" : "printed", file_name);
5048   _debug_file_printer->print(phase_name, (Node*)C->root());
5049 }
5050 
5051 void Compile::igv_print_method_to_network(const char* phase_name) {
5052   if (_debug_network_printer == NULL) {
5053     _debug_network_printer = new IdealGraphPrinter(C);
5054   } else {
5055     _debug_network_printer->update_compiled_method(C->method());
5056   }
5057   tty->print_cr("Method printed over network stream to IGV");
5058   _debug_network_printer->print(phase_name, (Node*)C->root());
5059 }
5060 #endif
5061 




5062 Node* Compile::narrow_value(BasicType bt, Node* value, const Type* type, PhaseGVN* phase, bool transform_res) {
5063   if (type != NULL && phase->type(value)->higher_equal(type)) {
5064     return value;
5065   }
5066   Node* result = NULL;
5067   if (bt == T_BYTE) {
5068     result = phase->transform(new LShiftINode(value, phase->intcon(24)));
5069     result = new RShiftINode(result, phase->intcon(24));
5070   } else if (bt == T_BOOLEAN) {
5071     result = new AndINode(value, phase->intcon(0xFF));
5072   } else if (bt == T_CHAR) {
5073     result = new AndINode(value,phase->intcon(0xFFFF));
5074   } else {
5075     assert(bt == T_SHORT, "unexpected narrow type");
5076     result = phase->transform(new LShiftINode(value, phase->intcon(16)));
5077     result = new RShiftINode(result, phase->intcon(16));
5078   }
5079   if (transform_res) {
5080     result = phase->transform(result);
5081   }
< prev index next >