This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Directly generating binary code [Was Re: Link-time optimzation]


On 11/18/05, Laurent GUERBY <laurent@guerby.net> wrote:
> On Fri, 2005-11-18 at 11:40 +0000, Andrew Haley wrote:
> > A nightmare scenario is debugging the compiler when its behaviour
> > changes due to using "-S".  Assembly source is something that we
> > maintainers use more than anyone else.
>
> If we go the direct generation route, I think it would be more
> efficient (if possible) to add whatever extra information is needed in
> the object file (like the asm template string, compiler comments, ...)
> so that object code dumper will get it back to you on request. So skip
> the -S altogether, always use the object dumper to "look at assembly".

The point Andrew's raising here is that you are replacing an
intermediate form that is very useful for isolating problems --- the
assembly language file --- with an in-core form that is much more
difficult to inspect.

And there are various side consequences: for example, you know the
compiler isn't going to go and tweak the assembly-language file you're
looking at, because it's exited.  But with an in-core representation
(and a non-type-safe language like C), compiler bugs can still be
mangling the assembly code "after" it's been generated.

For a 2% speedup?  That hasn't been carefully measured?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]