Teach MachineSink to use BlockFrequencyInfo
Machine Sink uses loop depth information to select between successors BBs to sink machine instructions into, where BBs within smaller loop depths are preferable.
This patch adds support for choosing between successors by using profile information from BlockFrequencyInfo instead, whenever the information is available.
Tested it under SPEC2006 train (average of 30 runs for each program). The baseline uses -O3 and PGO without Machine Sink support. There are no regressions found for these programas, and the speedup follows:
benchmark Speedup (Relative change)
400.perlbench 2.49%
401.bzip2 2.59%
403.gcc 2.43%
429.mcf 2.56%
456.hmmer 2.38%
458.sjeng 1.75%
462.libquantum 0.08%
464.h264ref 2.65%
471.omnetpp 1.00%
473.astar 1.81%
483.xalancbmk 1.00%
433.milc 1.44%
444.namd 1.60%
450.soplex 1.63%
470.lbm 1.65%
GeoMean 1.49%
More details on the results at http://pastebin.com/VQBfU4PH
Should we still grab this analysis if UseBlockFreqInfo is false?