]> granicus.if.org Git - llvm/commit
[Outliner] Fix compile-time overhead for candidate choice
authorJessica Paquette <jpaquette@apple.com>
Thu, 23 Mar 2017 21:27:38 +0000 (21:27 +0000)
committerJessica Paquette <jpaquette@apple.com>
Thu, 23 Mar 2017 21:27:38 +0000 (21:27 +0000)
commit20547eda74d0007c08c5305bd703050e9f401fdb
treefa8334e7f0bbff170a2f719637294c25b50edfba
parent42740ced927f8837c131a920db5a98d62dbbb54d
[Outliner] Fix compile-time overhead for candidate choice

The old candidate collection method in the outliner caused some very large
regressions in compile time on large tests. For MultiSource/Benchmarks/7zip it
caused a 284.07 s or 1156% increase in compile time. On average, using the
SingleSource/MultiSource tests, it caused an average increase of 8 seconds in
compile time (something like 1000%).

This commit replaces that candidate collection method with a new one which
only visits each node in the tree once. This reduces the worst compile time
increase (still 7zip) to a 0.542 s overhead (22%) and the average compile time
increase on SingleSource and MultiSource to 0.018 s (4%).

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