summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-22 03:31:53 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-22 03:31:53 +0000
commitb3380ea60a3688e64bf6843553fa0c07363fdf76 (patch)
treeb87cb0f572f31afd3513f8030edcb0a1fbd0fdb2 /llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
parentd1aec79d7ab57ca7c7387dc8b97f8a7b5f1d58c9 (diff)
downloadbcm5719-llvm-b3380ea60a3688e64bf6843553fa0c07363fdf76.tar.gz
bcm5719-llvm-b3380ea60a3688e64bf6843553fa0c07363fdf76.zip
blockfreq: Skip irreducible backedges inside functions
The branch that skips irreducible backedges was only active when propagating mass at the top-level. In particular, when propagating mass through a loop recognized by `LoopInfo` with irreducible control flow inside, irreducible backedges would not be skipped. Not sure where that idea came from, but the result was that mass was lost until after loop exit. Added a testcase that covers this case. llvm-svn: 206860
Diffstat (limited to 'llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp')
-rw-r--r--llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp b/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
index b5532fcea1d..29a4117c130 100644
--- a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
+++ b/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
@@ -687,7 +687,7 @@ void BlockFrequencyInfoImplBase::addToDist(Distribution &Dist,
return;
}
- if (!LoopHead.isValid() && Resolved < Pred) {
+ if (Resolved < Pred) {
// Irreducible backedge. Skip this edge in the distribution.
DEBUG(debugSuccessor("skipped ", Resolved));
return;
OpenPOWER on IntegriCloud