<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>I’ve discussed offline with Bill Wendling and we came up with the following proposal:</div><div><br></div><div>We could scan the uses of the global variables and exculde from the candidates those that are used (directly or transitively via bit casts) in landing pad instructions or inline asm.</div><div><br></div><div>To fix the problem of potentially hardcoded reference of a global in inline assembly statement, the user must put a "used" attribute on the related global variable. Then, variables used into an appending global instruction would be filtered out too. (This is how the problem is fixed for functions called from inline asm).</div><div><br></div><div>I’m writing a patch in that direction.</div><div><br></div><div>In the meantime, if you have any concern/comment, feel free to ask.</div><div><br></div><div>Thanks again for your help,</div><br><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">-Quentin</div>

</div>
<br><div><div>On Mar 13, 2013, at 12:58 PM, Quentin Colombet <<a href="mailto:qcolombet@apple.com">qcolombet@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Thanks Anton.<div><br></div><div>Seems like we are back to square one and in fact even worse, according to Duncan’s comment on inline assembly, the current approach may be wrong!</div><div><br></div><div>Ideas?</div><div><br><div apple-content-edited="true"><div style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">-Quentin</div></div><br><div><div>On Mar 13, 2013, at 12:40 PM, Anton Korobeynikov <<a href="mailto:anton@korobeynikov.info">anton@korobeynikov.info</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><blockquote type="cite">If I understand correctly this PR, it is not possible to create aliases to<br>the middle of a structure for Mach-O target.<br>What is the current status for other targets?<br></blockquote>I believe you can create more or less arbitrary aliases on ELF targets<br>only. Everywhere else there are serious limitations<br><br>--<span class="Apple-converted-space"> </span><br>With best regards, Anton Korobeynikov<br>Faculty of Mathematics and Mechanics, Saint Petersburg State University</div></blockquote></div><br></div>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></div></blockquote></div><br></body></html>