[llvm-dev] Print Register Liveness Information

Anitha B Gollamudi via llvm-dev llvm-dev at lists.llvm.org
Thu Feb 16 12:46:26 PST 2017


Hi,

Is there a way to print the register liveness information into the assembly
file or as some intermediate listing?
To be more precise, I am looking at figuring out the following information
in an assembly file/listing.

Say, for simplicity, our register set is only { rsp, rbp, eax }


subq    $16, %rsp     // rsp is killed here, eax and rbp are live
movl    $0, -4(%rbp)  // rbp is killed here, rsp and eax are live
xorl    %eax, %eax    // eax is killed here, rsp and rbp are live
movl    $1, %eax   // eax is killed here, rsp and rbp are live

Is there a way LLVM stores this information somewhere before producing
assembly?
I haven't  dug into the source code yet, but intuitively the information
must be there and hence maybe some pass dumps that info?

Thanks!

* Anitha*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170216/247e5e8b/attachment.html>


More information about the llvm-dev mailing list