mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
BFI: Add constructor for Weight
llvm-svn: 212868
This commit is contained in:
parent
fdb4eaa3bf
commit
72e8fb652a
@ -322,6 +322,8 @@ public:
|
||||
BlockNode TargetNode;
|
||||
uint64_t Amount;
|
||||
Weight() : Type(Local), Amount(0) {}
|
||||
Weight(DistType Type, BlockNode TargetNode, uint64_t Amount)
|
||||
: Type(Type), TargetNode(TargetNode), Amount(Amount) {}
|
||||
};
|
||||
|
||||
/// \brief Distribution of unscaled probability weight.
|
||||
|
@ -112,11 +112,7 @@ void Distribution::add(const BlockNode &Node, uint64_t Amount,
|
||||
Total = NewTotal;
|
||||
|
||||
// Save the weight.
|
||||
Weight W;
|
||||
W.TargetNode = Node;
|
||||
W.Amount = Amount;
|
||||
W.Type = Type;
|
||||
Weights.push_back(W);
|
||||
Weights.push_back(Weight(Type, Node, Amount));
|
||||
}
|
||||
|
||||
static void combineWeight(Weight &W, const Weight &OtherW) {
|
||||
|
Loading…
Reference in New Issue
Block a user