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

Andrew Clinton ajclinto at gmail.com
Sat Feb 19 13:13:44 PST 2011


This is a simple patch to improve RecursivelyDeleteDeadPHINode so that
it will delete PHIs that have multiple identical uses (self
references).

The DeletePHIs.cpp is a pass to test it, along with delete-phis.ll.
I'm not sure whether this test needs to be added to the baseline or if
so, where to put it.  Run the test with:

opt -load ../../../Debug+Asserts/lib/LLVMDeletePHIs.so <
delete-phis.ll -delete-phis -S

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deletephis.diff
Type: text/x-patch
Size: 1647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110219/1b902b20/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DeletePHIs.cpp
Type: text/x-c++src
Size: 1318 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110219/1b902b20/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: delete-phis.ll
Type: application/octet-stream
Size: 370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110219/1b902b20/attachment.obj>


More information about the llvm-commits mailing list