<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/18/16 12:33 PM, Quentin Colombet
via llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:CBF03674-397A-4CAA-88CE-5CE2ED3974C1@apple.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=utf-8">
Hi Vivek,
<div class=""><br class="">
<div>
<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><br class="">
</div>
<div>+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>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>
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>
<br>
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>
<br>
<blockquote
cite="mid:CBF03674-397A-4CAA-88CE-5CE2ED3974C1@apple.com"
type="cite">
<div class="">
<div>
<div><br class="">
</div>
<div>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>
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>
<br>
Regards,<br>
<br>
John Criswell<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>