<br>Can  you tell me where pass_1 is defined? You have used it inside getAnalysis<pass_1>(). Is it the name we generally give to a pass while registry? In this case, don't I need to use getAnalysisUsage (AnalysisUsage &AU)  function?<br>
<br><br><br><div class="gmail_quote">On 20 July 2010 02:55, John Criswell <span dir="ltr"><<a href="mailto:criswell@uiuc.edu">criswell@uiuc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">Soumya_Prasad_Ukil wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
     In LLVM, we generally use data structure of another pass by implementing getAnalysisUsage (AnalysisUsage &AU) method. Suppose SOURCE/lib/Transform directory I have added one pass named as pass_1, which calculates all expressions in a program and stores all of them in an Expr array(take it now for granted). Now I added another pass named as pass_2 in the same directory to print all these expression. How do I do this?<br>

</blockquote>
<br></div>
The pass_1 pass will need to implement a method that returns the array of expressions (or a reference to it).  The pass_2 pass can then use getAnalysis<pass_1>() to get a reference to the pass_1 object and call this method on the pass_1 object to get the array of expressions.<br>

<br>
-- John T.<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
<br>
-- <br>
regards,<br>
soumya prasad ukil<br>
</blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>regards,<br>soumya prasad ukil<br>