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;
ity of this function. I would
> >>>>> have suggested to do greedy visiting of the loop header successors,
> >>>>> processing further blocks if all entries (ignoring backedges) are
> >>>>> processed, setting SET_ALWAYS_EXECUTED_IN. When the wo
ter than O(n^2)?
Sorry didn't get C's execution time accurate enough due to forgot to remove
dump file code in it.
C's 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
;> bitmap_set_bit (worklist, loop-header-bb);
> >>> while (!bitmap_empty_p (worklist))
> >>> {
> >>> bb = pop (worklist);
> >>
> >> Need check whether bb dominates latch before SET_ALWAYS_EXECUTED_IN?
> >
> > Ah, s
)
>>> continue;
>>> FOR_EACH_EDGE (e, ei, bb->succs)
>>> {
>>> if (!flow_bb_inside_loop_p (loop, e->dest))
>>> continue;
>>> if (incoming_count[e->dest->index]-- =