<div dir="ltr"><div>I don't think it makes the grammar ambiguous, so it seems like it could be fixed.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 29, 2019 at 11:32 AM Krzysztof Parzyszek <<a href="mailto:kparzysz@quicinc.com">kparzysz@quicinc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Bitcode parser doesn’t like “numerical” names for parameters:<br>
<br>
opt: <stdin>:1:22: error: expected ')' at end of argument list<br>
define void @foo(i32 %0) {<br>
^<br>
<br>
--<br>
Krzysztof Parzyszek mailto:<a href="mailto:kparzysz@quicinc.com" target="_blank">kparzysz@quicinc.com</a> AI tools development<br>
<br>
From: llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>> On Behalf Of Reid Kleckner via llvm-dev<br>
Sent: Monday, July 29, 2019 1:14 PM<br>
To: Hans Wennborg <<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>><br>
Cc: <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>; mohamed messelka <<a href="mailto:m14m@live.fr" target="_blank">m14m@live.fr</a>><br>
Subject: [EXT] Re: [llvm-dev] Arguments name IR LLVM<br>
<br>
On Mon, Jul 29, 2019 at 4:39 AM Hans Wennborg via llvm-dev <mailto:<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
The arguments are unnamed, which means they will be implicitly named %0, %1, %2.<br>
<br>
OP's use case for the names aside, I think we should consider changing LLVM's IR printer to print unnamed arguments in function definitions as %0, %1, etc, like we do for instructions. We can skip the names for Function declarations since nothing can refer to them, but it's confusing to see %0 references with no definition. Unnamed BBs are another common source of confusion, but I'd leave that alone for now.<br>
<br>
Reid<br>
</blockquote></div></div>