[llvm] 45e6951 - Use `uint32_t` rather than `unsigned` in `downscaleWeights` (#153750)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 14 23:22:47 PDT 2025


Author: Mircea Trofin
Date: 2025-08-14T23:22:45-07:00
New Revision: 45e6951ba7b305dbad218e88d64f27c1f2c4b7cf

URL: https://github.com/llvm/llvm-project/commit/45e6951ba7b305dbad218e88d64f27c1f2c4b7cf
DIFF: https://github.com/llvm/llvm-project/commit/45e6951ba7b305dbad218e88d64f27c1f2c4b7cf.diff

LOG: Use `uint32_t` rather than `unsigned` in `downscaleWeights` (#153750)

Added: 
    

Modified: 
    llvm/lib/IR/ProfDataUtils.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/ProfDataUtils.cpp b/llvm/lib/IR/ProfDataUtils.cpp
index c90a1efb9a54a..d24263f8b3bda 100644
--- a/llvm/lib/IR/ProfDataUtils.cpp
+++ b/llvm/lib/IR/ProfDataUtils.cpp
@@ -276,7 +276,7 @@ SmallVector<uint32_t> downscaleWeights(ArrayRef<uint64_t> Weights,
                                                 : *llvm::max_element(Weights);
   assert(MaxCount > 0 && "Bad max count");
   uint64_t Scale = calculateCountScale(MaxCount);
-  SmallVector<unsigned> DownscaledWeights;
+  SmallVector<uint32_t> DownscaledWeights;
   for (const auto &ECI : Weights)
     DownscaledWeights.push_back(scaleBranchCount(ECI, Scale));
   return DownscaledWeights;


        


More information about the llvm-commits mailing list