[PATCH] [MachineSink+PGO] Teach MachineSink to use BlockFrequencyInfo

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Mon Sep 22 12:59:38 PDT 2014


Hi qcolombet, chandlerc, ributzka,

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

http://reviews.llvm.org/D5447

Files:
  lib/CodeGen/MachineSink.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5447.13946.patch
Type: text/x-patch
Size: 2668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140922/daf8cf48/attachment.bin>


More information about the llvm-commits mailing list