Optimize around the fact that pred_iterator is slow: instead of sorting
authorDan Gohman <gohman@apple.com>
Fri, 30 Oct 2009 23:15:21 +0000 (23:15 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 30 Oct 2009 23:15:21 +0000 (23:15 +0000)
commit1107c63efe3bc39965bf85f823b0aed65d4bb166
tree3bc6efe871062f5adf985818ee63f42f8fa4099b
parent9c41fa87eac369d84f8bfc2245084cd39f281ee4
Optimize around the fact that pred_iterator is slow: instead of sorting
PHI operands by the predecessor order, sort them by the order used by the
first PHI in the block. This is still suffucient to expose duplicates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85634 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp