This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: New Optimization: Partitioning hot & cold basic blocks
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: rth at redhat dot com (Richard Henderson)
- Cc: geoffk at geoffk dot org (Geoff Keating), ctice at apple dot com (Caroline Tice), gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Jan 2004 13:22:15 +0000 (GMT)
- Subject: Re: PATCH: New Optimization: Partitioning hot & cold basic blocks
> Ah, you mean enabling this cross-section thingy for leaf functions?
> Perhaps. I seriously doubt there are leaf functions with spots cold
> enough to warrent moving. Usually the bits you want to move are
> error reporting or recovery, and those involve function calls.
I actually have some code (as in, I wrote it several years ago
but haven't come around to finish off the application yet because
I got distracted fixing the compiler...) which has leaf functions
with cold spots. It uses ref counts on various data structures, and
they all got an 8-bit ref count field in the same place so you
can usually copy a value without knowing what it is.
Thus, even floats have this eight-bit refcount fields, even though
they tend not to be shared much. But strings have a refcount highpart,
since they tend to be shared quite a lot.
Now, when some code deals with a specific item of data, it will
often handle a ref-count overflow inline, e.g. when it is just
an increment of a refcount highpart.