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