Print this page
rev 7077 : 8066763: fatal error "assert(false) failed: unexpected yanked node" in postaloc.cpp:139
Summary: Check for dead input nodes after replacing compare node with implicit null check.
Reviewed-by: kvn

Split Split Close
Expand all
Collapse all
          --- old/hotspot/src/share/vm/opto/lcm.cpp
          +++ new/hotspot/src/share/vm/opto/lcm.cpp
↓ open down ↓ 429 lines elided ↑ open up ↑
 430  430    // Since schedule-local needs precise def-use info, we need to correct
 431  431    // it as well.
 432  432    Node *old_tst = proj->in(0);
 433  433    MachNode *nul_chk = new (C) MachNullCheckNode(old_tst->in(0),best,bidx);
 434  434    block->map_node(nul_chk, block->end_idx());
 435  435    map_node_to_block(nul_chk, block);
 436  436    // Redirect users of old_test to nul_chk
 437  437    for (DUIterator_Last i2min, i2 = old_tst->last_outs(i2min); i2 >= i2min; --i2)
 438  438      old_tst->last_out(i2)->set_req(0, nul_chk);
 439  439    // Clean-up any dead code
 440      -  for (uint i3 = 0; i3 < old_tst->req(); i3++)
      440 +  for (uint i3 = 0; i3 < old_tst->req(); i3++) {
      441 +    Node* in = old_tst->in(i3);
 441  442      old_tst->set_req(i3, NULL);
      443 +    if (in->outcnt() == 0) {
      444 +      // Remove dead input node
      445 +      in->disconnect_inputs(NULL, C);
      446 +      block->find_remove(in);
      447 +    }
      448 +  }
 442  449  
 443  450    latency_from_uses(nul_chk);
 444  451    latency_from_uses(best);
 445  452  }
 446  453  
 447  454  
 448  455  //------------------------------select-----------------------------------------
 449  456  // Select a nice fellow from the worklist to schedule next. If there is only
 450  457  // one choice, then use it. Projections take top priority for correctness
 451  458  // reasons - if I see a projection, then it is next.  There are a number of
↓ open down ↓ 710 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX