Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/loopTransform.cpp @ 1275:b71f13525cc8
6927049: assert(is_Loop(),"invalid node class")
Reviewed-by: kvn
author | never |
---|---|
date | Fri, 19 Feb 2010 13:06:11 -0800 |
parents | b2b6a9bf6238 |
children | 336c6c200f5f |
comparison
equal
deleted
inserted
replaced
1274:2883969d09e7 | 1275:b71f13525cc8 |
---|---|
2115 //------------------------------ loop_predication_impl-------------------------- | 2115 //------------------------------ loop_predication_impl-------------------------- |
2116 // Insert loop predicates for null checks and range checks | 2116 // Insert loop predicates for null checks and range checks |
2117 bool PhaseIdealLoop::loop_predication_impl(IdealLoopTree *loop) { | 2117 bool PhaseIdealLoop::loop_predication_impl(IdealLoopTree *loop) { |
2118 if (!UseLoopPredicate) return false; | 2118 if (!UseLoopPredicate) return false; |
2119 | 2119 |
2120 if (!loop->_head->is_Loop()) { | |
2121 // Could be a simple region when irreducible loops are present. | |
2122 return false; | |
2123 } | |
2124 | |
2125 CountedLoopNode *cl = NULL; | |
2126 if (loop->_head->is_CountedLoop()) { | |
2127 cl = loop->_head->as_CountedLoop(); | |
2128 // do nothing for iteration-splitted loops | |
2129 if (!cl->is_normal_loop()) return false; | |
2130 } | |
2131 | |
2120 // Too many traps seen? | 2132 // Too many traps seen? |
2121 bool tmt = C->too_many_traps(C->method(), 0, Deoptimization::Reason_predicate); | 2133 bool tmt = C->too_many_traps(C->method(), 0, Deoptimization::Reason_predicate); |
2122 int tc = C->trap_count(Deoptimization::Reason_predicate); | 2134 int tc = C->trap_count(Deoptimization::Reason_predicate); |
2123 if (tmt || tc > 0) { | 2135 if (tmt || tc > 0) { |
2124 if (TraceLoopPredicate) { | 2136 if (TraceLoopPredicate) { |
2125 tty->print_cr("too many predicate traps: %d", tc); | 2137 tty->print_cr("too many predicate traps: %d", tc); |
2126 C->method()->print(); // which method has too many predicate traps | 2138 C->method()->print(); // which method has too many predicate traps |
2127 tty->print_cr(""); | 2139 tty->print_cr(""); |
2128 } | 2140 } |
2129 return false; | 2141 return false; |
2130 } | |
2131 | |
2132 CountedLoopNode *cl = NULL; | |
2133 if (loop->_head->is_CountedLoop()) { | |
2134 cl = loop->_head->as_CountedLoop(); | |
2135 // do nothing for iteration-splitted loops | |
2136 if(!cl->is_normal_loop()) return false; | |
2137 } | 2142 } |
2138 | 2143 |
2139 LoopNode *lpn = loop->_head->as_Loop(); | 2144 LoopNode *lpn = loop->_head->as_Loop(); |
2140 Node* entry = lpn->in(LoopNode::EntryControl); | 2145 Node* entry = lpn->in(LoopNode::EntryControl); |
2141 | 2146 |