<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 5, 2015 at 1:00 PM, Christian Convey via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I'm working on an AA implementation, and I'm using abstract blocks to model the memory used to store the values of program variables.  <div><br></div><div>To be sound my analysis must ensure that all program objects which <i>might possibly</i> occupy the same chunk of runtime memory are modeled with the same abstract memory block.  I'm trying to understand if "external" linkage is a problem for me.</div><div><br></div><div>More concretely, suppose I have a Module which includes these declarations:</div><div><div>@Bar = external global i32</div><div>@Foo = external global i32</div></div><div><br></div><div>Is there any reasonable possibility that the linker will cause @Bar and @Foo to name the same piece of runtime memory?</div></div></blockquote><div><br></div><div>Yes, @Bar could be defined as a GlobalAlias to @Foo in another module.</div><div><br></div><div>The constant folder assumes @Bar and @Foo are distinct via areGlobalsPotentiallyEqual <<a href="http://llvm.org/docs/doxygen/html/ConstantFold_8cpp_source.html#l01382">http://llvm.org/docs/doxygen/html/ConstantFold_8cpp_source.html#l01382</a>></div><div><br></div><div>I'm not entirely sure if this is correct in the case where @Bar happens to be an alias for @Foo elsewhere... Nick, any ideas?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>FWIW, my AA algorithm considers only one llvm Module at a time, so from its perspective the final program is divided into two parts: what it sees in the current Module, and the mysterious, unknowable everything else.  Also, I need my algorithm to at least be sound for ELF targets, but ideally for all LLVM targets.</div><div><br></div><div>Thanks,</div><div>Christian</div><div><br></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div>