<div dir="ltr"><div>Hi Matt,</div><div> </div><div>Thanks for the answer. Unfortunately it does not seem to work.</div><div> </div><div>Putting the NoDuplicate on the CallInst of an inline assembly gives the message:</div>
<div> </div><div>   Attribute 'noduplicate' only applies to functions!</div><div> </div><div>Putting the NoDuplicate on the function in which the inline assembly resides has not effect. Also adding</div><div>the MinSize or OptimizeForSize attribute does not stop tail duplication. Another suggestion?</div>
<div> </div><div>Regards,</div><div>Jan.<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 17, 2014 at 6:33 PM, Matt Arsenault <span dir="ltr"><<a href="mailto:arsenm2@gmail.com" target="_blank">arsenm2@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 class="HOEnZb"><div class="h5"><br>
On Jul 17, 2014, at 8:41 AM, Jan Hoogerbrugge <<a href="mailto:jan.hoogerbrugge@gmail.com">jan.hoogerbrugge@gmail.com</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> For a certain type of analysis I generate inline assembly which I insert into the LLVM IR code. This<br>
> inline assembly code contains labels that should not be duplicated. Problem is that the tail<br>
> duplication pass duplicates code. It checks isNotDuplicatable on a machine instruction however<br>
> there is no such a flag on an IR instruction that I could set. Is there a way to tell in an IR pass<br>
> that code should not be duplicated?<br>
><br>
> Jan<br>
<br>
</div></div>There is the noduplicate attribute you can place on the function definition / the asm call site which should work<br>
<span class="HOEnZb"><font color="#888888"><br>
-Matt</font></span></blockquote></div><br></div>