This is the mail archive of the
mailing list for the GCC project.
Re: number of spills and reloads
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: qiong dot cai at gmail dot com
- Cc: wilson at specifixinc dot com (James E Wilson), gcc at gcc dot gnu dot org
- Date: Wed, 1 Sep 2004 13:38:40 +0100 (BST)
- Subject: 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
> 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.