src/share/vm/opto/stringopts.cpp
Print this page
rev 3904 : 8005071: Incremental inlining for JSR 292
Summary: post parse inlining driven by number of live nodes.
Reviewed-by:
*** 263,273 ****
eliminate_call(n->as_Call());
}
} else if (n->is_IfTrue()) {
Compile* C = _stringopts->C;
C->gvn_replace_by(n, n->in(0)->in(0));
! C->gvn_replace_by(n->in(0), C->top());
}
}
}
--- 263,274 ----
eliminate_call(n->as_Call());
}
} else if (n->is_IfTrue()) {
Compile* C = _stringopts->C;
C->gvn_replace_by(n, n->in(0)->in(0));
! // get rid of the other projection
! C->gvn_replace_by(n->in(0)->as_If()->proj_out(false), C->top());
}
}
}
*** 437,447 ****
if (alloc == NULL) {
break;
}
// Find the constructor call
Node* result = alloc->result_cast();
! if (result == NULL || !result->is_CheckCastPP()) {
// strange looking allocation
#ifndef PRODUCT
if (PrintOptimizeStringConcat) {
tty->print("giving up because allocation looks strange ");
alloc->jvms()->dump_spec(tty); tty->cr();
--- 438,448 ----
if (alloc == NULL) {
break;
}
// Find the constructor call
Node* result = alloc->result_cast();
! if (result == NULL || !result->is_CheckCastPP() || alloc->in(TypeFunc::Memory)->is_top()) {
// strange looking allocation
#ifndef PRODUCT
if (PrintOptimizeStringConcat) {
tty->print("giving up because allocation looks strange ");
alloc->jvms()->dump_spec(tty); tty->cr();
*** 832,841 ****
--- 833,845 ----
ptr->in(2) != NULL && ptr->in(2)->is_Proj() &&
ptr->in(1)->in(0) == ptr->in(2)->in(0) &&
ptr->in(1)->in(0) != NULL && ptr->in(1)->in(0)->is_If()) {
// Simple diamond.
// XXX should check for possibly merging stores. simple data merges are ok.
+ // The IGVN will make this simple diamond go away when it
+ // transforms the Region. Make sure it sees it.
+ Compile::current()->record_for_igvn(ptr);
ptr = ptr->in(1)->in(0)->in(0);
continue;
}
#ifndef PRODUCT
if (PrintOptimizeStringConcat) {