[llvm-commits] PATCH: Teach the function cloner to prune dead basic blocks
chandlerc at gmail.com
Sun Mar 25 13:21:12 PDT 2012
On Sun, Mar 25, 2012 at 12:17 PM, Chris Lattner <clattner at apple.com> wrote:
> WeakVH is *substantially* more expensive than AssertingVH. The later is
> just a raw pointer when assertions are disabled.
Yep, but that's not what this patch changes. The value map is currently
using a *TrackingVH*, not an AssertingVH. My understanding is that
TrackingVH isn't substantially less expensive than WeakVH. Both have to be
updated on RAUW. WeakVH has to be updated on delete as well, but this patch
adds the first delete operations.
> The former requires densemap operations when a WeakVH is modified.
> Why is it expensive to update the value mapping?
We have to update everything that maps *to* the deleted instructions.
That's a full walk of the value map for each instruction deleted.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits