src/share/vm/opto/macro.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 5091921 Sdiff src/share/vm/opto

src/share/vm/opto/macro.cpp

Print this page




2130   mem_phi->init_req(2, mem);
2131   transform_later(mem_phi);
2132   _igvn.replace_node(_memproj_fallthrough, mem_phi);
2133 }
2134 
2135 //------------------------------expand_macro_nodes----------------------
2136 //  Returns true if a failure occurred.
2137 bool PhaseMacroExpand::expand_macro_nodes() {
2138   if (C->macro_count() == 0)
2139     return false;
2140   // First, attempt to eliminate locks
2141   bool progress = true;
2142   while (progress) {
2143     progress = false;
2144     for (int i = C->macro_count(); i > 0; i--) {
2145       Node * n = C->macro_node(i-1);
2146       bool success = false;
2147       debug_only(int old_macro_count = C->macro_count(););
2148       if (n->is_AbstractLock()) {
2149         success = eliminate_locking_node(n->as_AbstractLock());





2150       } else if (n->Opcode() == Op_Opaque1 || n->Opcode() == Op_Opaque2) {
2151         _igvn.replace_node(n, n->in(1));
2152         success = true;
2153       }
2154       assert(success == (C->macro_count() < old_macro_count), "elimination reduces macro count");
2155       progress = progress || success;
2156     }
2157   }
2158   // Next, attempt to eliminate allocations
2159   progress = true;
2160   while (progress) {
2161     progress = false;
2162     for (int i = C->macro_count(); i > 0; i--) {
2163       Node * n = C->macro_node(i-1);
2164       bool success = false;
2165       debug_only(int old_macro_count = C->macro_count(););
2166       switch (n->class_id()) {
2167       case Node::Class_Allocate:
2168       case Node::Class_AllocateArray:
2169         success = eliminate_allocate_node(n->as_Allocate());




2130   mem_phi->init_req(2, mem);
2131   transform_later(mem_phi);
2132   _igvn.replace_node(_memproj_fallthrough, mem_phi);
2133 }
2134 
2135 //------------------------------expand_macro_nodes----------------------
2136 //  Returns true if a failure occurred.
2137 bool PhaseMacroExpand::expand_macro_nodes() {
2138   if (C->macro_count() == 0)
2139     return false;
2140   // First, attempt to eliminate locks
2141   bool progress = true;
2142   while (progress) {
2143     progress = false;
2144     for (int i = C->macro_count(); i > 0; i--) {
2145       Node * n = C->macro_node(i-1);
2146       bool success = false;
2147       debug_only(int old_macro_count = C->macro_count(););
2148       if (n->is_AbstractLock()) {
2149         success = eliminate_locking_node(n->as_AbstractLock());
2150       } else if (n->Opcode() == Op_LoopLimit) {
2151         // Remove it from macro list and put on IGVN worklist to optimize.
2152         C->remove_macro_node(n);
2153         _igvn._worklist.push(n);
2154         success = true;
2155       } else if (n->Opcode() == Op_Opaque1 || n->Opcode() == Op_Opaque2) {
2156         _igvn.replace_node(n, n->in(1));
2157         success = true;
2158       }
2159       assert(success == (C->macro_count() < old_macro_count), "elimination reduces macro count");
2160       progress = progress || success;
2161     }
2162   }
2163   // Next, attempt to eliminate allocations
2164   progress = true;
2165   while (progress) {
2166     progress = false;
2167     for (int i = C->macro_count(); i > 0; i--) {
2168       Node * n = C->macro_node(i-1);
2169       bool success = false;
2170       debug_only(int old_macro_count = C->macro_count(););
2171       switch (n->class_id()) {
2172       case Node::Class_Allocate:
2173       case Node::Class_AllocateArray:
2174         success = eliminate_allocate_node(n->as_Allocate());


src/share/vm/opto/macro.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File