[llvm] r206854 - blockfreq: Move PackagedLoopData above WorkingData
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Apr 21 20:31:26 PDT 2014
Author: dexonsmith
Date: Mon Apr 21 22:31:25 2014
New Revision: 206854
URL: http://llvm.org/viewvc/llvm-project?rev=206854&view=rev
Log:
blockfreq: Move PackagedLoopData above WorkingData
Modified:
llvm/trunk/include/llvm/Analysis/BlockFrequencyInfoImpl.h
Modified: llvm/trunk/include/llvm/Analysis/BlockFrequencyInfoImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/BlockFrequencyInfoImpl.h?rev=206854&r1=206853&r2=206854&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/BlockFrequencyInfoImpl.h (original)
+++ llvm/trunk/include/llvm/Analysis/BlockFrequencyInfoImpl.h Mon Apr 21 22:31:25 2014
@@ -937,6 +937,27 @@ public:
uint64_t Integer;
};
+ /// \brief Data for a packaged loop.
+ ///
+ /// Contains the data necessary to represent represent a loop as a node once
+ /// it's packaged.
+ ///
+ /// PackagedLoopData inherits from BlockData to give the node the necessary
+ /// stats. Further, it has a list of successors, list of members, and stores
+ /// the backedge mass assigned to this loop.
+ struct PackagedLoopData {
+ typedef SmallVector<std::pair<BlockNode, BlockMass>, 4> ExitMap;
+ typedef SmallVector<BlockNode, 4> MemberList;
+ BlockNode Header; ///< Header.
+ ExitMap Exits; ///< Successor edges (and weights).
+ MemberList Members; ///< Members of the loop.
+ BlockMass BackedgeMass; ///< Mass returned to loop header.
+ BlockMass Mass;
+ Float Scale;
+
+ PackagedLoopData(const BlockNode &Header) : Header(Header) {}
+ };
+
/// \brief Index of loop information.
struct WorkingData {
BlockNode ContainingLoop; ///< The block whose loop this block is inside.
@@ -1016,27 +1037,6 @@ public:
void add(const BlockNode &Node, uint64_t Amount, Weight::DistType Type);
};
- /// \brief Data for a packaged loop.
- ///
- /// Contains the data necessary to represent represent a loop as a node once
- /// it's packaged.
- ///
- /// PackagedLoopData inherits from BlockData to give the node the necessary
- /// stats. Further, it has a list of successors, list of members, and stores
- /// the backedge mass assigned to this loop.
- struct PackagedLoopData {
- typedef SmallVector<std::pair<BlockNode, BlockMass>, 4> ExitMap;
- typedef SmallVector<BlockNode, 4> MemberList;
- BlockNode Header; ///< Header.
- ExitMap Exits; ///< Successor edges (and weights).
- MemberList Members; ///< Members of the loop.
- BlockMass BackedgeMass; ///< Mass returned to loop header.
- BlockMass Mass;
- Float Scale;
-
- PackagedLoopData(const BlockNode &Header) : Header(Header) {}
- };
-
/// \brief Data about each block. This is used downstream.
std::vector<FrequencyData> Freqs;
More information about the llvm-commits
mailing list