[llvm] [BOLT] [Passes] Fix two compile warnings in BOLT (PR #73086)
Ho Cheung via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 21:04:51 PST 2023
https://github.com/gz83 created https://github.com/llvm/llvm-project/pull/73086
Fix build issue on Windows.
issue:#73085
@maksfb PTAL thank you
>From 39d188b197b165898a3f2caaa819abdcf646c17d Mon Sep 17 00:00:00 2001
From: Ho Cheung <uioptt24 at gmail.com>
Date: Wed, 22 Nov 2023 13:02:04 +0800
Subject: [PATCH] [BOLT] [Passes] Fix two compile warnings in BOLT
Fix build issue on Windows.
issue:#73085
---
bolt/lib/Passes/IndirectCallPromotion.cpp | 5 ++---
bolt/lib/Passes/ReorderAlgorithm.cpp | 4 ++--
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/bolt/lib/Passes/IndirectCallPromotion.cpp b/bolt/lib/Passes/IndirectCallPromotion.cpp
index 8b084c3b63d565a..555258f072edd60 100644
--- a/bolt/lib/Passes/IndirectCallPromotion.cpp
+++ b/bolt/lib/Passes/IndirectCallPromotion.cpp
@@ -410,8 +410,7 @@ IndirectCallPromotion::maybeGetHotJumpTableTargets(BinaryBasicBlock &BB,
<< "BaseReg = " << BC.MRI->getName(BaseReg) << ", "
<< "IndexReg = " << BC.MRI->getName(IndexReg) << ", "
<< "DispValue = " << Twine::utohexstr(DispValue) << ", "
- << "DispExpr = " << DispExpr << ", "
- << "MemLocInstr = ";
+ << "DispExpr = " << DispExpr << ", " << "MemLocInstr = ";
BC.printInstruction(dbgs(), *MemLocInstr, 0, &Function);
dbgs() << "\n";
});
@@ -1467,7 +1466,7 @@ void IndirectCallPromotion::runOnFunctions(BinaryContext &BC) {
std::max<uint64_t>(TotalIndexBasedCandidates, 1))
<< "%\n";
- (void)verifyProfile;
+ (void)verifyProfile(BFs);
#ifndef NDEBUG
verifyProfile(BFs);
#endif
diff --git a/bolt/lib/Passes/ReorderAlgorithm.cpp b/bolt/lib/Passes/ReorderAlgorithm.cpp
index 3c3365e1d3d7113..c112e1a8dcea737 100644
--- a/bolt/lib/Passes/ReorderAlgorithm.cpp
+++ b/bolt/lib/Passes/ReorderAlgorithm.cpp
@@ -20,7 +20,7 @@
#include <random>
#include <stack>
-#undef DEBUG_TYPE
+#undef DEBUG_TYPE
#define DEBUG_TYPE "bolt"
using namespace llvm;
@@ -425,7 +425,7 @@ void TSPReorderAlgorithm::reorderBasicBlocks(BinaryFunction &BF,
}
std::vector<std::vector<int64_t>> DP;
- DP.resize(1 << N);
+ DP.resize(static_cast<size_t>(1) << N);
for (std::vector<int64_t> &Elmt : DP)
Elmt.resize(N, -1);
More information about the llvm-commits
mailing list