Skip to content
Commit 5638b899 authored by Akira Hatanaka's avatar Akira Hatanaka
Browse files

Fix a bug in which BranchProbabilityInfo wasn't setting branch weights of...

Fix a bug in which BranchProbabilityInfo wasn't setting branch weights of basic blocks inside loops correctly.

Previously, BranchProbabilityInfo::calcLoopBranchHeuristics would determine the weights of basic blocks inside loops even when it didn't have enough information to estimate the branch probabilities correctly. This patch fixes the function to exit early if it doesn't see any exit edges or back edges and let the later heuristics determine the weights.

This fixes PR18705 and <rdar://problem/15991090>.

Differential Revision: http://reviews.llvm.org/D3363

llvm-svn: 206194
parent 3df79775
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment