This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Pass -mtune and -march options to assembler.
Valdimir Volynsky wrote:
>> You're treating GAS as an immovable target, but it's not -- we can
>> change it.
> Not an immovable, but slow movable. Step by step. First step - create
> GCC - AS interface for optimization options. Second step - sync cpu-type
> options. Third - add optimizations to AS, that impossible to do on GCC
> level. Then add .tune directive. And so on...
External interfaces imply long-term compatibility requirements, so if
you add things now, then we need to lug them around for a quite a while.
There's nothing more conservative about your proposed plan than mine.
As far as I can tell, the only advantage of your plan is that it's
easier to do in the short term. The problem is that I don't think it's
as good in the medium term and that's particularly important since it
involves an external interface.
My suggested work order would be (1) Get GCC's CPU core names into GAS,
(2) Add .mtune support to GAS, (3) Add .mtune directive to GCC output,
when GCC is configured to use an assembler that supports .mtune. That's
work, but not an incredibly large amount of work; I'd expect anywhere
from a few days to a few weeks depending on the level of skill and
experience of the person making the change.
>> Optimization in the linker makes sense; the linker has more
>> information than the compiler/assembler.
> Right, but one note - it's required some control for enable/disable
> optimization on some code fragments (for human-optimized assembler
Sure, you can always have options to disable whatever you want to
disable. The point of discussion isn't what to do in the linker; it's
what not to do in the assembler.
(650) 331-3385 x713