< prev index next >

src/hotspot/share/opto/compile.cpp

Print this page
rev 55090 : secret-sfac


3947     return false;
3948   }
3949 }
3950 
3951 // Compute when not to trap. Used by matching trap based nodes and
3952 // NullCheck optimization.
3953 void Compile::set_allowed_deopt_reasons() {
3954   _allowed_reasons = 0;
3955   if (is_method_compilation()) {
3956     for (int rs = (int)Deoptimization::Reason_none+1; rs < Compile::trapHistLength; rs++) {
3957       assert(rs < BitsPerInt, "recode bit map");
3958       if (!too_many_traps((Deoptimization::DeoptReason) rs)) {
3959         _allowed_reasons |= nth_bit(rs);
3960       }
3961     }
3962   }
3963 }
3964 
3965 bool Compile::is_compiling_clinit_for(ciKlass* k) {
3966   ciMethod* root = method(); // the root method of compilation
3967   return root->is_static_initializer() && root->holder() == k; // access in the context of clinit
3968 }
3969 
3970 #ifndef PRODUCT
3971 //------------------------------verify_graph_edges---------------------------
3972 // Walk the Graph and verify that there is a one-to-one correspondence
3973 // between Use-Def edges and Def-Use edges in the graph.
3974 void Compile::verify_graph_edges(bool no_dead_code) {
3975   if (VerifyGraphEdges) {
3976     ResourceArea *area = Thread::current()->resource_area();
3977     Unique_Node_List visited(area);
3978     // Call recursive graph walk to check edges
3979     _root->verify_edges(visited);
3980     if (no_dead_code) {
3981       // Now make sure that no visited node is used by an unvisited node.
3982       bool dead_nodes = false;
3983       Unique_Node_List checked(area);
3984       while (visited.size() > 0) {
3985         Node* n = visited.pop();
3986         checked.push(n);
3987         for (uint i = 0; i < n->outcnt(); i++) {




3947     return false;
3948   }
3949 }
3950 
3951 // Compute when not to trap. Used by matching trap based nodes and
3952 // NullCheck optimization.
3953 void Compile::set_allowed_deopt_reasons() {
3954   _allowed_reasons = 0;
3955   if (is_method_compilation()) {
3956     for (int rs = (int)Deoptimization::Reason_none+1; rs < Compile::trapHistLength; rs++) {
3957       assert(rs < BitsPerInt, "recode bit map");
3958       if (!too_many_traps((Deoptimization::DeoptReason) rs)) {
3959         _allowed_reasons |= nth_bit(rs);
3960       }
3961     }
3962   }
3963 }
3964 
3965 bool Compile::is_compiling_clinit_for(ciKlass* k) {
3966   ciMethod* root = method(); // the root method of compilation
3967   return root->is_class_initializer() && root->holder() == k; // access in the context of clinit
3968 }
3969 
3970 #ifndef PRODUCT
3971 //------------------------------verify_graph_edges---------------------------
3972 // Walk the Graph and verify that there is a one-to-one correspondence
3973 // between Use-Def edges and Def-Use edges in the graph.
3974 void Compile::verify_graph_edges(bool no_dead_code) {
3975   if (VerifyGraphEdges) {
3976     ResourceArea *area = Thread::current()->resource_area();
3977     Unique_Node_List visited(area);
3978     // Call recursive graph walk to check edges
3979     _root->verify_edges(visited);
3980     if (no_dead_code) {
3981       // Now make sure that no visited node is used by an unvisited node.
3982       bool dead_nodes = false;
3983       Unique_Node_List checked(area);
3984       while (visited.size() > 0) {
3985         Node* n = visited.pop();
3986         checked.push(n);
3987         for (uint i = 0; i < n->outcnt(); i++) {


< prev index next >