[LLVMdev] About the information about live variable analysis

Jakob Stoklund Olesen stoklund at 2pi.dk
Sat Dec 18 18:59:42 PST 2010


On Dec 18, 2010, at 5:53 PM, Qingan Li wrote:

> Hi,
> 
> I worked in llvm to get some information from live variable analysis.
> If the live range of one variable interferes with another, we could record the related two variables into a pair. For example, with a function with local variables 'a', 'b', 'c', 'x' and 'y', the pair set { (a, b), (b,c), (x,y)} indicates that 'a' interferes with 'b', 'b' interferes with 'c', and 'x' interferes with 'y'.
> 
> The question is: How can I get this information (maybe in other forms) by using llvm to compile a program?

This information is only available during register allocation in the code generator. Look at LiveInterval::overlaps().

That is quite late in the compilation process, and it is not easy to translate back to variables in the original program.

/jakob

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101218/937f1212/attachment.bin>


More information about the llvm-dev mailing list