[llvm] 15cb5eb - [Support] Use llvm::popcount (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 12 13:39:24 PST 2023
Author: Kazu Hirata
Date: 2023-02-12T13:39:18-08:00
New Revision: 15cb5ebed7a45002abb617600ca1d6609b0dc5a9
URL: https://github.com/llvm/llvm-project/commit/15cb5ebed7a45002abb617600ca1d6609b0dc5a9
DIFF: https://github.com/llvm/llvm-project/commit/15cb5ebed7a45002abb617600ca1d6609b0dc5a9.diff
LOG: [Support] Use llvm::popcount (NFC)
This should fix builds on Windows.
Added:
Modified:
llvm/lib/Support/Windows/Threading.inc
Removed:
################################################################################
diff --git a/llvm/lib/Support/Windows/Threading.inc b/llvm/lib/Support/Windows/Threading.inc
index aa47484cb5cec..4baf8b8cb82ae 100644
--- a/llvm/lib/Support/Windows/Threading.inc
+++ b/llvm/lib/Support/Windows/Threading.inc
@@ -233,7 +233,7 @@ static ArrayRef<ProcessorGroup> getProcessorGroups() {
unsigned CurrentGroupID = (*ActiveGroups)[0];
ProcessorGroup NewG{Groups[CurrentGroupID]};
NewG.Affinity = ProcessAffinityMask;
- NewG.UsableThreads = countPopulation(ProcessAffinityMask);
+ NewG.UsableThreads = llvm::popcount(ProcessAffinityMask);
Groups.clear();
Groups.push_back(NewG);
}
More information about the llvm-commits
mailing list