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: problem with -funit-at-a-time


"Aparna Jain (apjain)" <apjain@cisco.com> writes:

> The code generated by 3.4.5 is no more assumes the first function of a C
> file  as the starting Address of the compiled code. I think this is
> because of -funit-at-a-time which is enabled by default by O2 option.

...

> I used -fno-unit-at-a-time , and it was fine. But just concerned about
> the throughput of the code generated. Is there any other way to deal
> with this problem ?

If you need the output to be in the same order as the input, then in
gcc 3.4.5 -fno-unit-at-a-time is the right approach.  In gcc 4.2 and
later, you can instead use -fno-toplevel-reorder, which retains the
ordering while also giving you the performance benefits of
-funit-at-a-time.

Ian


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