This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

guessed profile counts leading to incorrect static branch hints on ppc64

So, I'm wondering if anyone can help with where the ultimate problem may
lie here. I've seen some cases where gcc generates branches with the
static branch hints bit set. It is happening because the branch
probability gets set to "always". This happens in

static void
recompute_probabilities (basic_block bb)
  edge esucc;
  edge_iterator ei;
  FOR_EACH_EDGE (esucc, ei, bb->succs)
      if (!bb->count)

      /* Prevent overflow computation due to insane profiles.  */
      if (esucc->count < bb->count)
	esucc->probability = GCOV_COMPUTE_SCALE (esucc->count,
      else {
	/* Can happen with missing/guessed probabilities, since we
	   may determine that more is flowing along duplicated
	   path than joiner succ probabilities allowed.
	   Counts and freqs will be insane after jump threading,
	   at least make sure probability is sane or we will
	   get a flow verification error.
	   Not much we can do to make counts/freqs sane without
	   redoing the profile estimation.  */
	esucc->probability = REG_BR_PROB_BASE;

It would appear that the guessed counts are getting changed
inconsistently before this during the tree-ssa-dom pass.

Any trail of breadcrumbs to follow through the forest would be helpful
here ...



Aaron Sawdey, Ph.D.
050-2/C113  (507) 253-7520 home: 507/263-0782
IBM Linux Technology Center - PPC Toolchain

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]