[PATCH] D33746: [PGO] Dump branch condition type, branch probability and branch hotness as optimization remarks
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 31 16:19:29 PDT 2017
davidxl created this revision.
This feature is intended to be used to collect branch probability statistics and the statistics can be used to guided the tuning of static branch prediction (which has not been fully tuned).
Sample output from perlbmk:
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 1) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 1) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 1061250) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 11633) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 13537184) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 146) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 1460) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 152) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 154393) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 154627) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 177) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 2) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 2) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 22) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 247756) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 3) [-Rpass-analysis=pgo-use-annot]
: eq_i32_Const is true with probability : 0x00000000 / 0x80000000 = 0.00% (total count : 3) [-Rpass-analysis=pgo-use-a
https://reviews.llvm.org/D33746
Files:
lib/Transforms/Instrumentation/PGOInstrumentation.cpp
test/Transforms/PGOProfile/branch1.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33746.100937.patch
Type: text/x-patch
Size: 4596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170531/2723653b/attachment.bin>
More information about the llvm-commits
mailing list