mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
8005031: Some cleanup in c2 to prepare for incremental inlining support
Collection of small changes to prepare for incremental inlining. Reviewed-by: twisti, kvn
This commit is contained in:
parent
fb74718339
commit
b1c3e5ccc6
14 changed files with 221 additions and 96 deletions
|
@ -274,6 +274,9 @@ class LateInlineCallGenerator : public DirectCallGenerator {
|
|||
virtual void do_late_inline();
|
||||
|
||||
virtual JVMState* generate(JVMState* jvms) {
|
||||
Compile *C = Compile::current();
|
||||
C->print_inlining_skip(this);
|
||||
|
||||
// Record that this call site should be revisited once the main
|
||||
// parse is finished.
|
||||
Compile::current()->add_late_inline(this);
|
||||
|
@ -284,7 +287,6 @@ class LateInlineCallGenerator : public DirectCallGenerator {
|
|||
// as is done for allocations and macro expansion.
|
||||
return DirectCallGenerator::generate(jvms);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -307,7 +309,9 @@ void LateInlineCallGenerator::do_late_inline() {
|
|||
|
||||
// Make sure the state is a MergeMem for parsing.
|
||||
if (!map->in(TypeFunc::Memory)->is_MergeMem()) {
|
||||
map->set_req(TypeFunc::Memory, MergeMemNode::make(C, map->in(TypeFunc::Memory)));
|
||||
Node* mem = MergeMemNode::make(C, map->in(TypeFunc::Memory));
|
||||
C->initial_gvn()->set_type_bottom(mem);
|
||||
map->set_req(TypeFunc::Memory, mem);
|
||||
}
|
||||
|
||||
// Make enough space for the expression stack and transfer the incoming arguments
|
||||
|
@ -320,6 +324,8 @@ void LateInlineCallGenerator::do_late_inline() {
|
|||
}
|
||||
}
|
||||
|
||||
C->print_inlining_insert(this);
|
||||
|
||||
CompileLog* log = C->log();
|
||||
if (log != NULL) {
|
||||
log->head("late_inline method='%d'", log->identify(method()));
|
||||
|
@ -608,7 +614,7 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod*
|
|||
if (cg != NULL && cg->is_inline())
|
||||
return cg;
|
||||
} else {
|
||||
if (PrintInlining) CompileTask::print_inlining(callee, jvms->depth() - 1, jvms->bci(), "receiver not constant");
|
||||
if (PrintInlining) C->print_inlining(callee, jvms->depth() - 1, jvms->bci(), "receiver not constant");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue