<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;"><br><div><div>On Mar 10, 2014, at 11:52 AM, Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com">dexonsmith@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br>On Mar 10, 2014, at 11:35 AM, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br><br><blockquote type="cite">Duncan recently reminded me that Module::getOrInsertFunction can<br>rename globals to make the new one fit. That is fairly surprising,<br>given the name of the function and what a central part of llvm it is.<br><br>Going over git log it looks like this was done to help with the<br>transition out of type planes. I have already done a simple "ninja<br>check-all" and both clang's and llvm's tests are clear. I will also<br>try a bootstrap and running the llvm testsuite.<br><br>Is the attached patch OK if all of the above works?<br><br>Cheers,<br>Rafael<br><t.patch><br></blockquote><br>I actually started with this (see [1]), but I imagined some use cases where<br>the current behaviour might be correct.  For example, what if someone gives<br>a static function the same name as a libc function that they aren’t using<br>(and maybe don’t even know about), and then LLVM inserts a use of the libc<br>function.  Should this use call their potentially unrelated function, or<br>the libc function?<br></blockquote>Also possible to hit this on LTO with static C functions.  That is, </div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(187, 44, 162);">static<span style="color: #000000"> </span>int<span style="color: #000000"> foo()</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(187, 44, 162);"><span style="color: #000000"><br></span></div><div style="margin: 0px;"><font face="Menlo"><span style="font-size: 11px;">is this in the IR when its a C file.  Linking 2 of these IR files together needs to ensure we don’t clash on names.</span></font></div><div style="margin: 0px;"><font face="Menlo"><span style="font-size: 11px;"><br></span></font></div><div style="margin: 0px;"><div style="margin: 0px; font-size: 11px; font-family: Menlo;">define internal i32 @foo() nounwind ssp uwtable</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Thanks,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Pete</div></div><blockquote type="cite"><br>[1]: <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140224/206842.html">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140224/206842.html</a><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></body></html>