<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Nov 15, 2016, at 9:02 PM, Ben Ng &lt;<a href="mailto:me@benng.me" class="">me@benng.me</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">Hi Michael,<br class=""><br class="">No, I did not. I don't see swift-dev in the cc line of your email... this might be an issue with the Inbox for iOS client that I'm using.<br class=""></div></blockquote><div><br class=""></div><div>Ok! This happens sometimes (hit reply instead of reply-all or the like). +CC swift-dev.</div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Nov 16, 2016 at 12:01 AM Michael Gottesman &lt;<a href="mailto:mgottesman@apple.com" class="">mgottesman@apple.com</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Nov 15, 2016, at 8:54 PM, Ben Ng &lt;<a href="mailto:me@benng.me" class="gmail_msg" target="_blank">me@benng.me</a>&gt; wrote:</div><br class="m_-5142779043328067655Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div style="white-space:pre-wrap" class="gmail_msg">Hi Michael,<br class="gmail_msg"><br class="gmail_msg">It can probably be stuck in the Array Value Propagation pass since its pretty similar. Yes, it uses Array semantics. I isolated it in a separate file because it's my first time working on the Swift compiler and I wanted to keep the moving parts to a minimum.<br class="gmail_msg"></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">Ok. I was just saying this transformation is small enough it probably makes sense not to have a pass just for it. That is all.</div></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div style="white-space:pre-wrap" class="gmail_msg"><br class="gmail_msg">Am I confusing the nouns? i.e Is a pass the same thing as a transform?</div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">No you are not confusing anything. A pass is a transform.&nbsp;</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Also, did you remove swift-dev for a reason? Can I re-add?</div></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Michael</div></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Tue, Nov 15, 2016 at 11:49 PM Michael Gottesman &lt;<a href="mailto:mgottesman@apple.com" class="gmail_msg" target="_blank">mgottesman@apple.com</a>&gt; wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Question, is there any reason why you want to create a new pass? We already have array semantic ops. Maybe stick this there?<br class="gmail_msg">
<br class="gmail_msg">
+CC Arnold who is more familiar with this area.<br class="gmail_msg">
<br class="gmail_msg">
Sent from my iPhone<br class="gmail_msg">
<br class="gmail_msg">
&gt; On Nov 15, 2016, at 5:17 PM, Ben Ng via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="gmail_msg" target="_blank">swift-dev@swift.org</a>&gt; wrote:<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; Good evening, folks.<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; I’ve been working on a high-level SIL optimization pass that replaces an application of the `+=` function with an application of `Array.concat(A: Element)`. I’m blocked because I can’t figure out how to get a FuncRef to `Array.append` from the SILTransform.<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; I’ve tried getting the stdlib module from the ASTContext, and looking through the visible decls, but the function that I want isn’t there. The next thing I was going to try was recursively looking through the imports, but I thought I’d stop to do a sanity check with the mailing list.<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; It seems like even if I did succeed in getting a FuncRef to the generic `Array.append`, I’d still need to figure out how to get the specialized version, and add the appropriate declaration to the SIL. It also feels wrong that I’m depending on stuff in the AST from a SILTransform.<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; Thanks,<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; Ben<br class="gmail_msg">
&gt; _______________________________________________<br class="gmail_msg">
&gt; swift-dev mailing list<br class="gmail_msg">
&gt; <a href="mailto:swift-dev@swift.org" class="gmail_msg" target="_blank">swift-dev@swift.org</a><br class="gmail_msg">
&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-dev</a><br class="gmail_msg">
</blockquote></div>
</div></blockquote></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></body></html>