src/share/vm/opto/node.cpp

changeset 4589
8b3da8d14c93
parent 4478
a7114d3d712e
child 4657
6931f425c517
     1.1 --- a/src/share/vm/opto/node.cpp	Mon Feb 11 14:47:04 2013 -0800
     1.2 +++ b/src/share/vm/opto/node.cpp	Tue Feb 12 12:56:11 2013 +0100
     1.3 @@ -493,6 +493,8 @@
     1.4    }
     1.5    if (is_macro())
     1.6      compile->add_macro_node(n);
     1.7 +  if (is_expensive())
     1.8 +    compile->add_expensive_node(n);
     1.9  
    1.10    n->set_idx(compile->next_unique()); // Get new unique index as well
    1.11    debug_only( n->verify_construction() );
    1.12 @@ -616,6 +618,9 @@
    1.13    if (is_macro()) {
    1.14      compile->remove_macro_node(this);
    1.15    }
    1.16 +  if (is_expensive()) {
    1.17 +    compile->remove_expensive_node(this);
    1.18 +  }
    1.19  #ifdef ASSERT
    1.20    // We will not actually delete the storage, but we'll make the node unusable.
    1.21    *(address*)this = badAddress;  // smash the C++ vtbl, probably
    1.22 @@ -689,6 +694,13 @@
    1.23  }
    1.24  #endif
    1.25  
    1.26 +
    1.27 +//------------------------------is_unreachable---------------------------------
    1.28 +bool Node::is_unreachable(PhaseIterGVN &igvn) const {
    1.29 +  assert(!is_Mach(), "doesn't work with MachNodes");
    1.30 +  return outcnt() == 0 || igvn.type(this) == Type::TOP || in(0)->is_top();
    1.31 +}
    1.32 +
    1.33  //------------------------------add_req----------------------------------------
    1.34  // Add a new required input at the end
    1.35  void Node::add_req( Node *n ) {
    1.36 @@ -1246,6 +1258,9 @@
    1.37        if (dead->is_macro()) {
    1.38          igvn->C->remove_macro_node(dead);
    1.39        }
    1.40 +      if (dead->is_expensive()) {
    1.41 +        igvn->C->remove_expensive_node(dead);
    1.42 +      }
    1.43        // Kill all inputs to the dead guy
    1.44        for (uint i=0; i < dead->req(); i++) {
    1.45          Node *n = dead->in(i);      // Get input to dead guy

mercurial