[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)
commit981ffd1bc4faff6274486b87f2cd1e08a2fbe56c
tree518b915dbf43e82935ac36071ff8b010dd9cd4db
parent7a1e93493dd82632e42f8b55d45e59b8f1808b17
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239720 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineSink.cpp