<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000'><br><hr id="zwchr"><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Andrew Trick" <atrick@apple.com><br><b>To: </b>"Sanjoy Das" <sanjoy@playingwithpointers.com><br><b>Cc: </b>"Daniel Berlin" <dberlin@dberlin.org>, "llvm-dev" <llvm-dev@lists.llvm.org>, "Joseph Tremoulet" <jotrem@microsoft.com>, "Oscar Blumberg" <oscar.blumberg@normalesup.org>, "Chandler Carruth" <chandlerc@gmail.com>, "Nick Lewycky" <nlewycky@google.com>, "Hal Finkel" <hfinkel@anl.gov>, "Philip Reames" <listmail@philipreames.com>, "Manuel Jacob" <me@manueljacob.de>, "Eli Friedman" <eli.friedman@gmail.com>, "David Majnemer" <david.majnemer@gmail.com><br><b>Sent: </b>Friday, July 15, 2016 6:00:12 PM<br><b>Subject: </b>Re: RFC: Strong GC References in LLVM<br><br>
<br class=""><div><blockquote class=""><div class="">On Jul 15, 2016, at 3:38 PM, Sanjoy Das <<a href="mailto:sanjoy@playingwithpointers.com" class="" target="_blank">sanjoy@playingwithpointers.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline ! important;" class="">> Note that this is also necessary to makes post-dominance correct (but we</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline ! important;" class="">> already do it in most cases, but i think there are still bugs open about</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline ! important;" class="">> correctness)</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline ! important;" class="">Yeah, right now in LLVM we cannot rely on post-dominance to conclude</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline ! important;" class="">"guaranteed to execute" which isn't ideal.  There's at least one place</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline ! important;" class="">I know where a more precise post-dominance could be used. :)</span></div></blockquote></div><div class=""><br class=""></div>I completely understand the philosophical criticism, but<div class=""><br class=""><div id="DWT10749" class="">- LLVM clearly made the decision/tradeoff to allow implicit early exits, and I’m pretty certain that will never change.</div></div></blockquote>Why? A decision was made to give pointers types, and we've decided to change that. It is not clear to me that the decision to allow implicit early exits was, in retrospect, optimal. I think it is completely healthy for the project to reevaluate these kinds of decisions. We now have many years of experience, bug reports, and we should have a good ability to evaluate the compile-time impact of a potential change.<br><br> -Hal<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div class=""><div class=""></div><div class=""><br class=""></div><div class="">- LLVM made the decision/tradeoff not to maintain a postdom tree throughout most of the pass pipeline</div><div class=""><br class=""></div><div class="">- Fundamentally, you don’t really lose anything. It’s an easy analysis to find the exit points and mark blocks. Doing a CFG walk instead of a PostDom walk is typically not such a big deal.</div></div><div class=""><br class=""></div><div class="">The fundamental problem relevant to Precise GCRef is that the dependence between program conditions and loads can’t be expressed. </div><div class=""><br class=""></div><div class="">I often overload the term “control dependence” here. When I say a load is control dependent on a branch, I don’t mean that the load’s block is classically control dependent on the branch, I mean that the load is illegal to speculate above the branch. Yes they are two different things, but I don’t have a better term to use for that dependence information.</div><div class=""><br class=""></div><div class="">-Andy</div></blockquote><br><br><br>-- <br><div><span name="x"></span>Hal Finkel<br>Assistant Computational Scientist<br>Leadership Computing Facility<br>Argonne National Laboratory<span name="x"></span><br></div></div></body></html>