[llvm-dev] RFC: Strong GC References in LLVM
Andrew Trick via llvm-dev
llvm-dev at lists.llvm.org
Fri Jul 15 16:00:12 PDT 2016
> 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.
- 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev