blockfreq: Remove "dead" comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206853 91177308-0d34-0410-b5e6-96231b3b80d8
blockfreq: Move PackagedLoopData above WorkingData

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206854 91177308-0d34-0410-b5e6-96231b3b80d8
blockfreq: Rename PackagedLoopData => LoopData

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206855 91177308-0d34-0410-b5e6-96231b3b80d8
blockfreq: Implement clear() explicitly

This was implicitly with copy assignment before, which fails to actually
clear `std::vector<>`'s heap storage.  Move assignment would work, but
since MSVC can't imply those anyway, explicitly `clear()`-ing members
makes more sense.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206856 91177308-0d34-0410-b5e6-96231b3b80d8
blockfreq: Use pointers to loops instead of an index

Store pointers directly to loops inside the nodes.  This could have been
done without changing the type stored in `std::vector<>`.  However,
rather than computing the number of loops before constructing them
(which `LoopInfo` doesn't provide directly), I've switched to a
`vector<unique_ptr<LoopData>>`.

This adds some heap overhead, but the number of loops is typically
small.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206857 91177308-0d34-0410-b5e6-96231b3b80d8
blockfreq: Use a pointer for ContainingLoop too

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206858 91177308-0d34-0410-b5e6-96231b3b80d8
blockfreq: Rename PackagedLoops => Loops

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206859 91177308-0d34-0410-b5e6-96231b3b80d8
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