Thanks for all the replies which are really helpful. <br><br>one more question regarding transformation:<br><br>4.  Given an instruction  %x1 = I1,  can I replace the rhs "I1"  with  "I2" and get a new instruction %x1 = I2?   Alternatively, I can add a new instruction %x2 = I2, and replace all uses of %x1 with %x2, and then delete %x1 = I1, but it seems the former is simpler or faster if it's doable. <br>
<br>Any suggestion?<br>Neal<br>   <br><br><br><div class="gmail_quote">On Mon, Apr 12, 2010 at 11:20 PM, Devang Patel <span dir="ltr"><<a href="mailto:devang.patel@gmail.com">devang.patel@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">> 3.  can I modify a function to take extra formal parameters? can I update<br>

> all calls of the original function to take extra actual paramters?  The<br>
> function might be called across multiple modules.   It seems this has to be<br>
> done at both ModulePass and FunctionPass levels.<br>
><br>
<br>
</div><div><div></div><div class="h5">Check out DeadArgumentElimination pass. It does opposite of what you<br>
want, but you'll get an idea.<br>
<br>
-<br>
Devang<br>
</div></div></blockquote></div><br>