On 2/16/21 1:13 AM, Jakub Jelinek via Gcc-patches wrote:
> Hi!
>
> fixup_partitions sometimes changes some basic blocks from hot partition to
> cold partition, in particular if after unreachable block removal or other
> optimizations a hot partition block is dominated by cold partition block(s).
> It fixes up the edges and jumps on those edges, but when after reorder
> blocks and in rtl (non-cfglayout) mode that is clearly not enough, because
> it keeps the block order the same and so we can end up with more than
> 1 hot/cold section transition in the same function.
>
> So, this patch fixes that up too.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2021-02-15 Jakub Jelinek <ja...@redhat.com>
>
> PR target/99085
> * cfgrtl.c (fixup_partitions): When changing some bbs from hot to cold
> partitions, if in non-layout mode after reorder_blocks also move
> affected blocks to ensure a single partition transition.
>
> * gcc.dg/graphite/pr99085.c: New test.
OK
jeff