Re: Pitfalls in interference graph ?

torbenm@app-6.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
Wed, 17 Oct 2007 10:37:10 +0200

          From comp.compilers

Related articles
[4 earlier articles]
Re: Pitfalls in interference graph ? bergner@vnet.ibm.com (Peter Bergner) (2007-10-01)
Re: Pitfalls in interference graph ? marcov@stack.nl (Marco van de Voort) (2007-10-01)
Re: Pitfalls in interference graph ? rayiner@gmail.com (Rayiner Hashem) (2007-10-01)
Re: Pitfalls in interference graph ? rayiner@gmail.com (Rayiner Hashem) (2007-10-01)
Re: Pitfalls in interference graph ? jeremy.wright@microfocus.com (Jeremy Wright) (2007-10-02)
Re: Pitfalls in interference graph ? shafitvm@gmail.com (shafi) (2007-10-15)
Re: Pitfalls in interference graph ? torbenm@app-6.diku.dk (2007-10-17)
Re: Pitfalls in interference graph ? SidTouati@inria.fr (ST) (2007-10-18)
Re: Pitfalls in interference graph ? rayiner@gmail.com (Rayiner Hashem) (2007-10-21)
Re: Pitfalls in interference graph ? Sid.Touati@uvsq.fr (Sid Touati) (2007-10-24)
Re: Pitfalls in interference graph ? parthaspanda22@gmail.com (2007-10-24)
| List of all articles for this month |
From: torbenm@app-6.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
Newsgroups: comp.compilers
Date: Wed, 17 Oct 2007 10:37:10 +0200
Organization: Department of Computer Science, University of Copenhagen
References: 07-09-104 07-10-007 07-10-052
Keywords: registers
Posted-Date: 17 Oct 2007 15:40:37 EDT

shafi <shafitvm@gmail.com> writes:


>> > Now for building the interference graph what other than register pairs
>> > is there any other issues that one has to look out for?
>>
>> - Calling conventions, i.e., caller-saves versus callee-saves
>> registers, parameter-transfer registers and registers used for
>> return address and stack/frame pointer.
>>
> parameter-transfer registers,return address registers and
> stack/frame registers and other instruction specific and fixed-
> function specific registers are handled by perpending and appending
> move instructions to the register usages.
> For caller/callee saved registers : A call instruction must cause all
> volatile (caller-saves) registers to
> interfere will all virtual register live at the call point.
> Is there anything else other than this ?


You must make sure that the registers used for parameter passing are
considered live at the time of the call. You can do this by adding
these registers to the list of registers that the call instruction
reads (though it is, in fact, the called function that does this).
Also, make sure that the register(s) used for returning the function
result is considered live at the return point. You can do this by
adding this as a register read by the return instruction.


Chapter 9 of my book "Basics of Compiler Design" (which you can
download for free from http://www.diku.dk/~torbenm/Basics) considers
function calls and how this interacts with register allocation (which
is, otherwise, covered in chapter 8).


Torben



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.