Initial support for copy elimination by commuting its definition MI.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 13 Feb 2008 03:01:43 +0000 (03:01 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 13 Feb 2008 03:01:43 +0000 (03:01 +0000)
commit70071434ae6080c09ffdc8e069da92619381b930
treea6d00881c3c6596e57f1b8a38fa7b8b860805161
parentba8d51c1d7bf4ada96ff27550ac3576b31323b3a
Initial support for copy elimination by commuting its definition MI.
PR1877.
A3 = op A2 B0<kill>
...
B1 = A3      <- this copy
...
   = op A3   <- more uses

==>

B2 = op B0 A2<kill>
...
B1 = B2      <- now an identify copy
...
   = op B2   <- more uses

This speeds up FreeBench/neural by 29%, Olden/bh by 12%, oopack_v1p8 by 53%.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47046 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/LiveIntervalAnalysis.h
lib/CodeGen/SimpleRegisterCoalescing.cpp
lib/CodeGen/SimpleRegisterCoalescing.h