Hello! >> Hi, >> this is update of my 2013 update to 2012 patch to move rtl loop peeling >> to tree level. This is to expose optimization oppurtunities earlier. >> Incrementally I think I can also improve profiling to provide a histogram >> on loop iterations and get more sensible peeling decisions. >> >> profiled-bootstrapped/regtested x86_64-linux, OK? > > Ok. > > Thanks, > Richard. >> >> Honza >> >> * loop-unroll.c: (decide_unrolling_and_peeling): Rename to >> (decide_unrolling): ... this one. >> (peel_loops_completely): Remove. >> (decide_peel_simple): Remove. >> (decide_peel_once_rolling): Remove. >> (decide_peel_completely): Remove. >> (peel_loop_simple): Remove. >> (peel_loop_completely): Remove. >> (unroll_and_peel_loops): Rename to ... >> (unroll_loops): ... this one; handle only unrolling. >> * cfgloop.h (lpt_dec): Remove LPT_PEEL_COMPLETELY and >> LPT_PEEL_SIMPLE. >> (UAP_PEEL): Remove. >> (unroll_and_peel_loops): Remove. >> (unroll_loops): New. >> * passes.def: Replace >> pass_rtl_unroll_and_peel_loops by pass_rtl_unroll_loops. >> * loop-init.c (gate_rtl_unroll_and_peel_loops, >> rtl_unroll_and_peel_loops): Rename to ... >> (gate_rtl_unroll_loops, rtl_unroll_loops): ... these; update. >> (pass_rtl_unroll_and_peel_loops): Rename to ... >> (pass_rtl_unroll_loops): ... this one. >> * tree-pass.h (make_pass_rtl_unroll_and_peel_loops): Remove. >> (make_pass_rtl_unroll_loops): New. >> * tree-ssa-loop-ivcanon.c: (estimated_peeled_sequence_size, try_peel_loop): >> New. >> (canonicalize_loop_induction_variables): Update. >> >> * gcc.dg/tree-prof/peel-1.c: Update. >> * gcc.dg/tree-prof/unroll-1.c: Update. >> * gcc.dg/gcc.dg/unroll_1.c: Update. >> * gcc.dg/gcc.dg/unroll_2.c: Update. >> * gcc.dg/gcc.dg/unroll_3.c: Update. >> * gcc.dg/gcc.dg/unroll_4.c: Update.
This patch caused: UNRESOLVED: gcc.dg/tree-prof/peel-1.c scan-rtl-dump loop2_unroll "Considering simply peeling loop" The gcc.dg/tree-prof/peel-1.c testcase needs further updates in dump scan and cleanup dg-directives. Uros.