On Tue, 31 Aug 2021, Xionghu Luo wrote:
>
>
> On 2021/8/30 17:19, Richard Biener wrote:
> bitmap_set_bit (work_set, loop->header->index);
> + unsigned bb_index;
> - for (i = 0; i < loop->num_nodes; i++)
> -{
> - edge_iterator ei;
>
On 2021/8/30 17:19, Richard Biener wrote:
bitmap_set_bit (work_set, loop->header->index);
+ unsigned bb_index;
- for (i = 0; i < loop->num_nodes; i++)
- {
- edge_iterator ei;
- bb = bbs[i];
+ unsigned array_size = last_basic_block_for_fn (cfun) + 1;
g of the loop header successors,
> >>>>> processing further blocks if all entries (ignoring backedges) are
> >>>>> processed, setting SET_ALWAYS_EXECUTED_IN. When the worklist
> >>>>> is empty proceed to inner loops as the current code does
execution time is 25 ms after code refine. It's even better than A.
Attached the test case ssa-lim-22.c used for time measurement.
Bumped the patch to v3 with TODOs:
1. The time measurement code will be removed if the v3 is OK;
2. loops_list is not used as my code is not re
_p (worklist))
> >>> {
> >>> bb = pop (worklist);
> >>
> >> Need check whether bb dominates latch before SET_ALWAYS_EXECUTED_IN?
> >
> > Ah, sure.
> >
> >>> SET_ALWAYS_EXECUTED_IN (bb, loop);
> >>>
;>> {
>>> if (!flow_bb_inside_loop_p (loop, e->dest))
>>> continue;
>>> if (incoming_count[e->dest->index]-- == 0)
>>> push (worklist, e->dest);
>>> }
>&