src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8039298 Sdiff src/share/vm/opto

src/share/vm/opto/compile.cpp

Print this page




 687   }
 688   TraceTime t1("Total compilation time", &_t_totalCompilation, TimeCompiler, TimeCompiler2);
 689   TraceTime t2(NULL, &_t_methodCompilation, TimeCompiler, false);
 690   bool print_opto_assembly = PrintOptoAssembly || _method->has_option("PrintOptoAssembly");
 691   if (!print_opto_assembly) {
 692     bool print_assembly = (PrintAssembly || _method->should_print_assembly());
 693     if (print_assembly && !Disassembler::can_decode()) {
 694       tty->print_cr("PrintAssembly request changed to PrintOptoAssembly");
 695       print_opto_assembly = true;
 696     }
 697   }
 698   set_print_assembly(print_opto_assembly);
 699   set_parsed_irreducible_loop(false);
 700 
 701   if (method()->has_option("ReplayInline")) {
 702     _replay_inline_data = ciReplay::load_inline_data(method(), entry_bci(), ci_env->comp_level());
 703   }
 704 #endif
 705   set_print_inlining(PrintInlining || method()->has_option("PrintInlining") NOT_PRODUCT( || PrintOptoInlining));
 706   set_print_intrinsics(PrintIntrinsics || method()->has_option("PrintIntrinsics"));

 707 
 708   if (ProfileTraps RTM_OPT_ONLY( || UseRTMLocking )) {
 709     // Make sure the method being compiled gets its own MDO,
 710     // so we can at least track the decompile_count().
 711     // Need MDO to record RTM code generation state.
 712     method()->ensure_method_data();
 713   }
 714 
 715   Init(::AliasLevel);
 716 
 717 
 718   print_compile_messages();
 719 
 720   _ilt = InlineTree::build_inline_tree_root();
 721 
 722   // Even if NO memory addresses are used, MergeMem nodes must have at least 1 slice
 723   assert(num_alias_types() >= AliasIdxRaw, "");
 724 
 725 #define MINIMUM_NODE_HASH  1023
 726   // Node list that Iterative GVN will start with


 971     _dead_node_count(0),
 972     _congraph(NULL),
 973     _replay_inline_data(NULL),
 974     _number_of_mh_late_inlines(0),
 975     _inlining_progress(false),
 976     _inlining_incrementally(false),
 977     _print_inlining_list(NULL),
 978     _print_inlining_stream(NULL),
 979     _print_inlining_idx(0),
 980     _preserve_jvm_state(0),
 981     _allowed_reasons(0),
 982     _interpreter_frame_size(0) {
 983   C = this;
 984 
 985 #ifndef PRODUCT
 986   TraceTime t1(NULL, &_t_totalCompilation, TimeCompiler, false);
 987   TraceTime t2(NULL, &_t_stubCompilation, TimeCompiler, false);
 988   set_print_assembly(PrintFrameConverterAssembly);
 989   set_parsed_irreducible_loop(false);
 990 #endif


 991   CompileWrapper cw(this);
 992   Init(/*AliasLevel=*/ 0);
 993   init_tf((*generator)());
 994 
 995   {
 996     // The following is a dummy for the sake of GraphKit::gen_stub
 997     Unique_Node_List for_igvn(comp_arena());
 998     set_for_igvn(&for_igvn);  // not used, but some GraphKit guys push on this
 999     PhaseGVN gvn(Thread::current()->resource_area(),255);
1000     set_initial_gvn(&gvn);    // not significant, but GraphKit guys use it pervasively
1001     gvn.transform_no_reclaim(top());
1002 
1003     GraphKit kit;
1004     kit.gen_stub(stub_function, stub_name, is_fancy_jump, pass_tls, return_pc);
1005   }
1006 
1007   NOT_PRODUCT( verify_graph_edges(); )
1008   Code_Gen();
1009   if (failing())  return;
1010 


1141   _predicate_opaqs = new(comp_arena()) GrowableArray<Node*>(comp_arena(), 8,  0, NULL);
1142   _expensive_nodes = new(comp_arena()) GrowableArray<Node*>(comp_arena(), 8,  0, NULL);
1143   register_library_intrinsics();
1144 }
1145 
1146 //---------------------------init_start----------------------------------------
1147 // Install the StartNode on this compile object.
1148 void Compile::init_start(StartNode* s) {
1149   if (failing())
1150     return; // already failing
1151   assert(s == start(), "");
1152 }
1153 
1154 StartNode* Compile::start() const {
1155   assert(!failing(), "");
1156   for (DUIterator_Fast imax, i = root()->fast_outs(imax); i < imax; i++) {
1157     Node* start = root()->fast_out(i);
1158     if( start->is_Start() )
1159       return start->as_Start();
1160   }
1161   ShouldNotReachHere();
1162   return NULL;
1163 }
1164 
1165 //-------------------------------immutable_memory-------------------------------------
1166 // Access immutable memory
1167 Node* Compile::immutable_memory() {
1168   if (_immutable_memory != NULL) {
1169     return _immutable_memory;
1170   }
1171   StartNode* s = start();
1172   for (DUIterator_Fast imax, i = s->fast_outs(imax); true; i++) {
1173     Node *p = s->fast_out(i);
1174     if (p != s && p->as_Proj()->_con == TypeFunc::Memory) {
1175       _immutable_memory = p;
1176       return _immutable_memory;
1177     }
1178   }
1179   ShouldNotReachHere();
1180   return NULL;
1181 }




 687   }
 688   TraceTime t1("Total compilation time", &_t_totalCompilation, TimeCompiler, TimeCompiler2);
 689   TraceTime t2(NULL, &_t_methodCompilation, TimeCompiler, false);
 690   bool print_opto_assembly = PrintOptoAssembly || _method->has_option("PrintOptoAssembly");
 691   if (!print_opto_assembly) {
 692     bool print_assembly = (PrintAssembly || _method->should_print_assembly());
 693     if (print_assembly && !Disassembler::can_decode()) {
 694       tty->print_cr("PrintAssembly request changed to PrintOptoAssembly");
 695       print_opto_assembly = true;
 696     }
 697   }
 698   set_print_assembly(print_opto_assembly);
 699   set_parsed_irreducible_loop(false);
 700 
 701   if (method()->has_option("ReplayInline")) {
 702     _replay_inline_data = ciReplay::load_inline_data(method(), entry_bci(), ci_env->comp_level());
 703   }
 704 #endif
 705   set_print_inlining(PrintInlining || method()->has_option("PrintInlining") NOT_PRODUCT( || PrintOptoInlining));
 706   set_print_intrinsics(PrintIntrinsics || method()->has_option("PrintIntrinsics"));
 707   set_has_irreducible_loop(true); // conservative until build_loop_tree() reset it
 708 
 709   if (ProfileTraps RTM_OPT_ONLY( || UseRTMLocking )) {
 710     // Make sure the method being compiled gets its own MDO,
 711     // so we can at least track the decompile_count().
 712     // Need MDO to record RTM code generation state.
 713     method()->ensure_method_data();
 714   }
 715 
 716   Init(::AliasLevel);
 717 
 718 
 719   print_compile_messages();
 720 
 721   _ilt = InlineTree::build_inline_tree_root();
 722 
 723   // Even if NO memory addresses are used, MergeMem nodes must have at least 1 slice
 724   assert(num_alias_types() >= AliasIdxRaw, "");
 725 
 726 #define MINIMUM_NODE_HASH  1023
 727   // Node list that Iterative GVN will start with


 972     _dead_node_count(0),
 973     _congraph(NULL),
 974     _replay_inline_data(NULL),
 975     _number_of_mh_late_inlines(0),
 976     _inlining_progress(false),
 977     _inlining_incrementally(false),
 978     _print_inlining_list(NULL),
 979     _print_inlining_stream(NULL),
 980     _print_inlining_idx(0),
 981     _preserve_jvm_state(0),
 982     _allowed_reasons(0),
 983     _interpreter_frame_size(0) {
 984   C = this;
 985 
 986 #ifndef PRODUCT
 987   TraceTime t1(NULL, &_t_totalCompilation, TimeCompiler, false);
 988   TraceTime t2(NULL, &_t_stubCompilation, TimeCompiler, false);
 989   set_print_assembly(PrintFrameConverterAssembly);
 990   set_parsed_irreducible_loop(false);
 991 #endif
 992   set_has_irreducible_loop(false); // no loops
 993 
 994   CompileWrapper cw(this);
 995   Init(/*AliasLevel=*/ 0);
 996   init_tf((*generator)());
 997 
 998   {
 999     // The following is a dummy for the sake of GraphKit::gen_stub
1000     Unique_Node_List for_igvn(comp_arena());
1001     set_for_igvn(&for_igvn);  // not used, but some GraphKit guys push on this
1002     PhaseGVN gvn(Thread::current()->resource_area(),255);
1003     set_initial_gvn(&gvn);    // not significant, but GraphKit guys use it pervasively
1004     gvn.transform_no_reclaim(top());
1005 
1006     GraphKit kit;
1007     kit.gen_stub(stub_function, stub_name, is_fancy_jump, pass_tls, return_pc);
1008   }
1009 
1010   NOT_PRODUCT( verify_graph_edges(); )
1011   Code_Gen();
1012   if (failing())  return;
1013 


1144   _predicate_opaqs = new(comp_arena()) GrowableArray<Node*>(comp_arena(), 8,  0, NULL);
1145   _expensive_nodes = new(comp_arena()) GrowableArray<Node*>(comp_arena(), 8,  0, NULL);
1146   register_library_intrinsics();
1147 }
1148 
1149 //---------------------------init_start----------------------------------------
1150 // Install the StartNode on this compile object.
1151 void Compile::init_start(StartNode* s) {
1152   if (failing())
1153     return; // already failing
1154   assert(s == start(), "");
1155 }
1156 
1157 StartNode* Compile::start() const {
1158   assert(!failing(), "");
1159   for (DUIterator_Fast imax, i = root()->fast_outs(imax); i < imax; i++) {
1160     Node* start = root()->fast_out(i);
1161     if( start->is_Start() )
1162       return start->as_Start();
1163   }
1164   fatal("Did not find Start node!");
1165   return NULL;
1166 }
1167 
1168 //-------------------------------immutable_memory-------------------------------------
1169 // Access immutable memory
1170 Node* Compile::immutable_memory() {
1171   if (_immutable_memory != NULL) {
1172     return _immutable_memory;
1173   }
1174   StartNode* s = start();
1175   for (DUIterator_Fast imax, i = s->fast_outs(imax); true; i++) {
1176     Node *p = s->fast_out(i);
1177     if (p != s && p->as_Proj()->_con == TypeFunc::Memory) {
1178       _immutable_memory = p;
1179       return _immutable_memory;
1180     }
1181   }
1182   ShouldNotReachHere();
1183   return NULL;
1184 }


src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File