blockfreq: Skip irreducible backedges inside functions
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 22 Apr 2014 03:31:53 +0000 (03:31 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 22 Apr 2014 03:31:53 +0000 (03:31 +0000)
commit846a14340c4c699d55b42e73e2336490c9255f11
treeaaf127a00f61fcb31412d49173aa1d90777dda11
parentdda2f883dd61325ea85d4f9ebe5b8966b01e23dd
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206860 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/BlockFrequencyInfoImpl.cpp
test/Analysis/BlockFrequencyInfo/irreducible.ll