[llvm-commits] Patch to delete PHI nodes with multiple uses

Duncan Sands baldrick at free.fr
Sun Feb 20 08:57:07 PST 2011


Hi Andrew,

> Yes, I thought that "areAllUsesEqualAndHasAtLeastOneUse" was too
> verbose.  Actually I was wondering why the instruction even needs
> multiple use entries in this case - why not collapse it to a single
> entry?  That would have made this change unnecessary.

I discussed this a little with Nick and we seem to agree that
RecursivelyDeleteDeadPHINodes should also delete phi nodes with
no uses, in which case your method can be changed to return true
when there are no uses.

Ciao, Duncan.

>
> Andrew
>
> On Sun, Feb 20, 2011 at 3:50 AM, Duncan Sands<baldrick at free.fr>  wrote:
>> Hi Andrew, AreAllUsesEqual returns false if there are no uses, but if there
>> are no uses then indeed all uses are equal (show me two that differ!).
>>
>> Ciao, Duncan.
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>




More information about the llvm-commits mailing list