src/share/vm/c1/c1_IR.cpp

Print this page




 124 // Implementation of IRScope
 125 BlockBegin* IRScope::build_graph(Compilation* compilation, int osr_bci) {
 126   GraphBuilder gm(compilation, this);
 127   NOT_PRODUCT(if (PrintValueNumbering && Verbose) gm.print_stats());
 128   if (compilation->bailed_out()) return NULL;
 129   return gm.start();
 130 }
 131 
 132 
 133 IRScope::IRScope(Compilation* compilation, IRScope* caller, int caller_bci, ciMethod* method, int osr_bci, bool create_graph)
 134 : _callees(2)
 135 , _compilation(compilation)
 136 , _requires_phi_function(method->max_locals())
 137 {
 138   _caller             = caller;
 139   _level              = caller == NULL ?  0 : caller->level() + 1;
 140   _method             = method;
 141   _xhandlers          = new XHandlers(method);
 142   _number_of_locks    = 0;
 143   _monitor_pairing_ok = method->has_balanced_monitors();

 144   _start              = NULL;
 145 
 146   if (osr_bci == -1) {
 147     _requires_phi_function.clear();
 148   } else {
 149         // selective creation of phi functions is not possibel in osr-methods
 150     _requires_phi_function.set_range(0, method->max_locals());
 151   }
 152 
 153   assert(method->holder()->is_loaded() , "method holder must be loaded");
 154 
 155   // build graph if monitor pairing is ok
 156   if (create_graph && monitor_pairing_ok()) _start = build_graph(compilation, osr_bci);
 157 }
 158 
 159 
 160 int IRScope::max_stack() const {
 161   int my_max = method()->max_stack();
 162   int callee_max = 0;
 163   for (int i = 0; i < number_of_callees(); i++) {




 124 // Implementation of IRScope
 125 BlockBegin* IRScope::build_graph(Compilation* compilation, int osr_bci) {
 126   GraphBuilder gm(compilation, this);
 127   NOT_PRODUCT(if (PrintValueNumbering && Verbose) gm.print_stats());
 128   if (compilation->bailed_out()) return NULL;
 129   return gm.start();
 130 }
 131 
 132 
 133 IRScope::IRScope(Compilation* compilation, IRScope* caller, int caller_bci, ciMethod* method, int osr_bci, bool create_graph)
 134 : _callees(2)
 135 , _compilation(compilation)
 136 , _requires_phi_function(method->max_locals())
 137 {
 138   _caller             = caller;
 139   _level              = caller == NULL ?  0 : caller->level() + 1;
 140   _method             = method;
 141   _xhandlers          = new XHandlers(method);
 142   _number_of_locks    = 0;
 143   _monitor_pairing_ok = method->has_balanced_monitors();
 144   _wrote_final        = false;
 145   _start              = NULL;
 146 
 147   if (osr_bci == -1) {
 148     _requires_phi_function.clear();
 149   } else {
 150         // selective creation of phi functions is not possibel in osr-methods
 151     _requires_phi_function.set_range(0, method->max_locals());
 152   }
 153 
 154   assert(method->holder()->is_loaded() , "method holder must be loaded");
 155 
 156   // build graph if monitor pairing is ok
 157   if (create_graph && monitor_pairing_ok()) _start = build_graph(compilation, osr_bci);
 158 }
 159 
 160 
 161 int IRScope::max_stack() const {
 162   int my_max = method()->max_stack();
 163   int callee_max = 0;
 164   for (int i = 0; i < number_of_callees(); i++) {