diff options
| author | Justin Lebar <justin.lebar@gmail.com> | 2024-03-10 20:00:13 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-10 20:00:13 -0700 |
| commit | fab2bb8bfda865bd438dee981d7be7df8017b76d (patch) | |
| tree | 358f27c327a6eb2628f357f08910d3f6ee903ac9 /llvm/lib/Transforms/Utils/SimplifyCFG.cpp | |
| parent | 6bec4fc76de50a090d1d0b36498da66c4a324851 (diff) | |
| download | llvm-fab2bb8bfda865bd438dee981d7be7df8017b76d.zip llvm-fab2bb8bfda865bd438dee981d7be7df8017b76d.tar.gz llvm-fab2bb8bfda865bd438dee981d7be7df8017b76d.tar.bz2 | |
Add llvm::min/max_element and use it in llvm/ and mlir/ directories. (#84678)
For some reason this was missing from STLExtras.
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index fe65e52..5b9a38c 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -1084,7 +1084,7 @@ static void GetBranchWeights(Instruction *TI, /// Keep halving the weights until all can fit in uint32_t. static void FitWeights(MutableArrayRef<uint64_t> Weights) { - uint64_t Max = *std::max_element(Weights.begin(), Weights.end()); + uint64_t Max = *llvm::max_element(Weights); if (Max > UINT_MAX) { unsigned Offset = 32 - llvm::countl_zero(Max); for (uint64_t &I : Weights) |
