<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Dear Fami,<br>
<br>
Currently, there is no MachineModulePass in LLVM.<br>
<br>
There was recently a discussion on the list about adding such a
pass. Other LLVM users and myself are interested in such an
infrastructure. You can search for that discussion on the LLVM
Developer's mailing list archives.<br>
<br>
Regarding your specific inquiry, you may be able to get what you
want without a MachineModulePass. Right now, it sounds like you
are thinking of the entire program as one large control flow
graph. However, the LLVM IR (and MachineInstr IR) do not
represent code that way. Each function has its own control flow
graph; the basic blocks within these graphs may call to (and
return from) other functions.<br>
<br>
Most likely, you can adjust your analysis so that it uses loop
analysis for local control flow and call graph analysis for
inter-procedural control flow. In other words, it may not be
necessary to view the entire program as one big control flow graph
for your purposes.<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
<br>
On 1/29/16 6:52 PM, fateme Hoseini via llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:CAOQsd8a56pi7YD-X0vvXMaVGG0E-s+jYN9ALRNBVNKmtTP=rvQ@mail.gmail.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
<div dir="ltr">Hello everyone,
<div>As I mentioned in my previous posts,I am using a
machinefunction pass to find all the loops in the program and
do some analysis on them. I have completed my pass now and it
works correctly. but the only issue is that,I have noticed
that if I have two functions in my program, and one of them is
part of the loop for another one ,by using
runonmachinefunction(), I will get one loop per each
function. whereas the correct result is to find one loop at
depth 1 and the other one at depth 2 as an inner loop.</div>
<div>In order to get this result, I am trying to use write a
MachineModule Pass, but I can't seem to find any
MachineModule.h in codegen. Right now, is this even possible
to write a machinemodule pass? If not what other options do I
have to get the results I need.</div>
<div>Thank you,</div>
<div>Fami</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</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>