OpenJDK / jdk / jdk
changeset 2876:b8ebc85d0b47
6837146: Should perform unswitch before maximally unroll in loop transformation
Summary: Move loop unswitch before maximally unroll
Reviewed-by: never
author | cfang |
---|---|
date | Thu, 28 May 2009 09:37:18 -0700 |
parents | 549b4d80b29e |
children | a9dca86798e4 |
files | hotspot/src/share/vm/opto/loopTransform.cpp |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hotspot/src/share/vm/opto/loopTransform.cpp Wed May 27 12:35:51 2009 -0700 +++ b/hotspot/src/share/vm/opto/loopTransform.cpp Thu May 28 09:37:18 2009 -0700 @@ -1630,6 +1630,10 @@ // Before attempting fancy unrolling, RCE or alignment, see if we want // to completely unroll this loop or do loop unswitching. if( cl->is_normal_loop() ) { + if (should_unswitch) { + phase->do_unswitching(this, old_new); + return true; + } bool should_maximally_unroll = policy_maximally_unroll(phase); if( should_maximally_unroll ) { // Here we did some unrolling and peeling. Eventually we will @@ -1637,10 +1641,6 @@ phase->do_maximally_unroll(this,old_new); return true; } - if (should_unswitch) { - phase->do_unswitching(this, old_new); - return true; - } }