This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
if-conversion/HOT-COLD partitioning
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 23 Oct 2012 16:26:13 +0200
- Subject: if-conversion/HOT-COLD partitioning
Hi,
While debugging a GCC failure on ARM when compiling with
-fprofile-use, I came across a case where if_convert merges 2 blocks
which belong to different partitions (hot/cold).
In turn merge_blocks() (in cfghooks.c) merges the BB flags by ORing
them, resulting in a block belonging to both cold and hot partitions,
which seems to confuse the compiler: for instance in
bb-reorder.c:connect_traces(), the code expects only one partition
flag to be set.
I think merge_blocks() should be modified to handle such cases; I
experimented a little and forcing the merged BB's partition to be the
hot one in such a case is not sufficient: some edges have been marked
as crossing ones, and this would be no longer true. Is there a simple
way to clean that?
Thanks,
Christophe.