Hi Michael, I had a comment / query regarding Stage 2 where you talk about Function cloning for different targets.
I understand that the mechanism is to have a hidden function pointer that actually gets initialized based on the cpuid. I don't know if it is worth the effort to have debug info also enhanced to be such that a breakpoint put on the function my_min actually sets the breakpoint on any of the clones since the logic would be similar to the same. This sounds logically similar to the way that gdb currently handles breakpoints to multiple constructors. The other option ofcourse is to fake debug information for such to actually set a breakpoint on the value of the function pointer that you so set up. I am no DWARF expert but there might be other folks on the list who might have better ideas about how to implement this. cheers Ramana On Nov 29, 2007 2:27 AM, Michael Meissner <[EMAIL PROTECTED]> wrote: > One of the things that I've been interested in is adding support to GCC to > compile individual functions with specific target options. I first presented > a > draft at the Google mini-summit, and then another draft at the GCC developer > summit last July. > > In the x86 world this would mean saying that an individual function can use > SSE5 instructions or SSE4.1 instructions. This would simplify things for > people who need to write high performance libraries that run on different > architectures, and need to be optimal on each platform. Ultimately, the goal > is to allow hotspot functions to be compiled several times with different > target specific optimizations. I would welcome any thoughts or suggestions > about this proposal. > > The proposal is at: > http://gcc.gnu.org/wiki/FunctionSpecificOpt > > Part of the infrastructure work for doing this is already addressed in > function > adaption project and we will work together with that team: > http://gcc.gnu.org/wiki/functionAdaptation > > One of the things that I have considered and not added to the current proposal > is to change most of the -f, -O, -W options for a function. This would be > relatively simple to add once the infrastructure is in place, but it can > really > complicate things, since various optimizations depend on other optimizations > having been done. Similarly, the -mtune= and -march= options can overly > complicate matters. > > In addition, attribute(cold) and attribute(hot) will set the optimization > level > to -Os and -O3. > > I will be away on vacation from December 3-8th, and not reading mail during > that time. > > -- > Michael Meissner, AMD > 90 Central Street, MS 83-29, Boxborough, MA, 01719, USA > [EMAIL PROTECTED] > > > -- Ramana Radhakrishnan GNU Tools Celunite Inc.