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: number of spills and reloads


> I'm doing some experiments on Pentium machines, and basically I need 3 kinds 
> of statistics after reloading:
> 1) number of memory stores, eg. [sp+4] <- r1
> 2) number of memory loads, eg. r1 <- [sp+4]
> 3) number of combined stores and loads with addressing mode available
> on CISC-like architectures: eg. [sp+4] <- [sp+4] + r1, or r1 <- [sp+4]
> + r1
> where r1 is the hardware register.
> 
> >From your previous email,  I think  the place in which REG is modifed
> into MEM is only for case 3)??    Could you please tell me which

No, a reg->reg move can have either or both operands changed to a MEM,
thus making it a load, a store, or a memory-memory move (where available).

> functions in the codes does this modification?

Look at alter_reg.

> >From the greg dump, it seems that the memory stores is related to
> RELOAD_FOR_OUTPUT.  Is it possible to obtain (1) from the function
> "emit_output_reload_insns"?
> 
> For case (2), I don't have much clue.  Is it related to RELOAD_FOR_INPUT? 
> For the dump, it seems that for any non-optional RELOAD_FOR_INPUT or
> RELOAD_FOR_OPERAND_ADDRESS, a "memory load" will be generated.
> Is it correct?

A memory access need not have been generated by reload changing a register
into a memory reference; it might also be a result of rtl generation.


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