[llvm-dev] RFC: Stop using redundant PHI node entries for multi-edge predecessors

Chandler Carruth via llvm-dev llvm-dev at lists.llvm.org
Mon May 1 10:18:19 PDT 2017


On Mon, May 1, 2017 at 9:30 AM Sanjoy Das via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Also, IIUC, today deleting an edge from A to B only requires
> removeIncomingValue(A) on B's PHI nodes, but after this change you'll
> have to check if you're deleting the last edge or not.
>

Are there many places where this is a feature rather than a bug though?

I didn't do a survey of every caller of removeIncomingValue, but the 4 or 5
I looked at were all inside of a loop already. Which actually means they
would get more efficient with this change, if in some cases needing to keep
a set around.

This doesn't seem too bad to me, but again, maybe I'm looking at the wrong
bits of code. Is there specific code you have in mind that wants to remove
one edge (but not one predecessor block)?


>
> Can (2), (3) and (4) be fixed by changing the API instead of the
> deeper IR change you're proposing?
>

Maybe, but I don't see easy ways. Ideas?


>
> -- Sanjoy
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170501/4dd12847/attachment.html>


More information about the llvm-dev mailing list