<div dir="ltr">+debugger cabal, for visibility.<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 10, 2017 at 1:46 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I suspect removing this isn't the right option - changing its value to 'undef' (as done in the other review you sent, for arguments that were actually promoted/changed their type) is probably best.<br><br>Nothing's going to work perfectly here. The user's going to be confused by the missing parameter, or the debuggers going to be confused when it tries to call the function with this parameter & it doesn't match the ABI anymore, etc... - I don't think there's a good answer at the moment.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 30, 2017 at 8:27 AM Reid Kleckner via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">rnk added inline comments.<br>
<br>
<br>
================<br>
Comment at: lib/Transforms/IPO/ArgumentPromotion.cpp:135<br>
+<br>
+      BasicBlock &BB = F->getEntryBlock();<br>
+      SmallVector<Instruction*, 8> InstrsToRemove;<br>
----------------<br>
There's no reason to believe the only uses of the argument will appear in the entry block. I think you really want to do `I->replaceAllUsesWith(undef)` to replace all metadata uses of the argument. Some other pass (instcombine?) can clean up the useless dbg.value instructions. That's what the dead argument elimination pass does, anyway.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D34874" rel="noreferrer" target="_blank">https://reviews.llvm.org/D34874</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></blockquote></div></div>