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

David A. Greene greened at obbligato.org
Thu Aug 26 14:53:13 PDT 2010

Heikki Kultala <hkultala at cs.tut.fi> writes:

> 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.

This is already done.  Look in CodeGen/MachineFrameInfo.h:

  struct StackObject {

    // isSpillSlot - If true the stack object is used as spill slot. It
    // cannot alias any other memory objects.
    bool isSpillSlot;

Right now this gets used to print out some comments to label spill
instructions, among other things.


More information about the llvm-dev mailing list