7197327: 40% regression on 8 b41 comp 8 b40 on specjvm2008.mpegaudio on oob

Add support for expensive nodes.

Reviewed-by: kvn
This commit is contained in:
Roland Westrelin 2013-02-12 12:56:11 +01:00
parent 527b0d661a
commit c401bf065d
10 changed files with 456 additions and 25 deletions

View file

@ -493,6 +493,8 @@ Node *Node::clone() const {
}
if (is_macro())
compile->add_macro_node(n);
if (is_expensive())
compile->add_expensive_node(n);
n->set_idx(compile->next_unique()); // Get new unique index as well
debug_only( n->verify_construction() );
@ -616,6 +618,9 @@ void Node::destruct() {
if (is_macro()) {
compile->remove_macro_node(this);
}
if (is_expensive()) {
compile->remove_expensive_node(this);
}
#ifdef ASSERT
// We will not actually delete the storage, but we'll make the node unusable.
*(address*)this = badAddress; // smash the C++ vtbl, probably
@ -689,6 +694,13 @@ bool Node::is_dead() const {
}
#endif
//------------------------------is_unreachable---------------------------------
bool Node::is_unreachable(PhaseIterGVN &igvn) const {
assert(!is_Mach(), "doesn't work with MachNodes");
return outcnt() == 0 || igvn.type(this) == Type::TOP || in(0)->is_top();
}
//------------------------------add_req----------------------------------------
// Add a new required input at the end
void Node::add_req( Node *n ) {
@ -1246,6 +1258,9 @@ static void kill_dead_code( Node *dead, PhaseIterGVN *igvn ) {
if (dead->is_macro()) {
igvn->C->remove_macro_node(dead);
}
if (dead->is_expensive()) {
igvn->C->remove_expensive_node(dead);
}
// Kill all inputs to the dead guy
for (uint i=0; i < dead->req(); i++) {
Node *n = dead->in(i); // Get input to dead guy