This is the mail archive of the
mailing list for the GCC project.
Re: if-conversion/HOT-COLD partitioning
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: Christophe Lyon <christophe dot lyon at linaro dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 24 Oct 2012 00:42:53 +0200
- Subject: Re: if-conversion/HOT-COLD partitioning
- References: <CABu31nMaJKFNbH8DipASfTRQ1ANr8M40Ve3hdghmrZr40Q3xow@mail.gmail.com> <CAKdteOaLdOYP8-nvaruYx9EuB0GkGhCJkv2B4QF7CwvMzGvOLQ@mail.gmail.com>
On Tue, Oct 23, 2012 at 10:29 PM, Christophe Lyon
> Well, both of these functions appear to check that the 2 blocks to
> merge belong to the same partition, so it should be OK.
In your first email, you said if-convert was merging two blocks from
different partitions. can_merge_block_p() would rejected merging the
two blocks, so merge_blocks shouldn't be called on them.
IIRC cfghooks.c:merge_blocks() used to have a
gcc_assert(can_merge_blocks(a,b)) but it's not there now. But if
can_merge_blocks() returns false, merge_blocks should fail. Your bug
is that merge_blocks is being called at all on those blocks from
> But not all calls to merge_blocks are guarded by if
> (can_merge_block_p()), this is probably where the problem is?
Not sure. Depends on what blocks get merged. It may be that
if-conversion shouldn't even be attempting whatever transformation
it's attempting. Not enough information.