Request for reviews (M): 7004555: Add new policy for one iteration loops

Tom Rodriguez tom.rodriguez at oracle.com
Fri Apr 8 10:51:27 PDT 2011


On Apr 8, 2011, at 10:41 AM, Vladimir Kozlov wrote:

> Thank you, Tom
> 
> All fixed.
> I moved flags to LoopNode class and renamed the rest of flags:
> 
> +  enum { Normal=0, Pre=1, Main=2, Post=3, PreMainPostFlagsMask=3,
> +         MainHasNoPreLoop=4,
> +         HasExactTripCount=8,
> +         InnerLoop=16,
> +         PartialPeelLoop=32,
> +         PartialPeelFailed=64 };
> 
> -  enum { pre_post_main=0, inner_loop=8, partial_peel_loop=16, partial_peel_failed=32  };
> -  enum { Normal=0, Pre=1, Main=2, Post=3, PrePostFlagsMask=3, Main_Has_No_Pre_Loop=4 };

That's much better.  Thanks!

tom

> 
> Thanks,
> Vladimir
> 
> Tom Rodriguez wrote:
>> loopTransform.cpp:
>> bounderies -> boundaries
>> There's a use UseNewCode left behind
>> loopnode.hpp:
>> The relationship between the loop_flags enum in LoopNode and the one in CountedLoopNode is kind of obscure.  Could you declare them together so it's more obvious?
>> Otherwise it looks good.
>> tom
>> On Apr 6, 2011, at 12:24 PM, Vladimir Kozlov wrote:
>>> http://cr.openjdk.java.net/~kvn/7004555/webrev
>>> 
>>> Fixed 7004555: Add new policy for one iteration loops
>>> 
>>> Add new policy for one iteration loops (mostly formal pre- loops) to fold exit condition and avoid going through do_maximally_unroll() as we do currently for such cases.
>>> Move exact trip count calculation from policy_maximally_unroll() into separate method. Note, trip_count type is changed to unsigned int and its range is changed to [0, max_juint). Add new flag HasExactTripCount to indicate that loop's limits and trip count are constants.
>>> Check for non overlaping init and limit values to avoid zero trip guard generation in remove_empty_loop.
>>> Rename some CountedLoopNode flags.
>>> Print loop iv range for counted loops dumps:
>>> 
>>> Loop: N286/N193  predicated counted [0,2),+1



More information about the hotspot-compiler-dev mailing list