[llvm-commits] patch: smarter DSE

Nick Lewycky nlewycky at google.com
Mon Oct 31 11:22:39 PDT 2011


On 31 October 2011 10:23, Owen Anderson <resistor at mac.com> wrote:

> Nick,
>
> Isn't what you're computing here an approximation of immediate
> post-dominance?  If we really want to handle this properly, it seems like
> we should just use the actual post-dominance computation rather than
> approximating it.
>

Heh, an earlier version of my patch actually called that function
FindPostIdoms.

No, simply looking at postdoms would actually do the wrong thing. Consider
a CFG "A -> {B, C}, B -> D, C -> D": the matching postdom tree is "D -> {A,
B, C}". Given a free in block D we would look for and delete stores in A.
Trouble is, those aren't necessarily dead as there may be uses in B and C.
That's why I explicitly check through the preds.

Nick

--Owen
>
> On Oct 31, 2011, at 1:54 AM, Nick Lewycky wrote:
>
> > This patch teaches DSE to look for blocks that will unconditionally land
> in the particular free call, when handling a call to free. This is
> important for std::vector, see PR11240.
> >
> > Please review!
> >
> > Nick
> > <pr11240-1.patch>_______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111031/a6abc3eb/attachment.html>


More information about the llvm-commits mailing list