aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachinePipeliner.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-01-22 12:48:51 -0800
committerKazu Hirata <kazu@google.com>2023-01-22 12:48:51 -0800
commitcaa99a01f5dd2f865df318a2f93abc811273a25d (patch)
tree1c848ea5a64f404c933aec6b396eed33a43bf885 /llvm/lib/CodeGen/MachinePipeliner.cpp
parent0b5cb41dd07cc7cde9330d6098ebd74387f3df7f (diff)
downloadllvm-caa99a01f5dd2f865df318a2f93abc811273a25d.zip
llvm-caa99a01f5dd2f865df318a2f93abc811273a25d.tar.gz
llvm-caa99a01f5dd2f865df318a2f93abc811273a25d.tar.bz2
Use llvm::popcount instead of llvm::countPopulation(NFC)
Diffstat (limited to 'llvm/lib/CodeGen/MachinePipeliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachinePipeliner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp
index a7a3e3e..adb6304 100644
--- a/llvm/lib/CodeGen/MachinePipeliner.cpp
+++ b/llvm/lib/CodeGen/MachinePipeliner.cpp
@@ -1022,7 +1022,7 @@ struct FuncUnitSorter {
make_range(InstrItins->beginStage(SchedClass),
InstrItins->endStage(SchedClass))) {
InstrStage::FuncUnits funcUnits = IS.getUnits();
- unsigned numAlternatives = countPopulation(funcUnits);
+ unsigned numAlternatives = llvm::popcount(funcUnits);
if (numAlternatives < min) {
min = numAlternatives;
F = funcUnits;
@@ -1068,7 +1068,7 @@ struct FuncUnitSorter {
make_range(InstrItins->beginStage(SchedClass),
InstrItins->endStage(SchedClass))) {
InstrStage::FuncUnits FuncUnits = IS.getUnits();
- if (countPopulation(FuncUnits) == 1)
+ if (llvm::popcount(FuncUnits) == 1)
Resources[FuncUnits]++;
}
return;