<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 9, 2018 at 11:42 PM Tim Northover <<a href="mailto:t.p.northover@gmail.com">t.p.northover@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 9 Oct 2018 at 21:03, Gleb Popov via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
> Won't @llvm.returnaddress() always get me correct location of my inline asm block?<br>
<br>
Why would it? That's the address of the callee and there's no reason<br>
it should correlate with anything whatsoever in the current function.<br></blockquote><div><br></div><div>Right, I just confused it with blockaddress constant.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Before now it sounded like you were using that as some way to trick<br>
LLVM into keeping your block around, which would have no effect on its<br>
position.<br></blockquote><div><br></div><div>That's correct, I used returnaddress to trick optimizer and blockaddress to actually get a pointer to my data inside the function. Sorry for mixing it up.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers.<br>
<br>
Tim.<br>
</blockquote></div></div>