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]

Re: trying to understand file-static variables in arm-linux-gcc


On Tue, Jun 19, 2001 at 10:39:35PM +0100, Philip Blundell wrote:
> >can anyone tell me how to make gcc compile this file more efficiently, or
> >where in the gcc codebase i should be looking to figure this out myself, or
> >why it hasn't been/can't be done?
> 
> The reason it hasn't been done is simply that nobody has volunteered to write 
> the code yet.  I don't think it should be that hard to make it happen.
> 
> If you are prepared to step up and implement this feature yourself, see 
> http://gcc.gnu.org/ for details of how to get the development tree and submit 
> patches.

my time constraints are pretty severe for the foreseeable future.  i did spend
the weekend looking over the gcc 3.0 codebase.  it seems like there might be a
bit of a learning curve, but i wouldn't mind giving it a shot, at least as an
experiment.

looking over the code, and making some (hopefully educated) guesses, it seems
to me that the per function data relocations are coming from the arm code dealing
with minipools.  the reason they are per-function is because yyparse() calls
rest_of_compilation() for each function, therefore generating asm code per
function, not per file.

if that is right, i would have to create some kind of data structure (a ggc root?)
per call to compile_file() instead of per call to rest_of_compilation().  this
would track the minipool info for the whole file, so that a unified minipool
could be generated.


am i on the right track here?


-- 
---------------------------------------------------------------------------
    Ray Lehtiniemi <rayl@mail.com>


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