<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 28, 2016 at 12:23 AM, vivek pandya <span dir="ltr"><<a href="mailto:vivekvpandya@gmail.com" target="_blank">vivekvpandya@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Sat, May 28, 2016 at 12:21 AM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
> On May 27, 2016, at 11:49 AM, vivek pandya <<a href="mailto:vivekvpandya@gmail.com" target="_blank">vivekvpandya@gmail.com</a>> wrote:<br>
><br>
> Hello Mentors,<br>
><br>
> I have completed writing simple register mask calculator pass, an immutable pass that stores RegMasks and provides API to query them, and a target specific pass for X86 target which currently iterates through all MI in given MF and if a call instruction is found then it quires for RegMask to Immutable pass and prints which registers are clobbered and preserved as per actual register allocation for callee function.<br>
><br>
> So now I need to update RegMask for call instruction, so as per our previous discussion on IRC if we add a method to update RegMask, Do we have to do it in target specific way? Is it possible to have RegMask at fixed position in Operands array in MI? Also provide some more details on updating cached RegMask in various other class.<br>
<br>
</span>Add a method "setOperandMask()" in class MachineOperand, and then when you find a call you just walk all the operands till you find one which "isRegMask()" at which point you can update it.<br>
<span><font color="#888888"><br></font></span></blockquote></span><div>Ok.</div></div></div></div></blockquote><div><br></div><div>Is it ok to add "setRegMaskOperand()" in class MI and looping through operands to find RegMask is also included in method ?</div><div>-Vivek</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="HOEnZb"><font color="#888888"><div>-Vivek </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><font color="#888888">
--<br>
Mehdi<br>
<br>
<br>
</font></span></blockquote></font></span></div><br></div></div>
</blockquote></div><br></div></div>