<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 20, 2016, at 12:53 PM, John Criswell <<a href="mailto:jtcriswel@gmail.com" class="">jtcriswel@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" class="">
<div bgcolor="#FFFFFF" text="#000000" class="">
<div class="moz-cite-prefix">On 3/18/16 12:33 PM, Quentin Colombet
via llvm-dev wrote:<br class="">
</div>
<blockquote cite="mid:CBF03674-397A-4CAA-88CE-5CE2ED3974C1@apple.com" type="cite" class="">
<meta http-equiv="Context-Type" content="text/html; charset=utf-8" class="">
Hi Vivek,
<div class=""><br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On Mar 16, 2016, at 1:00 PM, vivek pandya via
llvm-dev <<a moz-do-not-send="true" href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hello,
<div class=""><br class="">
</div>
<div class="">Probably this may be too late to start
thinking about this project but I think this is
particularly useful feature for LLVM. </div>
</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">+1. I’d like to use something this feature in GlobalISel.
The idea is that has as soon as we lowered the LLVM IR of
the whole module to MachineInstr, the LLVM IR should be
deallocable.</div>
<div class="">In other words, the MachineModule/MachineFunctions should
contain enough information such that we do not have to keep
the LLVM IR around.</div>
</div>
</div>
</blockquote>
<br class="">
I think this is a separate issue from having a MachineModulePass.
My goal in having a MachineModulePass is to be able to do
inter-procedural analysis and transformation on a program after its
code has been generated. Examples of such applications include
inter-procedural register allocation, inter-procedural instruction
selection, inter-procedural code layout optimization (I have a
colleague working on this using reference affinity theory), and
inter-procedural analysis of machine code for measuring the efficacy
of compiler transformations for security.<br class="">
<br class="">
Whether one keeps the LLVM IR around or not is orthogonal. What is
needed is a way of being able to examine the whole program without
having to worry about another transformation running in parallel (if
you use a MachineFunctionPass, as I understand it, the pass should
not be analyzing/transforming other MachineFunction's).<br class=""></div></div></blockquote><div><br class=""></div><div>I agree. I was exposing my use case to help designing the whole thing. Yes, it does not have to be addressed for the MachineModule to be useable for other things.</div><br class=""><blockquote type="cite" class=""><div class=""><div bgcolor="#FFFFFF" text="#000000" class="">
<br class="">
<blockquote cite="mid:CBF03674-397A-4CAA-88CE-5CE2ED3974C1@apple.com" type="cite" class="">
<div class="">
<div class="">
<div class=""><br class="">
</div>
<div class="">One of the main challenge is about alias analysis
information that are tight with LLVM IR, but may be used in
MachineFunctionPass.</div>
</div>
</div>
</blockquote>
<br class="">
One of the other projects I proposed is to encode this information
within the MachineInstr IR. This would be very useful for one of my
projects, and it might solve this problem as well (once the
information is encoded in the MachineInstr IR, you don't need the
LLVM IR around anymore).<br class=""></div></div></blockquote><div><br class=""></div><div>That sounds like a possible solution. Do you have a link to the thread where this has been discussed?</div><div><br class=""></div><div>Thanks,</div><div>-Quentin</div><br class=""><blockquote type="cite" class=""><div class=""><div bgcolor="#FFFFFF" text="#000000" class="">
<br class="">
Regards,<br class="">
<br class="">
John Criswell<br class="">
<br class="">
<pre class="moz-signature" cols="72">--
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="http://www.cs.rochester.edu/u/criswell">http://www.cs.rochester.edu/u/criswell</a></pre>
</div>
</div></blockquote></div><br class=""></body></html>