Mercurial > hg > truffle
comparison src/share/vm/opto/loopTransform.cpp @ 2417:cb162b348743
7032696: Fix for 7029152 broke VM
Summary: StrIntrinsicNode::Ideal() should not optimize memory during Parse.
Reviewed-by: jrose, never
author | kvn |
---|---|
date | Thu, 31 Mar 2011 13:22:34 -0700 |
parents | f9424955eb18 |
children | 1d1603768966 08eb13460b3a |
comparison
equal
deleted
inserted
replaced
2416:38fea01eb669 | 2417:cb162b348743 |
---|---|
429 assert( (intx)unroll_limit == LoopUnrollLimit * 4, "LoopUnrollLimit must fit in 32bits"); | 429 assert( (intx)unroll_limit == LoopUnrollLimit * 4, "LoopUnrollLimit must fit in 32bits"); |
430 cl->set_trip_count(trip_count); | 430 cl->set_trip_count(trip_count); |
431 if (trip_count > unroll_limit || body_size > unroll_limit) { | 431 if (trip_count > unroll_limit || body_size > unroll_limit) { |
432 return false; | 432 return false; |
433 } | 433 } |
434 | |
435 // Currently we don't have policy to optimize one iteration loops. | |
436 // Maximally unrolling transformation is used for that: | |
437 // it is peeled and the original loop become non reachable (dead). | |
438 if (trip_count == 1) | |
439 return true; | |
434 | 440 |
435 // Do not unroll a loop with String intrinsics code. | 441 // Do not unroll a loop with String intrinsics code. |
436 // String intrinsics are large and have loops. | 442 // String intrinsics are large and have loops. |
437 for (uint k = 0; k < _body.size(); k++) { | 443 for (uint k = 0; k < _body.size(); k++) { |
438 Node* n = _body.at(k); | 444 Node* n = _body.at(k); |