[llvm-dev] RFC: Strong GC References in LLVM
Hal Finkel via llvm-dev
llvm-dev at lists.llvm.org
Fri Jul 15 16:48:30 PDT 2016
----- Original Message -----
> From: "Andrew Trick" <atrick at apple.com>
> To: "Sanjoy Das" <sanjoy at playingwithpointers.com>
> Cc: "Daniel Berlin" <dberlin at dberlin.org>, "llvm-dev"
> <llvm-dev at lists.llvm.org>, "Joseph Tremoulet"
> <jotrem at microsoft.com>, "Oscar Blumberg"
> <oscar.blumberg at normalesup.org>, "Chandler Carruth"
> <chandlerc at gmail.com>, "Nick Lewycky" <nlewycky at google.com>, "Hal
> Finkel" <hfinkel at anl.gov>, "Philip Reames"
> <listmail at philipreames.com>, "Manuel Jacob" <me at manueljacob.de>,
> "Eli Friedman" <eli.friedman at gmail.com>, "David Majnemer"
> <david.majnemer at gmail.com>
> Sent: Friday, July 15, 2016 6:00:12 PM
> Subject: Re: RFC: Strong GC References in LLVM
> > On Jul 15, 2016, at 3:38 PM, Sanjoy Das <
> > sanjoy at playingwithpointers.com > wrote:
> > > Note that this is also necessary to makes post-dominance correct
> > > (but we
> > > already do it in most cases, but i think there are still bugs
> > > open
> > > about
> > > correctness)
> > Yeah, right now in LLVM we cannot rely on post-dominance to
> > conclude
> > "guaranteed to execute" which isn't ideal. There's at least one
> > place
> > I know where a more precise post-dominance could be used. :)
> I completely understand the philosophical criticism, but
> - LLVM clearly made the decision/tradeoff to allow implicit early
> exits, and I’m pretty certain that will never change.
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.
> - LLVM made the decision/tradeoff not to maintain a postdom tree
> throughout most of the pass pipeline
> - 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.
> The fundamental problem relevant to Precise GCRef is that the
> dependence between program conditions and loads can’t be expressed.
> 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.
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev