[LLVMdev] Register allocation marking spills (Re: NumLoads/NumStores for linearscan?)

Heikki Kultala hkultala at cs.tut.fi
Wed Aug 25 01:50:20 PDT 2010


On 25 Aug 2010, at 02:04, Silvio Ricardo Cordeiro wrote:

> On Sun, Aug 15, 2010 at 10:04 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
> 
> On Aug 15, 2010, at 5:12 PM, Silvio Ricardo Cordeiro wrote:
> 
> > Is there a way for me to collect statistics about the number of loads/stores added by the "linearscan" register allocator (just like can be done with the "local" allocator)?  I still haven't grokked very well the interaction between RALinScan and Spiller... Should I add those two statistics to the spiller's class?

hmm, having information if an operation is (a, or part of a) spill generated by the register allocation would be benefical in some cases; Those memory operations cannon alias with any other memory operations in the code, so it would help Alias Analysis.

(though I'm not sure if anyone else than us at the TCE project have any use for alias analysis after regalloc)

We actually have our own hacked version of the linear scan allocator which adds this information to the instructions it creates, but our implementation is quite ugly/kludgy.

So, 

1) does anybody else find this benefcial for their use?
2) what would be the cleanest, least kludge way to store this information? (currently we use a hack based on DebugLoc)





More information about the llvm-dev mailing list