[llvm-commits] [llvm] r58225 - /llvm/trunk/lib/CodeGen/BranchFolding.cpp

(Background: this threshold limits the number of predecessors a block can have when trying to tail merge, for reasons of compile speed.)
In case anyone cares what the measurements are: The old threshold, 100, was exceeded in 9 of the llvm tests. With the higher threshold none of these takes more than 1.1 second extra to go through llc, and the pass removes from roughly 300 to 1000 extra instructions (this count includes labels).

I was hoping to get rid of this threshold entirely, after rewriting the algorithm a while back, but we aren't there yet.
It does seem to be true that higher compile times are associated with removing large numbers of instructions, rather than with simply comparing tails, so I think the rewrite (which addressed a poor algorithm for comparing large numbers of tails) was a success, but there might be something to do down in the machinery that removes instructions.

The most extreme time is on 'kc', which takes a 25% hit when the threshold is disabled, but also removes 4200 extra instructions. Might be worth it -O3.