loop-unroll.c TLC 3/4 simple peeling heuristic fix

2012-10-23 Thread Jan Hubicka
Hi, simple peeling heuristic thinks it makes no sense to peel loops with known iteration count (because they will be runtime unrolled instead). This is not true because the known iteration count is only upper bound. Fixed this. To make testcase possible I had to reduce overactive heuristic on numb

loop-unroll.c TLC 2/4

2012-10-20 Thread Jan Hubicka
Hi, this patch fixes heuristic on decide_unroll_constant_iterations to take into account the profile: even when the loop is known to have constant loop iteration bound, it doesn't need to really iterate many times. So use profile and loop_max to double check that this is the case. Bootstrapped/re

loop-unroll.c TLC 1/4

2012-10-20 Thread Jan Hubicka
Hi, the TLC path I sent last week became outdated for few reaons. I decided to split it up for easier reviewing. This is simple correcntess issue I am comitting as obvoius - my last update to loop-iv missed the fact that loop-iv bounds may depend on further conditions. In that case we can not r

loop-unroll.c TLC

2012-10-15 Thread Jan Hubicka
Hi, this patch applies some TLC on RTL loop unroller. The following issues are fixed: 1) while updating loop-iv.c I did not notice that the upper bound computed is in fact conditional on infinite and assumptions flags. The patch disables adding it if those are non-zero. I checked it do