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: Memory map.


> >     Is the memory map kept in gcc after the reload step? (e.g. e vector
> > saying the stack slot where each variable is placed). I wrote
> the code to
>
> We've got reg_renumber, which tells you for each pseudo reg which
> hard reg it got, if any, and regno_reg_rtx, which gets changed to
> the appropriate MEMs for stack slots.

     First of all, thanxs for your answer.
	I tried to change my code to use regno_reg_rtx ( in the idea that I should
use the mechanisms provided by gcc rather then rewrite them). So at first, I
tried to see how the regno_reg_rtx array looks, so I did:

     for(i=0;i<max_regno;i++){
	    if(regno_reg_rtx[i]==0) continue;
         print_rtl_single(dump_file,regno_reg_rtx[i]);
	}

    What I got was:

(reg:SI 30)
(reg:SI 31)
(reg:SI 32)
(reg:SI 33)
(reg:SI 34)
(reg:SI 35)
(reg:SI 16 r0)
(reg:SI 37)
(reg:SI 0 d0)

	I have the feeling that something went wrong - this is not at all what I
expected. At a quick glance, it seems that alter_reg(..) in reload1.c sets
the values this way - but AFAICT, these values should have been modified
later to point at the stack slots. Am I misunderstanding something or
something goes wrong in my compiler?

     Virgil.


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