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 bool append_unsafe_prefetch(ciMethod* callee, bool is_store, bool is_static);
372 void append_unsafe_CAS(ciMethod* callee);
373 bool append_unsafe_get_and_set_obj(ciMethod* callee, bool is_add);
374
375 void print_inlining(ciMethod* callee, const char* msg = NULL, bool success = true);
376
377 void profile_call(ciMethod* callee, Value recv, ciKlass* predicted_holder);
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
389 public:
390 NOT_PRODUCT(void print_stats();)
391
392 // initialization
393 static void initialize();
394
395 // public
396 static bool can_trap(ciMethod* method, Bytecodes::Code code) {
397 assert(0 <= code && code < Bytecodes::number_of_java_codes, "illegal bytecode");
398 if (_can_trap[code]) return true;
399 // special handling for finalizer registration
400 return code == Bytecodes::_return && method->intrinsic_id() == vmIntrinsics::_Object_init;
401 }
402
403 // creation
404 GraphBuilder(Compilation* compilation, IRScope* scope);
405 static void sort_top_into_worklist(BlockList* worklist, BlockBegin* top);
406
407 BlockBegin* start() const { return _start; }
|
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 bool append_unsafe_prefetch(ciMethod* callee, bool is_store, bool is_static);
372 void append_unsafe_CAS(ciMethod* callee);
373 bool append_unsafe_get_and_set_obj(ciMethod* callee, bool is_add);
374
375 void print_inlining(ciMethod* callee, const char* msg = NULL, bool success = true);
376
377 void profile_call(ciMethod* callee, Value recv, ciKlass* predicted_holder, Values* obj_args, bool inlined);
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
389 Values* args_list_for_profiling(int& start, bool may_have_receiver);
390 Values* collect_args_for_profiling(Values* args, bool may_have_receiver);
391
392 public:
393 NOT_PRODUCT(void print_stats();)
394
395 // initialization
396 static void initialize();
397
398 // public
399 static bool can_trap(ciMethod* method, Bytecodes::Code code) {
400 assert(0 <= code && code < Bytecodes::number_of_java_codes, "illegal bytecode");
401 if (_can_trap[code]) return true;
402 // special handling for finalizer registration
403 return code == Bytecodes::_return && method->intrinsic_id() == vmIntrinsics::_Object_init;
404 }
405
406 // creation
407 GraphBuilder(Compilation* compilation, IRScope* scope);
408 static void sort_top_into_worklist(BlockList* worklist, BlockBegin* top);
409
410 BlockBegin* start() const { return _start; }
|