< prev index next >

src/hotspot/share/opto/compile.cpp

Print this page




2054 }
2055 
2056 void Compile::add_value_type(Node* n) {
2057   assert(n->is_ValueTypeBase(), "unexpected node");
2058   if (_value_type_nodes != NULL) {
2059     _value_type_nodes->push(n);
2060   }
2061 }
2062 
2063 void Compile::remove_value_type(Node* n) {
2064   assert(n->is_ValueTypeBase(), "unexpected node");
2065   if (_value_type_nodes != NULL) {
2066     _value_type_nodes->remove(n);
2067   }
2068 }
2069 
2070 void Compile::process_value_types(PhaseIterGVN &igvn) {
2071   // Make value types scalar in safepoints
2072   while (_value_type_nodes->size() != 0) {
2073     ValueTypeBaseNode* vt = _value_type_nodes->pop()->as_ValueTypeBase();
2074     vt->make_scalar_in_safepoints(igvn.C->root(), &igvn);
2075     if (vt->is_ValueTypePtr()) {
2076       igvn.replace_node(vt, vt->get_oop());
2077     }
2078   }
2079   _value_type_nodes = NULL;
2080   igvn.optimize();
2081 }
2082 
2083 // StringOpts and late inlining of string methods
2084 void Compile::inline_string_calls(bool parse_time) {
2085   {
2086     // remove useless nodes to make the usage analysis simpler
2087     ResourceMark rm;
2088     PhaseRemoveUseless pru(initial_gvn(), for_igvn());
2089   }
2090 
2091   {
2092     ResourceMark rm;
2093     print_method(PHASE_BEFORE_STRINGOPTS, 3);
2094     PhaseStringOpts pso(initial_gvn(), for_igvn());




2054 }
2055 
2056 void Compile::add_value_type(Node* n) {
2057   assert(n->is_ValueTypeBase(), "unexpected node");
2058   if (_value_type_nodes != NULL) {
2059     _value_type_nodes->push(n);
2060   }
2061 }
2062 
2063 void Compile::remove_value_type(Node* n) {
2064   assert(n->is_ValueTypeBase(), "unexpected node");
2065   if (_value_type_nodes != NULL) {
2066     _value_type_nodes->remove(n);
2067   }
2068 }
2069 
2070 void Compile::process_value_types(PhaseIterGVN &igvn) {
2071   // Make value types scalar in safepoints
2072   while (_value_type_nodes->size() != 0) {
2073     ValueTypeBaseNode* vt = _value_type_nodes->pop()->as_ValueTypeBase();
2074     vt->make_scalar_in_safepoints(&igvn);
2075     if (vt->is_ValueTypePtr()) {
2076       igvn.replace_node(vt, vt->get_oop());
2077     }
2078   }
2079   _value_type_nodes = NULL;
2080   igvn.optimize();
2081 }
2082 
2083 // StringOpts and late inlining of string methods
2084 void Compile::inline_string_calls(bool parse_time) {
2085   {
2086     // remove useless nodes to make the usage analysis simpler
2087     ResourceMark rm;
2088     PhaseRemoveUseless pru(initial_gvn(), for_igvn());
2089   }
2090 
2091   {
2092     ResourceMark rm;
2093     print_method(PHASE_BEFORE_STRINGOPTS, 3);
2094     PhaseStringOpts pso(initial_gvn(), for_igvn());


< prev index next >