On Feb 28, 2005, at 4:43 AM, Joern RENNECKE wrote:

Dale Johannesen wrote:

Well, no, what is supposed to happen (I haven't tried it for a while, so I don't promise
this still works) is code like this:


.hotsection:
loop:
  conditional branch (i?==1000) to L2
L1:
  /* do stuff */
end loop:

/* still in hot section  */
L2:  jmp L3

.coldsection:
L3:
  i = 0;
  jmp L1


Well, even then, using of the cold section can increase the hot section size, depending on target, and for some
targets the maximum supported distance of the cold section.

Certainly. In general it will make the total size bigger, as does inlining. If you have good
information about what's hot and cold, it should reduce the number of pages that actually
get swapped in. The information has to be good, though, as a branch from
hot<->cold section becomes more expensive. I'd recommend it only if you have
profiling data (this is a known winner on Spec in that situation).


Should I do custom basic block reordering in machine_dependent_reorg to clean up
the turds of hot and cold partitioning?

No, you should not turn on partitioning in situations where code size is important to you.




Reply via email to