Skip to content

Commit 5181156

Browse files
authored
Use BlockFrequency type in more places (NFC) (#68266)
The `BlockFrequency` class abstracts `uint64_t` frequency values. Use it more consistently in various APIs and disable implicit conversion to make usage more consistent and explicit. - Use `BlockFrequency Freq` parameter for `setBlockFreq`, `getProfileCountFromFreq` and `setBlockFreqAndScale` functions. - Return `BlockFrequency` in `getEntryFreq()` functions. - While on it change some `const BlockFrequency& Freq` parameters to plain `BlockFreqency Freq`. - Mark `BlockFrequency(uint64_t)` constructor as explicit. - Add missing `BlockFrequency::operator!=`. - Remove `uint64_t BlockFreqency::getMaxFrequency()`. - Add `BlockFrequency BlockFrequency::max()` function.
1 parent ea2036e commit 5181156

35 files changed

+215
-203
lines changed

llvm/include/llvm/Analysis/BlockFrequencyInfo.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,19 @@ class BlockFrequencyInfo {
7373
/// Returns the estimated profile count of \p Freq.
7474
/// This uses the frequency \p Freq and multiplies it by
7575
/// the enclosing function's count (if available) and returns the value.
76-
std::optional<uint64_t> getProfileCountFromFreq(uint64_t Freq) const;
76+
std::optional<uint64_t> getProfileCountFromFreq(BlockFrequency Freq) const;
7777

7878
/// Returns true if \p BB is an irreducible loop header
7979
/// block. Otherwise false.
8080
bool isIrrLoopHeader(const BasicBlock *BB);
8181

8282
// Set the frequency of the given basic block.
83-
void setBlockFreq(const BasicBlock *BB, uint64_t Freq);
83+
void setBlockFreq(const BasicBlock *BB, BlockFrequency Freq);
8484

8585
/// Set the frequency of \p ReferenceBB to \p Freq and scale the frequencies
8686
/// of the blocks in \p BlocksToScale such that their frequencies relative
8787
/// to \p ReferenceBB remain unchanged.
88-
void setBlockFreqAndScale(const BasicBlock *ReferenceBB, uint64_t Freq,
88+
void setBlockFreqAndScale(const BasicBlock *ReferenceBB, BlockFrequency Freq,
8989
SmallPtrSetImpl<BasicBlock *> &BlocksToScale);
9090

9191
/// calculate - compute block frequency info for the given function.
@@ -94,13 +94,13 @@ class BlockFrequencyInfo {
9494

9595
// Print the block frequency Freq to OS using the current functions entry
9696
// frequency to convert freq into a relative decimal form.
97-
raw_ostream &printBlockFreq(raw_ostream &OS, const BlockFrequency Freq) const;
97+
raw_ostream &printBlockFreq(raw_ostream &OS, BlockFrequency Freq) const;
9898

9999
// Convenience method that attempts to look up the frequency associated with
100100
// BB and print it to OS.
101101
raw_ostream &printBlockFreq(raw_ostream &OS, const BasicBlock *BB) const;
102102

103-
uint64_t getEntryFreq() const;
103+
BlockFrequency getEntryFreq() const;
104104
void releaseMemory();
105105
void print(raw_ostream &OS) const;
106106

llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -527,19 +527,18 @@ class BlockFrequencyInfoImplBase {
527527
getBlockProfileCount(const Function &F, const BlockNode &Node,
528528
bool AllowSynthetic = false) const;
529529
std::optional<uint64_t>
530-
getProfileCountFromFreq(const Function &F, uint64_t Freq,
530+
getProfileCountFromFreq(const Function &F, BlockFrequency Freq,
531531
bool AllowSynthetic = false) const;
532532
bool isIrrLoopHeader(const BlockNode &Node);
533533

534-
void setBlockFreq(const BlockNode &Node, uint64_t Freq);
534+
void setBlockFreq(const BlockNode &Node, BlockFrequency Freq);
535535

536536
raw_ostream &printBlockFreq(raw_ostream &OS, const BlockNode &Node) const;
537-
raw_ostream &printBlockFreq(raw_ostream &OS,
538-
const BlockFrequency &Freq) const;
537+
raw_ostream &printBlockFreq(raw_ostream &OS, BlockFrequency Freq) const;
539538

540-
uint64_t getEntryFreq() const {
539+
BlockFrequency getEntryFreq() const {
541540
assert(!Freqs.empty());
542-
return Freqs[0].Integer;
541+
return BlockFrequency(Freqs[0].Integer);
543542
}
544543
};
545544

@@ -1029,7 +1028,7 @@ template <class BT> class BlockFrequencyInfoImpl : BlockFrequencyInfoImplBase {
10291028
}
10301029

10311030
std::optional<uint64_t>
1032-
getProfileCountFromFreq(const Function &F, uint64_t Freq,
1031+
getProfileCountFromFreq(const Function &F, BlockFrequency Freq,
10331032
bool AllowSynthetic = false) const {
10341033
return BlockFrequencyInfoImplBase::getProfileCountFromFreq(F, Freq,
10351034
AllowSynthetic);
@@ -1039,7 +1038,7 @@ template <class BT> class BlockFrequencyInfoImpl : BlockFrequencyInfoImplBase {
10391038
return BlockFrequencyInfoImplBase::isIrrLoopHeader(getNode(BB));
10401039
}
10411040

1042-
void setBlockFreq(const BlockT *BB, uint64_t Freq);
1041+
void setBlockFreq(const BlockT *BB, BlockFrequency Freq);
10431042

10441043
void forgetBlock(const BlockT *BB) {
10451044
// We don't erase corresponding items from `Freqs`, `RPOT` and other to
@@ -1145,12 +1144,13 @@ void BlockFrequencyInfoImpl<BT>::calculate(const FunctionT &F,
11451144
// blocks and unknown blocks.
11461145
for (const BlockT &BB : F)
11471146
if (!Nodes.count(&BB))
1148-
setBlockFreq(&BB, 0);
1147+
setBlockFreq(&BB, BlockFrequency());
11491148
}
11501149
}
11511150

11521151
template <class BT>
1153-
void BlockFrequencyInfoImpl<BT>::setBlockFreq(const BlockT *BB, uint64_t Freq) {
1152+
void BlockFrequencyInfoImpl<BT>::setBlockFreq(const BlockT *BB,
1153+
BlockFrequency Freq) {
11541154
if (Nodes.count(BB))
11551155
BlockFrequencyInfoImplBase::setBlockFreq(getNode(BB), Freq);
11561156
else {

llvm/include/llvm/Analysis/ProfileSummaryInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ class ProfileSummaryInfo {
209209

210210
template <typename BFIT>
211211
bool isColdBlock(BlockFrequency BlockFreq, const BFIT *BFI) const {
212-
auto Count = BFI->getProfileCountFromFreq(BlockFreq.getFrequency());
212+
auto Count = BFI->getProfileCountFromFreq(BlockFreq);
213213
return Count && isColdCount(*Count);
214214
}
215215

@@ -315,7 +315,7 @@ class ProfileSummaryInfo {
315315
bool isHotOrColdBlockNthPercentile(int PercentileCutoff,
316316
BlockFrequency BlockFreq,
317317
BFIT *BFI) const {
318-
auto Count = BFI->getProfileCountFromFreq(BlockFreq.getFrequency());
318+
auto Count = BFI->getProfileCountFromFreq(BlockFreq);
319319
if (isHot)
320320
return Count && isHotCountNthPercentile(PercentileCutoff, *Count);
321321
else

llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ class RegBankSelect : public MachineFunctionPass {
440440
public:
441441
/// Create a MappingCost assuming that most of the instructions
442442
/// will occur in a basic block with \p LocalFreq frequency.
443-
MappingCost(const BlockFrequency &LocalFreq);
443+
MappingCost(BlockFrequency LocalFreq);
444444

445445
/// Add \p Cost to the local cost.
446446
/// \return true if this cost is saturated, false otherwise.

llvm/include/llvm/CodeGen/MBFIWrapper.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ class MBFIWrapper {
3535

3636
raw_ostream &printBlockFreq(raw_ostream &OS,
3737
const MachineBasicBlock *MBB) const;
38-
raw_ostream &printBlockFreq(raw_ostream &OS,
39-
const BlockFrequency Freq) const;
38+
raw_ostream &printBlockFreq(raw_ostream &OS, BlockFrequency Freq) const;
4039
void view(const Twine &Name, bool isSimple = true);
41-
uint64_t getEntryFreq() const;
40+
BlockFrequency getEntryFreq() const;
4241
const MachineBlockFrequencyInfo &getMBFI() { return MBFI; }
4342

4443
private:

llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,15 @@ class MachineBlockFrequencyInfo : public MachineFunctionPass {
6666
/// Compute the frequency of the block, relative to the entry block.
6767
/// This API assumes getEntryFreq() is non-zero.
6868
double getBlockFreqRelativeToEntryBlock(const MachineBasicBlock *MBB) const {
69-
assert(getEntryFreq() != 0 && "getEntryFreq() should not return 0 here!");
69+
assert(getEntryFreq() != BlockFrequency(0) &&
70+
"getEntryFreq() should not return 0 here!");
7071
return static_cast<double>(getBlockFreq(MBB).getFrequency()) /
71-
static_cast<double>(getEntryFreq());
72+
static_cast<double>(getEntryFreq().getFrequency());
7273
}
7374

7475
std::optional<uint64_t>
7576
getBlockProfileCount(const MachineBasicBlock *MBB) const;
76-
std::optional<uint64_t> getProfileCountFromFreq(uint64_t Freq) const;
77+
std::optional<uint64_t> getProfileCountFromFreq(BlockFrequency Freq) const;
7778

7879
bool isIrrLoopHeader(const MachineBasicBlock *MBB) const;
7980

@@ -101,7 +102,7 @@ class MachineBlockFrequencyInfo : public MachineFunctionPass {
101102

102103
/// Divide a block's BlockFrequency::getFrequency() value by this value to
103104
/// obtain the entry block - relative frequency of said block.
104-
uint64_t getEntryFreq() const;
105+
BlockFrequency getEntryFreq() const;
105106
};
106107

107108
} // end namespace llvm

llvm/include/llvm/Support/BlockFrequency.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ class BlockFrequency {
2626
uint64_t Frequency;
2727

2828
public:
29-
BlockFrequency(uint64_t Freq = 0) : Frequency(Freq) { }
29+
BlockFrequency() : Frequency(0) {}
30+
explicit BlockFrequency(uint64_t Freq) : Frequency(Freq) {}
3031

3132
/// Returns the maximum possible frequency, the saturation value.
32-
static uint64_t getMaxFrequency() { return UINT64_MAX; }
33+
static BlockFrequency max() { return BlockFrequency(UINT64_MAX); }
3334

3435
/// Returns the frequency as a fixpoint number scaled by the entry
3536
/// frequency.
@@ -112,6 +113,10 @@ class BlockFrequency {
112113
bool operator==(BlockFrequency RHS) const {
113114
return Frequency == RHS.Frequency;
114115
}
116+
117+
bool operator!=(BlockFrequency RHS) const {
118+
return Frequency != RHS.Frequency;
119+
}
115120
};
116121

117122
} // namespace llvm

llvm/include/llvm/Transforms/Instrumentation/CFGMST.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ template <class Edge, class BBInfo> class CFGMST {
101101
LLVM_DEBUG(dbgs() << "Build Edge on " << F.getName() << "\n");
102102

103103
BasicBlock *Entry = &(F.getEntryBlock());
104-
uint64_t EntryWeight = (BFI != nullptr ? BFI->getEntryFreq() : 2);
104+
uint64_t EntryWeight =
105+
(BFI != nullptr ? BFI->getEntryFreq().getFrequency() : 2);
105106
// If we want to instrument the entry count, lower the weight to 0.
106107
if (InstrumentFuncEntry)
107108
EntryWeight = 0;

llvm/lib/Analysis/BlockFrequencyInfo.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ void BlockFrequencyInfo::calculate(const Function &F,
201201
}
202202

203203
BlockFrequency BlockFrequencyInfo::getBlockFreq(const BasicBlock *BB) const {
204-
return BFI ? BFI->getBlockFreq(BB) : 0;
204+
return BFI ? BFI->getBlockFreq(BB) : BlockFrequency(0);
205205
}
206206

207207
std::optional<uint64_t>
@@ -214,7 +214,7 @@ BlockFrequencyInfo::getBlockProfileCount(const BasicBlock *BB,
214214
}
215215

216216
std::optional<uint64_t>
217-
BlockFrequencyInfo::getProfileCountFromFreq(uint64_t Freq) const {
217+
BlockFrequencyInfo::getProfileCountFromFreq(BlockFrequency Freq) const {
218218
if (!BFI)
219219
return std::nullopt;
220220
return BFI->getProfileCountFromFreq(*getFunction(), Freq);
@@ -225,17 +225,18 @@ bool BlockFrequencyInfo::isIrrLoopHeader(const BasicBlock *BB) {
225225
return BFI->isIrrLoopHeader(BB);
226226
}
227227

228-
void BlockFrequencyInfo::setBlockFreq(const BasicBlock *BB, uint64_t Freq) {
228+
void BlockFrequencyInfo::setBlockFreq(const BasicBlock *BB,
229+
BlockFrequency Freq) {
229230
assert(BFI && "Expected analysis to be available");
230231
BFI->setBlockFreq(BB, Freq);
231232
}
232233

233234
void BlockFrequencyInfo::setBlockFreqAndScale(
234-
const BasicBlock *ReferenceBB, uint64_t Freq,
235+
const BasicBlock *ReferenceBB, BlockFrequency Freq,
235236
SmallPtrSetImpl<BasicBlock *> &BlocksToScale) {
236237
assert(BFI && "Expected analysis to be available");
237238
// Use 128 bits APInt to avoid overflow.
238-
APInt NewFreq(128, Freq);
239+
APInt NewFreq(128, Freq.getFrequency());
239240
APInt OldFreq(128, BFI->getBlockFreq(ReferenceBB).getFrequency());
240241
APInt BBFreq(128, 0);
241242
for (auto *BB : BlocksToScale) {
@@ -247,7 +248,7 @@ void BlockFrequencyInfo::setBlockFreqAndScale(
247248
// a hot spot, one of the options proposed in
248249
// https://reviews.llvm.org/D28535#650071 could be used to avoid this.
249250
BBFreq = BBFreq.udiv(OldFreq);
250-
BFI->setBlockFreq(BB, BBFreq.getLimitedValue());
251+
BFI->setBlockFreq(BB, BlockFrequency(BBFreq.getLimitedValue()));
251252
}
252253
BFI->setBlockFreq(ReferenceBB, Freq);
253254
}
@@ -266,8 +267,8 @@ const BranchProbabilityInfo *BlockFrequencyInfo::getBPI() const {
266267
return BFI ? &BFI->getBPI() : nullptr;
267268
}
268269

269-
raw_ostream &BlockFrequencyInfo::
270-
printBlockFreq(raw_ostream &OS, const BlockFrequency Freq) const {
270+
raw_ostream &BlockFrequencyInfo::printBlockFreq(raw_ostream &OS,
271+
BlockFrequency Freq) const {
271272
return BFI ? BFI->printBlockFreq(OS, Freq) : OS;
272273
}
273274

@@ -277,8 +278,8 @@ BlockFrequencyInfo::printBlockFreq(raw_ostream &OS,
277278
return BFI ? BFI->printBlockFreq(OS, BB) : OS;
278279
}
279280

280-
uint64_t BlockFrequencyInfo::getEntryFreq() const {
281-
return BFI ? BFI->getEntryFreq() : 0;
281+
BlockFrequency BlockFrequencyInfo::getEntryFreq() const {
282+
return BFI ? BFI->getEntryFreq() : BlockFrequency(0);
282283
}
283284

284285
void BlockFrequencyInfo::releaseMemory() { BFI.reset(); }

llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -581,30 +581,27 @@ BlockFrequencyInfoImplBase::getBlockFreq(const BlockNode &Node) const {
581581
report_fatal_error(OS.str());
582582
}
583583
#endif
584-
return 0;
584+
return BlockFrequency(0);
585585
}
586-
return Freqs[Node.Index].Integer;
586+
return BlockFrequency(Freqs[Node.Index].Integer);
587587
}
588588

589589
std::optional<uint64_t>
590590
BlockFrequencyInfoImplBase::getBlockProfileCount(const Function &F,
591591
const BlockNode &Node,
592592
bool AllowSynthetic) const {
593-
return getProfileCountFromFreq(F, getBlockFreq(Node).getFrequency(),
594-
AllowSynthetic);
593+
return getProfileCountFromFreq(F, getBlockFreq(Node), AllowSynthetic);
595594
}
596595

597-
std::optional<uint64_t>
598-
BlockFrequencyInfoImplBase::getProfileCountFromFreq(const Function &F,
599-
uint64_t Freq,
600-
bool AllowSynthetic) const {
596+
std::optional<uint64_t> BlockFrequencyInfoImplBase::getProfileCountFromFreq(
597+
const Function &F, BlockFrequency Freq, bool AllowSynthetic) const {
601598
auto EntryCount = F.getEntryCount(AllowSynthetic);
602599
if (!EntryCount)
603600
return std::nullopt;
604601
// Use 128 bit APInt to do the arithmetic to avoid overflow.
605602
APInt BlockCount(128, EntryCount->getCount());
606-
APInt BlockFreq(128, Freq);
607-
APInt EntryFreq(128, getEntryFreq());
603+
APInt BlockFreq(128, Freq.getFrequency());
604+
APInt EntryFreq(128, getEntryFreq().getFrequency());
608605
BlockCount *= BlockFreq;
609606
// Rounded division of BlockCount by EntryFreq. Since EntryFreq is unsigned
610607
// lshr by 1 gives EntryFreq/2.
@@ -627,10 +624,10 @@ BlockFrequencyInfoImplBase::getFloatingBlockFreq(const BlockNode &Node) const {
627624
}
628625

629626
void BlockFrequencyInfoImplBase::setBlockFreq(const BlockNode &Node,
630-
uint64_t Freq) {
627+
BlockFrequency Freq) {
631628
assert(Node.isValid() && "Expected valid node");
632629
assert(Node.Index < Freqs.size() && "Expected legal index");
633-
Freqs[Node.Index].Integer = Freq;
630+
Freqs[Node.Index].Integer = Freq.getFrequency();
634631
}
635632

636633
std::string
@@ -651,9 +648,9 @@ BlockFrequencyInfoImplBase::printBlockFreq(raw_ostream &OS,
651648

652649
raw_ostream &
653650
BlockFrequencyInfoImplBase::printBlockFreq(raw_ostream &OS,
654-
const BlockFrequency &Freq) const {
651+
BlockFrequency Freq) const {
655652
Scaled64 Block(Freq.getFrequency(), 0);
656-
Scaled64 Entry(getEntryFreq(), 0);
653+
Scaled64 Entry(getEntryFreq().getFrequency(), 0);
657654

658655
return OS << Block / Entry;
659656
}

llvm/lib/Analysis/CFGPrinter.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,11 @@ bool DOTGraphTraits<DOTFuncInfo *>::isNodeHidden(const BasicBlock *Node,
318318
const DOTFuncInfo *CFGInfo) {
319319
if (HideColdPaths.getNumOccurrences() > 0)
320320
if (auto *BFI = CFGInfo->getBFI()) {
321-
uint64_t NodeFreq = BFI->getBlockFreq(Node).getFrequency();
322-
uint64_t EntryFreq = BFI->getEntryFreq();
321+
BlockFrequency NodeFreq = BFI->getBlockFreq(Node);
322+
BlockFrequency EntryFreq = BFI->getEntryFreq();
323323
// Hide blocks with relative frequency below HideColdPaths threshold.
324-
if ((double)NodeFreq / EntryFreq < HideColdPaths)
324+
if ((double)NodeFreq.getFrequency() / EntryFreq.getFrequency() <
325+
HideColdPaths)
325326
return true;
326327
}
327328
if (HideUnreachablePaths || HideDeoptimizePaths) {

llvm/lib/Analysis/ModuleSummaryAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ static void computeFunctionSummary(
413413
// information.
414414
if (BFI != nullptr && Hotness == CalleeInfo::HotnessType::Unknown) {
415415
uint64_t BBFreq = BFI->getBlockFreq(&BB).getFrequency();
416-
uint64_t EntryFreq = BFI->getEntryFreq();
416+
uint64_t EntryFreq = BFI->getEntryFreq().getFrequency();
417417
ValueInfo.updateRelBlockFreq(BBFreq, EntryFreq);
418418
}
419419
} else {

llvm/lib/CodeGen/CodeGenPrepare.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,9 +2591,8 @@ bool CodeGenPrepare::dupRetToEnableTailCallOpts(BasicBlock *BB,
25912591
(void)FoldReturnIntoUncondBranch(RetI, BB, TailCallBB);
25922592
assert(!VerifyBFIUpdates ||
25932593
BFI->getBlockFreq(BB) >= BFI->getBlockFreq(TailCallBB));
2594-
BFI->setBlockFreq(
2595-
BB,
2596-
(BFI->getBlockFreq(BB) - BFI->getBlockFreq(TailCallBB)).getFrequency());
2594+
BFI->setBlockFreq(BB,
2595+
(BFI->getBlockFreq(BB) - BFI->getBlockFreq(TailCallBB)));
25972596
ModifiedDT = ModifyDT::ModifyBBDT;
25982597
Changed = true;
25992598
++NumRetsDup;
@@ -7067,7 +7066,7 @@ bool CodeGenPrepare::optimizeSelectInst(SelectInst *SI) {
70677066
FreshBBs.insert(EndBlock);
70687067
}
70697068

7070-
BFI->setBlockFreq(EndBlock, BFI->getBlockFreq(StartBlock).getFrequency());
7069+
BFI->setBlockFreq(EndBlock, BFI->getBlockFreq(StartBlock));
70717070

70727071
static const unsigned MD[] = {
70737072
LLVMContext::MD_prof, LLVMContext::MD_unpredictable,

llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,8 @@ RegBankSelect::MappingCost RegBankSelect::computeMapping(
449449
return MappingCost::ImpossibleCost();
450450

451451
// If mapped with InstrMapping, MI will have the recorded cost.
452-
MappingCost Cost(MBFI ? MBFI->getBlockFreq(MI.getParent()) : 1);
452+
MappingCost Cost(MBFI ? MBFI->getBlockFreq(MI.getParent())
453+
: BlockFrequency(1));
453454
bool Saturated = Cost.addLocalCost(InstrMapping.getCost());
454455
assert(!Saturated && "Possible mapping saturated the cost");
455456
LLVM_DEBUG(dbgs() << "Evaluating mapping cost for: " << MI);
@@ -971,7 +972,7 @@ bool RegBankSelect::EdgeInsertPoint::canMaterialize() const {
971972
return Src.canSplitCriticalEdge(DstOrSplit);
972973
}
973974

974-
RegBankSelect::MappingCost::MappingCost(const BlockFrequency &LocalFreq)
975+
RegBankSelect::MappingCost::MappingCost(BlockFrequency LocalFreq)
975976
: LocalFreq(LocalFreq.getFrequency()) {}
976977

977978
bool RegBankSelect::MappingCost::addLocalCost(uint64_t Cost) {

0 commit comments

Comments
 (0)