This is the mail archive of the gcc-help@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: question on optimization


On 10/26/07, Jim Marshall <jim.marshall@wbemsolutions.com> wrote:
> Diego Novillo wrote:
> > On 10/26/07, Jim Marshall <jim.marshall@wbemsolutions.com> wrote:
> >
> >> gcc <options> module1.c module2.c ... moduleN.c?
> >
> > With the current version of GCC, there is no difference.  However, if
> > you *do* compile all the .c files with a single command and use
> > -combine then the compiler will treat all the .c files as a single one
> > and the IPA optimizations will work on all the files at once.  This
> > option is currently supported on C only.
> >
> > For future versions of GCC we are working on link-time optimization
> > features which will be more powerful than -combine (See
> > http://gcc.gnu.org/wiki/LinkTimeOptimization for some details).  This
> > is not likely to be in GCC for at least a couple of releases, though.
> >
> Great, thanks.  I never noticed the --combine option, thanks for the tip!

One of the best ways to test whether certain ways of compiling are
better than others, in general, is to test it.  Maybe make up a
specific reproducible test case that you can use as a benchmark.


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