Skip to content

Commit 3912b85

Browse files
author
Alexander Yermolovich
committed
some cleanup after code changes to address comments
1 parent 09bc3fa commit 3912b85

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

bolt/lib/Passes/IdenticalCodeFolding.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "bolt/Passes/IdenticalCodeFolding.h"
1414
#include "bolt/Core/HashUtilities.h"
1515
#include "bolt/Core/ParallelUtilities.h"
16-
#include "bolt/Rewrite/RewriteInstance.h"
1716
#include "llvm/ADT/SmallVector.h"
1817
#include "llvm/Support/CommandLine.h"
1918
#include "llvm/Support/ThreadPool.h"
@@ -32,7 +31,6 @@ using namespace bolt;
3231
namespace opts {
3332

3433
extern cl::OptionCategory BoltOptCategory;
35-
extern cl::opt<unsigned> Verbosity;
3634

3735
static cl::opt<bool>
3836
ICFUseDFS("icf-dfs", cl::desc("use DFS ordering when using -icf option"),
@@ -531,12 +529,10 @@ Error IdenticalCodeFolding::runOnFunctions(BinaryContext &BC) {
531529
ThPool->wait();
532530

533531
LLVM_DEBUG(SinglePass.stopTimer());
534-
};
535-
if (BC.getICFLevel() == BinaryContext::ICFLevel::Safe) {
536-
if (Error Err = markFunctionsUnsafeToFold(BC)) {
532+
};
533+
if (BC.getICFLevel() == BinaryContext::ICFLevel::Safe)
534+
if (Error Err = markFunctionsUnsafeToFold(BC))
537535
return Err;
538-
}
539-
}
540536
hashFunctions();
541537
createCongruentBuckets();
542538

bolt/lib/Rewrite/BoltDiff.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ using namespace bolt;
2828
namespace opts {
2929
extern cl::OptionCategory BoltDiffCategory;
3030
extern cl::opt<bool> NeverPrint;
31-
extern cl::opt<bool> ICF;
32-
extern cl::opt<bool> SafeICF;
3331

3432
static cl::opt<bool> IgnoreLTOSuffix(
3533
"ignore-lto-suffix",

bolt/test/X86/icf-safe-test2GlobalConstPtrNoPic.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ main:
139139
movabsq $barMulFunc, %rsi
140140
callq _Z7helper2PFKiiiES1_ii
141141
retq
142-
.Lfunc_end6:
143-
.size main, .Lfunc_end6-main
142+
.size main, .-main
144143
.cfi_endproc
145144

146145
.type FooVar,@object

0 commit comments

Comments
 (0)