<div dir="ltr">I tried to enumerate all combinations of linkage types and prevailingness among aliases, and wrote down the proposed transformations with both the current alias form and the proposed canonical alias form. See the doc below. In case this doesn't show up well in email (I can't seem to adjust the column widths), here is a link to a google doc version:<div>  <a href="https://docs.google.com/document/d/1tVrsCRPmhdPv5KZay-NkJ4fz2nJ8p-1DPYA1pyC0_HY/edit?usp=sharing">https://docs.google.com/document/d/1tVrsCRPmhdPv5KZay-NkJ4fz2nJ8p-1DPYA1pyC0_HY/edit?usp=sharing</a></div><div><br></div><div><div>Let me know if any of this looks wrong.</div><div><br></div><div>Thanks!</div><div>Teresa</div></div><div><span style="background-color:transparent;color:rgb(0,0,0);font-family:arial;font-size:26.6667px;white-space:pre-wrap"><br></span></div><div><span style="background-color:transparent;color:rgb(0,0,0);font-family:arial;font-size:26.6667px;white-space:pre-wrap">ThinLTO Aliases and Weak Resolution</span><br></div><div><span id="gmail-docs-internal-guid-0ea4d1b4-b317-f482-68ea-a3dd83905e57"><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">ThinLTO has information from the linker identifying prevailing and non-prevailing copies of weak symbols (“weak” here means WeakAny/LinkonceAny/WeakODR/LinkonceODR LLVM linkage types). We use that information to mark the non-prevailing copies of a weak symbol as available_externally in the index. This is used in the backend to change the linkage to available_externally (ODR types), or to drop to an external declaration (Any types, with D28806). However, this cannot be done if the symbol is either an alias or an aliasee, because available_externally aliases are not (currently) legal in LLVM IR (this restriction could theoretically be lifted for aliases, but an alias to an available_externally aliasee doesn’t make much sense).</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Current vs Proposed Canonical Alias forms:</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">1) Current alias form: </span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br class="gmail-kix-line-break"></span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">define [linkage_a] void @a() { ... }</span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br class="gmail-kix-line-break"></span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@b = [linkage_b] alias void (), void ()* @a</span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br class="gmail-kix-line-break"></span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br class="gmail-kix-line-break"></span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">2) In the proposed canonical form this becomes:</span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br class="gmail-kix-line-break"></span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">define private void @0() { ... }</span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br class="gmail-kix-line-break"></span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@a = [linkage_a] alias void (), void ()* @0</span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br class="gmail-kix-line-break"></span><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@b = [linkage_b] alias void (), void ()* @0</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Here is a table of transformed sequences, for various permutations of linkage types and prevailingness (P=Prevailing, N=Non-prevailing). Those in italics (first 8 rows) are already done as they are straightforward.</span></p><br><br><div dir="ltr" style="margin-left:0pt"><table style="border:none;border-collapse:collapse;width:624px"><colgroup><col width="131"><col width="146"><col width="207"><col width="206"><col width="*"></colgroup><tbody><tr style="height:0px"><td style="border-width:2px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap">linkage_b (alias)</span></p></td><td style="border-width:2px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap">linkage_a (aliasee)</span></p></td><td style="border-width:2px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap">Current form</span></p></td><td style="border-width:2px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap">Proposed form</span></p></td><td style="border-width:2px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-weight:700;vertical-align:baseline;white-space:pre-wrap">Notes</span></p></td></tr><tr style="height:0px"><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">external OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">internal OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">private</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkonce_odr (P) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">weak_odr (P)</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_a -> weak_odr</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_a -> weak_odr</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">Done</span></p></td></tr><tr style="height:0px"><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">external OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">internal OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">private</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkonce (P) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">weak (P)</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_a -> weak</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_a -> weak</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">Done</span></p></td></tr><tr style="height:0px"><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkonce_odr (P) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">weak_odr (P)</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">external OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">internal OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">private OR</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_b -> weak_odr</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_b -> weak_odr</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">Done</span></p></td></tr><tr style="height:0px"><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkonce_odr (P) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">weak_odr (P)</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkonce_odr (P) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">weak_odr (P) OR</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_b -> weak_odr</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_a -> weak_odr</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_b -> weak_odr</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">inkage_a -> weak_odr</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">Done</span></p></td></tr><tr style="height:0px"><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkonce_odr (P) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">weak_odr (P)</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkonce (P) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">weak (P)</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_b -> weak_odr</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_a -> weak</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_b -> weak_odr</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">inkage_a -> weak</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">Done</span></p></td></tr><tr style="height:0px"><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkonce (P) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">weak (P)</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">external OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">internal OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">private OR</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_b -> weak</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_b -> weak</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">Done</span></p></td></tr><tr style="height:0px"><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkonce (P) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">weak (P)</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkonce_odr (P) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">weak_odr (P) OR</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_b -> weak</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_a -> weak_odr</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_b -> weak</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_a -> weak_odr</span></p></td><td style="border-width:2px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">Done</span></p></td></tr><tr style="height:0px"><td style="border-width:2px 1px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkonce (P) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">weak (P)</span></p></td><td style="border-width:2px 1px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkonce (P) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">weak (P)</span></p></td><td style="border-width:2px 1px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_b -> weak</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_a -> weak</span></p></td><td style="border-width:2px 1px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_b -> weak</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">linkage_a -> weak</span></p></td><td style="border-width:2px 1px 1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;font-style:italic;vertical-align:baseline;white-space:pre-wrap">Done</span></p></td></tr><tr style="height:0px"><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">external OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">internal OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">private</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkonce_odr (N) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">weak_odr (N)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkage_a -> available_externally</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@b -> RAUW @a, delete @b</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">1) @a = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">2) linkage_a -> available_externally (copy of @0)</span></p><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">(no change to @b/@0)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">With Proposed form and alternative 1), we lose the ability to inline @a. With alternative 2, which requires a bit more work, we have an extra (private) copy of def (if not completely inlined/eliminated)</span></p></td></tr><tr style="height:0px"><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">external OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">internal OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">private</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkonce (N) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">weak (N)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@a = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@a.1 = private (def)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@b = [linkage_b] alias @a.1</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@a = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">(no change to @b/@0)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><br></td></tr><tr style="height:0px"><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkonce_odr (N) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">weak_odr (N)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">external OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">internal OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">private</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">1) @b = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">2) @b = available_externally (copy of @a)</span></p><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">(no change to @a)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">1) @b = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">2) linkage_b -> available_externally (copy of @0)</span></p><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">(no change to @a/@0)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">With alternatives 1) we lose the ability to inline @b. With alternatives 2) we retain it at the expense of a bit more work.</span></p></td></tr><tr style="height:0px"><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkonce_odr (N) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">weak_odr (N)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkonce_odr (N) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">weak_odr (N)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkage_a -> available_externally</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@b -> RAUW @a, delete @b</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">1) @a = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@b = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">2) linkage_a -> available_externally (copy of @0)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkage_b -> available_externally (copy of @0)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">See earlier notes about tradeoffs of alternatives 1 and 2 for Proposed form.</span></p></td></tr><tr style="height:0px"><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkonce_odr (N) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">weak_odr (N)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkonce (N) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">weak (N)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@a = external (decl)</span></p><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">1) @b = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">2) @b = available_externally (copy of @a)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@a = external (decl)</span></p><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">1) @b = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">2) linkage_b -> available_externally (copy of @0)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">With Current form we do the transformation in a couple steps (first by handling the non-prevailing aliasee as described earlier, then by handling the non-prevailing ODR alias as described elsewhere above).</span></p><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">See earlier notes about tradeoffs between alternatives 1 and 2 for both forms.</span></p></td></tr><tr style="height:0px"><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkonce (N) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">weak (N)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">external OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">internal OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">private</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@b = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">(no change to @a)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@b = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">(no change to @a/@0)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><br></td></tr><tr style="height:0px"><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkonce (N) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">weak (N)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkonce_odr (N) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">weak_odr (N)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkage_a -> available_externally</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@b = external (decl)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">1) @a = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">2) linkage_a -> available_externally (copy of @0)</span></p><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@b = external (decl)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">See earlier notes about tradeoffs between alternatives 1 and 2 for Proposed form.</span></p></td></tr><tr style="height:0px"><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkonce (N) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">weak (N)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">linkonce (N) OR</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">weak (N)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@a = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@b = external (decl)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@a = external (decl)</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">@b = external (decl)</span></p></td><td style="border-width:1px;border-style:solid;border-color:rgb(0,0,0);vertical-align:top;padding:7px"><br></td></tr></tbody></table></div><br><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">If we lift the restriction on having available_externally aliases, then all the alternatives 1 and 2 above collapse to a simple conversion of the corresponding linkage type to available_externally.</span></p><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">There is only one place that ends up suboptimal (in code size) in the Proposed form: alias is external/internal/private and aliasee is a non-prevailing ODR. Even with alternative 2 we end up with an extra copy of the function if we want to enable inlining. That is, unless we put in more work to look for strong aliases to @0 and RAUW them to the newly available_externally @a (doable, ends up with the same IR as the Current form for this case).</span></p><div><span style="font-size:14.6667px;font-family:arial;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br></span></div></span></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 18, 2017 at 7:37 AM, Teresa Johnson <span dir="ltr"><<a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Jan 18, 2017 at 7:34 AM, Rafael Avila de Espindola <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"><span>Teresa Johnson <<a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a>> writes:<br>
> Ok, thanks. But how does that property work the strongalias case from the<br>
> original email. E.g.:<br>
><br>
> @f = weak global ...<br>
> @strongalias = alias @f<br>
><br>
> What we had concluded was that it should be transformed into the following<br>
> when this copy of @f is non-prevailing:<br>
><br>
> @f = external global<br>
> @f.llvm.1 = internal global ...   // Internalized copy of original @f<br>
> @strongalias = alias @fv.llvm.1<br>
<br>
</span>I would use private instead of insternal, but yes, that is it.<br></blockquote><div><br></div></span><div>Right, it should be private.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span><br>
> Maybe we are just using different terminology for the same thing, but in<br>
> this case it seems as though we have broken the link between the original<br>
> alias @f and aliasee @strongalias? Or is the point that we haven't broken<br>
> the link between the value in this module of @f (copied to @f.llvm.1) and<br>
> @strongalias?<br>
<br>
</span>Correct. The two origial symbols would still point to the save thing. It<br>
is just that one of the symbols is not used and is dropped. This is the<br>
case that becames simpler if the IR is required to be written as<br>
<br>
@data = private global....<br>
@f = weak alias @data<br>
@strongalias = alias @data<br></blockquote><div><br></div></span><div>Ok thanks,</div><div>Teresa</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><span class=""><br><br clear="all"><div><br></div>-- <br><div class="m_-2449861038396817201gmail_signature" data-smartmail="gmail_signature"><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> <a href="tel:(408)%20460-2413" value="+14084602413" target="_blank">408-460-2413</a></td></tr></tbody></table></span></div>
</span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 408-460-2413</td></tr></tbody></table></span></div>
</div>