<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 3/21/16 5:25 PM, Quentin Colombet
wrote:<br>
</div>
<blockquote
cite="mid:428ABC5D-E6CC-4688-8A9A-15A1B100D68E@apple.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=utf-8">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Mar 20, 2016, at 12:53 PM, John Criswell <<a
moz-do-not-send="true" href="mailto:jtcriswel@gmail.com"
class=""><a class="moz-txt-link-abbreviated" href="mailto:jtcriswel@gmail.com">jtcriswel@gmail.com</a></a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div 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=""> 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=""><a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a></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 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>
</blockquote>
<br>
It's a project idea that I added to the Open Projects page. I don't
think I've seen anyone volunteering to work on it on the mailing
lists.<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
<blockquote
cite="mid:428ABC5D-E6CC-4688-8A9A-15A1B100D68E@apple.com"
type="cite">
<div>
<div><br class="">
</div>
<div>Thanks,</div>
<div>-Quentin</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div 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 moz-do-not-send="true" 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="">
</blockquote>
<br>
<br>
<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>
</body>
</html>