[llvm-commits] Code hoisting in GVN

Rotem, Nadav nadav.rotem at intel.com
Mon Jul 30 16:08:33 PDT 2012


Hi,


Please review the attached patch.

This patch adds code hoisting to GVN.  Currently, SimplifyCFG has a simple code hoisting procedure which scans both THEN and ELSE blocks of the branch and hoists instructions from both sides if they are identical.  The problem is that this linear scan is unable to find common code.  The alternative is to perform an N*M scan of the instructions in both blocks and find duplicated instructions. This patch implements the quadratic scan in GVN and has a threshold on the number of instructions to scan.  It gives a modest 1.5% speedup to SciMark2::MonteCarlo.

Thanks,
Nadav
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120730/23ec700a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hoist.diff
Type: application/octet-stream
Size: 10677 bytes
Desc: hoist.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120730/23ec700a/attachment.obj>


More information about the llvm-commits mailing list