RFD: Integrate shorten_branches, machine-dependent constant pool placement and small-scale hot/cold partitioning
Mark Mitchell
mark@codesourcery.com
Tue May 16 14:18:00 GMT 2006
Richard Earnshaw wrote:
> Yes, the problem on Thumb-1 is the same in almost all respects:
I had Joern's mail in my reply-to queue, and was going to say basically
the same things as Richard, so I'll just echo the fact that I'd like to
see some generic infrastructure built.
> With the Thumb code there is an additional problem that I'd like to try
> and solve:
> - Small functions all get their own constant pool, even if they could
> reach further to allow pool merging.
Now that Richard has given us proper data structures for sections,
perhaps we could solve this last problem relatively simply. In
particular, have cgraph sort functions so that functions appearing in
the same section are emitted together. Then, the back end could just
not reset the distance counters when starting a new function, so long as
there was no change in section. We do need to account for the
prologue/epilogue code, which, the last time I looked, wasn't counted.
I guess we could do this even without sorting the functions, either by
conservatively resetting at every section switch, or by storing the
counters in a machine-specific part of the section data structure. Of
course, we have to have a way of knowing if the compiler has dumped a
random variable of asm() output into a section, but we must have solved
that for section anchors as well.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
More information about the Gcc
mailing list