<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 12/04/2014 04:11 PM, Richard Smith
wrote:<br>
</div>
<blockquote
cite="mid:CAOfiQq=HCrp1=SnpWGsY3avMG03hRi3PZZve91wAvznDm8gWsw@mail.gmail.com"
type="cite">
<div dir="ltr">When Clang emits a call to a C++14 sized
deallocation function, it emits a weak definition of that
function in case the underlying C++ ABI library doesn't provide
it:
<div><br>
</div>
<div> call _ZdlPvm(i8* %p, i64 8) builtin</div>
<div><br>
</div>
<div>// ...</div>
<div><br>
</div>
<div> define linkonce void @_ZdlPvm(i8* %p, i64) nobuiltin {</div>
<div> call void @_ZdlPvm(i8* %p)</div>
<div> ret void</div>
<div> }</div>
<div><br>
</div>
<div>However, LLVM's detection of deallocation functions is
broken by this: it assumes that if we have a definition of the
deallocation function, then it's not really a deallocation
function. I'm not sure why this is the case. The check was
added in response to this review comment:</div>
<div><br>
</div>
<div> <a moz-do-not-send="true"
href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20091102/090282.html">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20091102/090282.html</a><br>
</div>
<div><br>
</div>
<div>The attached patch removes this condition (and thus avoids
the optimization regression in C++14 mode), but I'm wary about
removing a check that I don't understand, so I was wondering
if anyone knew the justification for having this test?</div>
</div>
</blockquote>
Reading over the review comment, the point of the comment in
question was how to do the comparison of the call's target against
the free function. I suspect the declaration check was accidental.
<br>
<br>
<br>
<blockquote
cite="mid:CAOfiQq=HCrp1=SnpWGsY3avMG03hRi3PZZve91wAvznDm8gWsw@mail.gmail.com"
type="cite">
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
llvm-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
</blockquote>
<br>
</body>
</html>