Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/loopnode.cpp @ 4064:670a74b863fc
7107042: assert(no_dead_loop) failed: dead loop detected
Summary: Use dead nodes elimination code in PhaseIdealLoop before executing EA.
Reviewed-by: never, twisti
author | kvn |
---|---|
date | Wed, 09 Nov 2011 07:25:51 -0800 |
parents | 2c24ef16533d |
children | e8fdaf4a66cb |
comparison
equal
deleted
inserted
replaced
4063:7e0e43cf86d6 | 4064:670a74b863fc |
---|---|
1881 | 1881 |
1882 //============================================================================= | 1882 //============================================================================= |
1883 //----------------------------build_and_optimize------------------------------- | 1883 //----------------------------build_and_optimize------------------------------- |
1884 // Create a PhaseLoop. Build the ideal Loop tree. Map each Ideal Node to | 1884 // Create a PhaseLoop. Build the ideal Loop tree. Map each Ideal Node to |
1885 // its corresponding LoopNode. If 'optimize' is true, do some loop cleanups. | 1885 // its corresponding LoopNode. If 'optimize' is true, do some loop cleanups. |
1886 void PhaseIdealLoop::build_and_optimize(bool do_split_ifs) { | 1886 void PhaseIdealLoop::build_and_optimize(bool do_split_ifs, bool skip_loop_opts) { |
1887 ResourceMark rm; | 1887 ResourceMark rm; |
1888 | 1888 |
1889 int old_progress = C->major_progress(); | 1889 int old_progress = C->major_progress(); |
1890 uint orig_worklist_size = _igvn._worklist.size(); | 1890 uint orig_worklist_size = _igvn._worklist.size(); |
1891 | 1891 |
2069 if(VerifyLoopOptimizations) verify(); | 2069 if(VerifyLoopOptimizations) verify(); |
2070 if(TraceLoopOpts && C->has_loops()) { | 2070 if(TraceLoopOpts && C->has_loops()) { |
2071 _ltree_root->dump(); | 2071 _ltree_root->dump(); |
2072 } | 2072 } |
2073 #endif | 2073 #endif |
2074 | |
2075 if (skip_loop_opts) { | |
2076 // Cleanup any modified bits | |
2077 _igvn.optimize(); | |
2078 | |
2079 if (C->log() != NULL) { | |
2080 log_loop_tree(_ltree_root, _ltree_root, C->log()); | |
2081 } | |
2082 return; | |
2083 } | |
2074 | 2084 |
2075 if (ReassociateInvariants) { | 2085 if (ReassociateInvariants) { |
2076 // Reassociate invariants and prep for split_thru_phi | 2086 // Reassociate invariants and prep for split_thru_phi |
2077 for (LoopTreeIterator iter(_ltree_root); !iter.done(); iter.next()) { | 2087 for (LoopTreeIterator iter(_ltree_root); !iter.done(); iter.next()) { |
2078 IdealLoopTree* lpt = iter.current(); | 2088 IdealLoopTree* lpt = iter.current(); |