7079673: JSR 292: C1 should inline bytecoded method handle adapters

Reviewed-by: never
This commit is contained in:
Christian Thalinger 2011-09-01 01:31:25 -07:00
parent fa7c124af1
commit fcc2a86582
9 changed files with 241 additions and 78 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -315,9 +315,17 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC {
ValueStack* return_state) { scope_data()->set_inline_cleanup_info(block,
return_prev,
return_state); }
void set_inline_cleanup_info() {
set_inline_cleanup_info(_block, _last, _state);
}
BlockBegin* inline_cleanup_block() const { return scope_data()->inline_cleanup_block(); }
Instruction* inline_cleanup_return_prev() const { return scope_data()->inline_cleanup_return_prev(); }
ValueStack* inline_cleanup_state() const { return scope_data()->inline_cleanup_state(); }
void restore_inline_cleanup_info() {
_block = inline_cleanup_block();
_last = inline_cleanup_return_prev();
_state = inline_cleanup_state();
}
void incr_num_returns() { scope_data()->incr_num_returns(); }
int num_returns() const { return scope_data()->num_returns(); }
intx max_inline_size() const { return scope_data()->max_inline_size(); }
@ -329,11 +337,15 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC {
void fill_sync_handler(Value lock, BlockBegin* sync_handler, bool default_handler = false);
// inliners
bool try_inline(ciMethod* callee, bool holder_known);
bool try_inline( ciMethod* callee, bool holder_known);
bool try_inline_intrinsics(ciMethod* callee);
bool try_inline_full (ciMethod* callee, bool holder_known);
bool try_inline_full( ciMethod* callee, bool holder_known, BlockBegin* cont_block = NULL);
bool try_inline_jsr(int jsr_dest_bci);
// JSR 292 support
bool for_method_handle_inline(ciMethod* callee);
bool for_invokedynamic_inline(ciMethod* callee);
// helpers
void inline_bailout(const char* msg);
BlockBegin* header_block(BlockBegin* entry, BlockBegin::Flag f, ValueStack* state);