src/share/vm/c1/c1_GraphBuilder.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8130832-review Sdiff src/share/vm/c1

src/share/vm/c1/c1_GraphBuilder.hpp

Print this page
rev 8688 : 1234567: Invalid bug number
Summary: This is a local commit to reduce jprt submit time.
Reviewed-by: kvn


 322     set_inline_cleanup_info(_block, _last, _state);
 323   }
 324   BlockBegin*  inline_cleanup_block() const              { return scope_data()->inline_cleanup_block();  }
 325   Instruction* inline_cleanup_return_prev() const        { return scope_data()->inline_cleanup_return_prev(); }
 326   ValueStack*  inline_cleanup_state() const              { return scope_data()->inline_cleanup_state();  }
 327   void restore_inline_cleanup_info() {
 328     _block = inline_cleanup_block();
 329     _last  = inline_cleanup_return_prev();
 330     _state = inline_cleanup_state();
 331   }
 332   void incr_num_returns()                                { scope_data()->incr_num_returns();             }
 333   int  num_returns() const                               { return scope_data()->num_returns();           }
 334   intx max_inline_size() const                           { return scope_data()->max_inline_size();       }
 335   int  inline_level() const                              { return scope()->level();                      }
 336   int  recursive_inline_level(ciMethod* callee) const;
 337 
 338   // inlining of synchronized methods
 339   void inline_sync_entry(Value lock, BlockBegin* sync_handler);
 340   void fill_sync_handler(Value lock, BlockBegin* sync_handler, bool default_handler = false);
 341 




 342   // inliners
 343   bool try_inline(           ciMethod* callee, bool holder_known, Bytecodes::Code bc = Bytecodes::_illegal, Value receiver = NULL);
 344   bool try_inline_intrinsics(ciMethod* callee);
 345   bool try_inline_full(      ciMethod* callee, bool holder_known, Bytecodes::Code bc = Bytecodes::_illegal, Value receiver = NULL);
 346   bool try_inline_jsr(int jsr_dest_bci);
 347 
 348   const char* check_can_parse(ciMethod* callee) const;
 349   const char* should_not_inline(ciMethod* callee) const;
 350 
 351   // JSR 292 support
 352   bool try_method_handle_inline(ciMethod* callee);
 353 
 354   // helpers
 355   void inline_bailout(const char* msg);
 356   BlockBegin* header_block(BlockBegin* entry, BlockBegin::Flag f, ValueStack* state);
 357   BlockBegin* setup_start_block(int osr_bci, BlockBegin* std_entry, BlockBegin* osr_entry, ValueStack* init_state);
 358   void setup_osr_entry_block();
 359   void clear_inline_bailout();
 360   ValueStack* state_at_entry();
 361   void push_root_scope(IRScope* scope, BlockList* bci2block, BlockBegin* start);
 362   void push_scope(ciMethod* callee, BlockBegin* continuation);
 363   void push_scope_for_jsr(BlockBegin* jsr_continuation, int jsr_dest_bci);
 364   void pop_scope();
 365   void pop_scope_for_jsr();
 366 
 367   bool append_unsafe_get_obj(ciMethod* callee, BasicType t, bool is_volatile);
 368   bool append_unsafe_put_obj(ciMethod* callee, BasicType t, bool is_volatile);
 369   bool append_unsafe_get_raw(ciMethod* callee, BasicType t);
 370   bool append_unsafe_put_raw(ciMethod* callee, BasicType t);
 371   void append_unsafe_CAS(ciMethod* callee);
 372   bool append_unsafe_get_and_set_obj(ciMethod* callee, bool is_add);
 373 
 374   void print_inlining(ciMethod* callee, const char* msg = NULL, bool success = true);
 375 
 376   void profile_call(ciMethod* callee, Value recv, ciKlass* predicted_holder, Values* obj_args, bool inlined);
 377   void profile_return_type(Value ret, ciMethod* callee, ciMethod* m = NULL, int bci = -1);
 378   void profile_invocation(ciMethod* inlinee, ValueStack* state);
 379 
 380   // Shortcuts to profiling control.
 381   bool is_profiling()          { return _compilation->is_profiling();          }
 382   bool count_invocations()     { return _compilation->count_invocations();     }
 383   bool count_backedges()       { return _compilation->count_backedges();       }
 384   bool profile_branches()      { return _compilation->profile_branches();      }
 385   bool profile_calls()         { return _compilation->profile_calls();         }
 386   bool profile_inlined_calls() { return _compilation->profile_inlined_calls(); }
 387   bool profile_checkcasts()    { return _compilation->profile_checkcasts();    }
 388   bool profile_parameters()    { return _compilation->profile_parameters();    }
 389   bool profile_arguments()     { return _compilation->profile_arguments();     }
 390   bool profile_return()        { return _compilation->profile_return();        }
 391 
 392   Values* args_list_for_profiling(ciMethod* target, int& start, bool may_have_receiver);


 395 
 396  public:
 397   NOT_PRODUCT(void print_stats();)
 398 
 399   // initialization
 400   static void initialize();
 401 
 402   // public
 403   static bool can_trap(ciMethod* method, Bytecodes::Code code) {
 404     assert(0 <= code && code < Bytecodes::number_of_java_codes, "illegal bytecode");
 405     if (_can_trap[code]) return true;
 406     // special handling for finalizer registration
 407     return code == Bytecodes::_return && method->intrinsic_id() == vmIntrinsics::_Object_init;
 408   }
 409 
 410   // creation
 411   GraphBuilder(Compilation* compilation, IRScope* scope);
 412   static void sort_top_into_worklist(BlockList* worklist, BlockBegin* top);
 413 
 414   BlockBegin* start() const                      { return _start; }


 415 };
 416 
 417 #endif // SHARE_VM_C1_C1_GRAPHBUILDER_HPP


 322     set_inline_cleanup_info(_block, _last, _state);
 323   }
 324   BlockBegin*  inline_cleanup_block() const              { return scope_data()->inline_cleanup_block();  }
 325   Instruction* inline_cleanup_return_prev() const        { return scope_data()->inline_cleanup_return_prev(); }
 326   ValueStack*  inline_cleanup_state() const              { return scope_data()->inline_cleanup_state();  }
 327   void restore_inline_cleanup_info() {
 328     _block = inline_cleanup_block();
 329     _last  = inline_cleanup_return_prev();
 330     _state = inline_cleanup_state();
 331   }
 332   void incr_num_returns()                                { scope_data()->incr_num_returns();             }
 333   int  num_returns() const                               { return scope_data()->num_returns();           }
 334   intx max_inline_size() const                           { return scope_data()->max_inline_size();       }
 335   int  inline_level() const                              { return scope()->level();                      }
 336   int  recursive_inline_level(ciMethod* callee) const;
 337 
 338   // inlining of synchronized methods
 339   void inline_sync_entry(Value lock, BlockBegin* sync_handler);
 340   void fill_sync_handler(Value lock, BlockBegin* sync_handler, bool default_handler = false);
 341 
 342   static bool intrinsic_preserves_state(vmIntrinsics::ID id);
 343   static bool intrinsic_can_trap(vmIntrinsics::ID id);
 344   void build_graph_for_intrinsic(ciMethod* callee);
 345 
 346   // inliners
 347   bool try_inline(           ciMethod* callee, bool holder_known, Bytecodes::Code bc = Bytecodes::_illegal, Value receiver = NULL);
 348   bool try_inline_intrinsics(ciMethod* callee);
 349   bool try_inline_full(      ciMethod* callee, bool holder_known, Bytecodes::Code bc = Bytecodes::_illegal, Value receiver = NULL);
 350   bool try_inline_jsr(int jsr_dest_bci);
 351 
 352   const char* check_can_parse(ciMethod* callee) const;
 353   const char* should_not_inline(ciMethod* callee) const;
 354 
 355   // JSR 292 support
 356   bool try_method_handle_inline(ciMethod* callee);
 357 
 358   // helpers
 359   void inline_bailout(const char* msg);
 360   BlockBegin* header_block(BlockBegin* entry, BlockBegin::Flag f, ValueStack* state);
 361   BlockBegin* setup_start_block(int osr_bci, BlockBegin* std_entry, BlockBegin* osr_entry, ValueStack* init_state);
 362   void setup_osr_entry_block();
 363   void clear_inline_bailout();
 364   ValueStack* state_at_entry();
 365   void push_root_scope(IRScope* scope, BlockList* bci2block, BlockBegin* start);
 366   void push_scope(ciMethod* callee, BlockBegin* continuation);
 367   void push_scope_for_jsr(BlockBegin* jsr_continuation, int jsr_dest_bci);
 368   void pop_scope();
 369   void pop_scope_for_jsr();
 370 
 371   void append_unsafe_get_obj(ciMethod* callee, BasicType t, bool is_volatile);
 372   void append_unsafe_put_obj(ciMethod* callee, BasicType t, bool is_volatile);
 373   void append_unsafe_get_raw(ciMethod* callee, BasicType t);
 374   void append_unsafe_put_raw(ciMethod* callee, BasicType t);
 375   void append_unsafe_CAS(ciMethod* callee);
 376   void append_unsafe_get_and_set_obj(ciMethod* callee, bool is_add);
 377 
 378   void print_inlining(ciMethod* callee, const char* msg = NULL, bool success = true);
 379 
 380   void profile_call(ciMethod* callee, Value recv, ciKlass* predicted_holder, Values* obj_args, bool inlined);
 381   void profile_return_type(Value ret, ciMethod* callee, ciMethod* m = NULL, int bci = -1);
 382   void profile_invocation(ciMethod* inlinee, ValueStack* state);
 383 
 384   // Shortcuts to profiling control.
 385   bool is_profiling()          { return _compilation->is_profiling();          }
 386   bool count_invocations()     { return _compilation->count_invocations();     }
 387   bool count_backedges()       { return _compilation->count_backedges();       }
 388   bool profile_branches()      { return _compilation->profile_branches();      }
 389   bool profile_calls()         { return _compilation->profile_calls();         }
 390   bool profile_inlined_calls() { return _compilation->profile_inlined_calls(); }
 391   bool profile_checkcasts()    { return _compilation->profile_checkcasts();    }
 392   bool profile_parameters()    { return _compilation->profile_parameters();    }
 393   bool profile_arguments()     { return _compilation->profile_arguments();     }
 394   bool profile_return()        { return _compilation->profile_return();        }
 395 
 396   Values* args_list_for_profiling(ciMethod* target, int& start, bool may_have_receiver);


 399 
 400  public:
 401   NOT_PRODUCT(void print_stats();)
 402 
 403   // initialization
 404   static void initialize();
 405 
 406   // public
 407   static bool can_trap(ciMethod* method, Bytecodes::Code code) {
 408     assert(0 <= code && code < Bytecodes::number_of_java_codes, "illegal bytecode");
 409     if (_can_trap[code]) return true;
 410     // special handling for finalizer registration
 411     return code == Bytecodes::_return && method->intrinsic_id() == vmIntrinsics::_Object_init;
 412   }
 413 
 414   // creation
 415   GraphBuilder(Compilation* compilation, IRScope* scope);
 416   static void sort_top_into_worklist(BlockList* worklist, BlockBegin* top);
 417 
 418   BlockBegin* start() const                      { return _start; }
 419 
 420   static bool is_intrinsic_available_for(Method* method);
 421 };
 422 
 423 #endif // SHARE_VM_C1_C1_GRAPHBUILDER_HPP
src/share/vm/c1/c1_GraphBuilder.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File