Hello,

I would like to set branch prediction based on .gcda files (I know I
could have it automatically with -fprofile-use, but with my specific
use case I can't do it).

I've tried to use gcov-dump but I can't find any spec how to interpret
this output.

I've also tried to use -fprofile-use with -fdump-rtl-all,
-fdump-tree-all, -fdump-ipa-all, -fopt-info and
-ftree-vectorizer-verbose=n flags and see GCC debug output. I got ~200
new debug files per source file. I see that some of the files contain
some format of source code. Some conditions are marked with percentage
values, for example:

  if (_11 != 0)
    goto <bb 1>; [27.00%]
  else
    goto <bb 2>; [73.00%]

  <bb 1> [local count: 51244186]:

I'm guessing that this is prediction, but I found in doc that GCC uses
its own heuristics for branch prediction. How to be sure if I'm
looking at predictions from gcda files? And side question what does
"local count" mean? If this is relevant information I'm working with
ARM.

I would very appreciate your help with my questions.

Best regards,
Kamil Belter

Reply via email to