3394 assert(rs < BitsPerInt, "recode bit map");
3395 if (!too_many_traps((Deoptimization::DeoptReason) rs)) {
3396 _allowed_reasons |= nth_bit(rs);
3397 }
3398 }
3399 }
3400 }
3401
3402 #ifndef PRODUCT
3403 //------------------------------verify_graph_edges---------------------------
3404 // Walk the Graph and verify that there is a one-to-one correspondence
3405 // between Use-Def edges and Def-Use edges in the graph.
3406 void Compile::verify_graph_edges(bool no_dead_code) {
3407 if (VerifyGraphEdges) {
3408 ResourceArea *area = Thread::current()->resource_area();
3409 Unique_Node_List visited(area);
3410 // Call recursive graph walk to check edges
3411 _root->verify_edges(visited);
3412 if (no_dead_code) {
3413 // Now make sure that no visited node is used by an unvisited node.
3414 bool dead_nodes = 0;
3415 Unique_Node_List checked(area);
3416 while (visited.size() > 0) {
3417 Node* n = visited.pop();
3418 checked.push(n);
3419 for (uint i = 0; i < n->outcnt(); i++) {
3420 Node* use = n->raw_out(i);
3421 if (checked.member(use)) continue; // already checked
3422 if (visited.member(use)) continue; // already in the graph
3423 if (use->is_Con()) continue; // a dead ConNode is OK
3424 // At this point, we have found a dead node which is DU-reachable.
3425 if (dead_nodes++ == 0)
3426 tty->print_cr("*** Dead nodes reachable via DU edges:");
3427 use->dump(2);
3428 tty->print_cr("---");
3429 checked.push(use); // No repeats; pretend it is now checked.
3430 }
3431 }
3432 assert(dead_nodes == 0, "using nodes must be reachable from root");
3433 }
3434 }
|
3394 assert(rs < BitsPerInt, "recode bit map");
3395 if (!too_many_traps((Deoptimization::DeoptReason) rs)) {
3396 _allowed_reasons |= nth_bit(rs);
3397 }
3398 }
3399 }
3400 }
3401
3402 #ifndef PRODUCT
3403 //------------------------------verify_graph_edges---------------------------
3404 // Walk the Graph and verify that there is a one-to-one correspondence
3405 // between Use-Def edges and Def-Use edges in the graph.
3406 void Compile::verify_graph_edges(bool no_dead_code) {
3407 if (VerifyGraphEdges) {
3408 ResourceArea *area = Thread::current()->resource_area();
3409 Unique_Node_List visited(area);
3410 // Call recursive graph walk to check edges
3411 _root->verify_edges(visited);
3412 if (no_dead_code) {
3413 // Now make sure that no visited node is used by an unvisited node.
3414 int dead_nodes = 0;
3415 Unique_Node_List checked(area);
3416 while (visited.size() > 0) {
3417 Node* n = visited.pop();
3418 checked.push(n);
3419 for (uint i = 0; i < n->outcnt(); i++) {
3420 Node* use = n->raw_out(i);
3421 if (checked.member(use)) continue; // already checked
3422 if (visited.member(use)) continue; // already in the graph
3423 if (use->is_Con()) continue; // a dead ConNode is OK
3424 // At this point, we have found a dead node which is DU-reachable.
3425 if (dead_nodes++ == 0)
3426 tty->print_cr("*** Dead nodes reachable via DU edges:");
3427 use->dump(2);
3428 tty->print_cr("---");
3429 checked.push(use); // No repeats; pretend it is now checked.
3430 }
3431 }
3432 assert(dead_nodes == 0, "using nodes must be reachable from root");
3433 }
3434 }
|