<div dir="ltr">I haven't been following the discussion that led to seeking a more compact syntax, but personally I think that adding sugar to the .ll syntax is not a good idea. The reason is that I generally find it more difficult to remember how to expand various infrequently-used/encountered sugars while reading than to wade through verbosity while reading.<div><br></div><div>Just my 2 cents.<br><div><br></div><div>-- Sean Silva</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 5, 2015 at 11:34 AM, Rafael EspĂ­ndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In order to make comdats always explicit in the IR, we decided to make<br>
the syntax a bit more compact for the case o a GlobalObject in a<br>
comdat with the same name.<br>
<br>
Just dropping the $name causes problems for<br>
<br>
@foo = globabl i32 0, comdat<br>
$bar = comdat ...<br>
<br>
and<br>
<br>
declare void @foo() comdat<br>
$bar = comdat ...<br>
<br>
so the attached patch changes the syntax to<br>
<br>
@foo = comdat $foo global i32 0<br>
<br>
and<br>
<br>
declare comdat $foo void @foo<br>
<br>
and as a syntactic sugar<br>
<br>
$foo = comdat ...<br>
@foo = comdat global ...<br>
<br>
is now equivalent to<br>
<br>
$foo = comdat ...<br>
@foo = comdat $foo global ...<br>
<br>
and<br>
<br>
$foo = comdat ...<br>
declare comdat void @foo(...<br>
<br>
is now equivalent to<br>
<br>
$foo = comdat ...<br>
declare comdat $foo void @foo(...<br>
<br>
It would be possible to take this one step further and make<br>
<br>
@foo = comdat global ...<br>
<br>
equivalent to<br>
<br>
$foo = comdat any<br>
@foo = comdat $foo global ...<br>
<br>
but it is not clear if that is worth it. It would require rejecting things like<br>
<br>
$foo = comdat largest<br>
@foo = comdat global...<br>
<br>
Maybe as an independent patch we could make all<br>
<br>
$foo = comdat any<br>
<br>
optional instead?<br>
<br>
Cheers,<br>
Rafael<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>