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: demengler in libstdc++ is changed


On 14 Nov 2003, Ian Lance Taylor wrote:
> Chris Lattner <sabre@nondot.org> writes:
> > Presumably if they are working on the C++ demangler, they know C++.
> I'm not sure how this is relevant to Gaby's comment.
>
> But I'll note that it is false.  I worked on the C++ demangler long
> before I learned C++--in particular, I wrote a completely new version
> of it for objdump --debugging.  The demangler is a more or less
> straightforward decoding process.  You don't need to know the meaning
> of the end result to implement the decoding.

Point noted.

> > LLVM has a variety of link-time optimizations for reducing both code and
> > data size.  Even trivially simple techniques like interprocedural constant
> > propagation can make a huge difference... when statically linking, we can
> > specialize all of libstdc++ just for the program.  :)
>
> I'm sure it is clear that gcc can not require LLVM.  For the
> foreseeable future, gcc must work with the system linker.

Those are completely orthogonal issues (use of LLVM and use of the system
linker).  All of the LLVM transformations can be applied at any time
throughout the lifetime of the program, and translation units may be
linked multiple times if needbe (the pre- and post-link code
representation are the same, just like ld -r).

At any point in the life of the code, and after any number of link and
optimization phases are run, you can convert the code to C, which can
obviously them be compiled and linked with the platform compiler and
system linker.

When I said link-time optimization above, what I really mean is "an
optimization run after needlessly exported symbols are made internal",
using a link-map.  Once the library or unit of code is only exporting the
desired interface, many tranformations which require changing the
prototypes of functions apply.  Before masking out these symbols, the
optimizers are often constrained too much.

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/


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