[llvm-dev] RFC: Strong GC References in LLVM

Daniel Berlin via llvm-dev llvm-dev at lists.llvm.org
Fri Jul 15 16:35:42 PDT 2016


On Fri, Jul 15, 2016 at 4:27 PM, Andrew Trick <atrick at apple.com> wrote:

>
> On Jul 15, 2016, at 4:21 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
>
> Doing a CFG walk instead of a PostDom walk is typically not such a big
>> deal.
>>
>
> Using post-dom to approximate classical control dependence, as we do in
> several places, has led to a mess nobody quite understands in those places.
>
> But, like i said, i have a plan to fix this by making post-dom updates
> automatic. There are now incremental dominance update algorithms that are
> very fast in the common case (IE 100x faster than computing from scratch)
> and even in the very pathological cases, 2x faster than computing from
> scratch.  This comes out to "fast enough" to maintain postdom without
> anyone having to think about anything other than saying "i added an edge"
> or "i deleted an edge”.
>
>
> Ok, I do love incremental domtree update. It’s just that for postdom you
> have to be aware of addition/removal of maythrow sort of calls.
>

These create block edges in the post-dom tree, even now (or at least, they
have to for correctness).  They still will be then.  So it'll just be an
edge add/removal  in the actual tree ;)
>From an API standpoint, the only thing an API would actually care about for
this is the block they were added/removed from, and the count of such calls
before add/removal (If there are any, you need an edge, if there are none,
you don't).

So as long as things changing these types of calls (or erasing/duplicating
them) notify postdom, it'll still work just fine.

That seems doable.



> 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.
>>
>
> I still don’t know how to talk about a load’s dependencies without calling
> it “control dependence”
>

Yeah, i'm working on it :)


>
> -Andy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160715/9ae0e4d0/attachment.html>


More information about the llvm-dev mailing list