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


Qiong Cai wrote:
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.

I don't think you can get the numbers you want by instrumenting reload. reload is a very complicated pass that does not match your model.


I'd suggest instead that you add before and after reload passes, that count the number of memory loads and stores by scanning all of the instructions in a function. Thus the number of loads/stores emitted by reload is the difference between the two.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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