<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jun 12, 2014, at 9:02 AM, Philip Reames <<a href="mailto:listmail@philipreames.com">listmail@philipreames.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<div text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 06/12/2014 12:28 AM, Owen Anderson
wrote:<br>
</div>
<blockquote cite="mid:8244049A-C7C0-44AF-AABE-14AEC6080623@mac.com" type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<br>
<div>
<div>On Jun 11, 2014, at 11:29 PM, deadal nix <<a moz-do-not-send="true" href="mailto:deadalnix@gmail.com">deadalnix@gmail.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite"><span style="font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px; float:
none; display: inline !important;">It is gonna improve the
situation quite a lot for all frontend that use aggregate
loads (arguably, that is a bad practice, but that no reason
to stab people in the back when they do it anyway).</span><br>
</blockquote>
<br>
</div>
<div>I’m not sure I agree with that statement. If we don’t think
they should be used, not optimizing them is a good way to
discourage that. More generally, I’m concerned about how we
will ever get good test coverage of this code path, since we
don’t have any extant front ends that hit it.</div>
</blockquote>
I'm joining this discussion late, but a) why are aggregate loads bad
practice? Loading something like a small struct from memory with a
single load seems reasonable.</div></blockquote><div><br></div><div>They are not well supported through the code generator, and introducing them would add a lot of complexity. There are better solutions already in use. The only encouraged use case for first class structs is as multiple return values.</div><br><blockquote type="cite"><div text="#000000" bgcolor="#FFFFFF">b) There are frontends that are not
in tree. The fact that Deadal submitted the patch is a good hint
that *someone* cares.</div></blockquote><div><br></div><div>That’s not the same as saying that they *should* care. The project regularly makes policy and/or technical decisions that favor good practices over bad. As an extreme example, we don’t even try to promote non-entry-block allocas to virtual registers. Totally possible, but we have collectively decided that the extra complexity is not worth it when we can just tell frontend authors to adopt best practice and put their allocas in the entry block. This example is firmly in line with that.</div><div><br></div><div>Moreover, we generally prefer not to add functionality that is not exercised in open code. A single regression test is not good enough. That verifies that one case works, but we’ll never find the cases that don’t work, or that interact improperly with other optimizations, because we have no way of actually testing it live.</div><div><br></div><div>—Owen</div></div><br></body></html>