[PATCH] New fixes for hot/cold partitioning

Zack Weinberg zack@codesourcery.com
Wed Apr 6 21:45:00 GMT 2005


Caroline Tice <ctice@apple.com> writes:

>> I'd prefer that this block of operations be made conditional on
>> flag_reorder_blocks_and_partition.  If the flag is false, it's going
>> to be scanning the entire insn stream several times for no benefit.
>
> This code is inside fix_edges_for_rarely_executed_code, which is
> only called from partition_hot_cold_basic_blocks, which is only
> called if  flag_reorder_blocks_and_partition is true.  Therefore it
> seems redundant to put a check for that flag here...

Ah, ok, yes, it's redundant then.

>> Why not just "cfun->unlikely_text_section_name =
>> UNLIKELY_EXECUTED_TEXT_SECTION_NAME"?  You shouldn't have any name
>> encoding here to strip.  And this has the same memory leak as the
>> then-block.
>
> If you are sure there won't be any encoding to strip, I'll be happy
> to do that.  And to fix the memory leak...

The various _SECTION_NAME macros are defined not to carry name
encoding, as I understand it.

zw



More information about the Gcc-patches mailing list