[MachineSink] Improve runtime performance. NFC.
authorArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>
Mon, 15 Jun 2015 09:09:06 +0000 (09:09 +0000)
committerArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>
Mon, 15 Jun 2015 09:09:06 +0000 (09:09 +0000)
commitd8673edc2d0efd7e5963db40e5b5c8e620494af8
tree9ee33452210a508a3cad1d4497da27be7ead74fa
parent1aaf736d897170af4140643b49a5074b18f82fed
[MachineSink] Improve runtime performance. NFC.

This patch fixes a compilation time issue, when MachineSink faces PHIs
with a huge number of operands. This can happen for example in goto table
based interpreters, where some basic blocks can have several of those PHIs,
each one with several hundreds operands. MachineSink was spending a
significant time re-building and re-sorting the list of successors of
the current MachineBasicBlock. The computing and sorting of the current
MachineBasicBlock successors is now cached.

llvm-svn: 239720
llvm/lib/CodeGen/MachineSink.cpp