Skip to content

Commit 32c9d5e

Browse files
committed
Revert "[BOLT] Add NamedRegionTimer to inferStaleProfile (#92621)"
This reverts commit 9f23138. Creates a dependency cycle: lib/Rewrite depends on lib/Profile.
1 parent 9f23138 commit 32c9d5e

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

bolt/lib/Profile/StaleProfileMatching.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "llvm/ADT/Bitfields.h"
3131
#include "llvm/ADT/Hashing.h"
3232
#include "llvm/Support/CommandLine.h"
33-
#include "llvm/Support/Timer.h"
3433
#include "llvm/Support/xxhash.h"
3534
#include "llvm/Transforms/Utils/SampleProfileInference.h"
3635

@@ -43,7 +42,6 @@ using namespace llvm;
4342

4443
namespace opts {
4544

46-
extern cl::opt<bool> TimeRewrite;
4745
extern cl::OptionCategory BoltOptCategory;
4846

4947
cl::opt<bool>
@@ -707,10 +705,6 @@ void assignProfile(BinaryFunction &BF,
707705

708706
bool YAMLProfileReader::inferStaleProfile(
709707
BinaryFunction &BF, const yaml::bolt::BinaryFunctionProfile &YamlBF) {
710-
711-
NamedRegionTimer T("inferStaleProfile", "stale profile inference", "rewrite",
712-
"Rewrite passes", opts::TimeRewrite);
713-
714708
if (!BF.hasCFG())
715709
return false;
716710

bolt/lib/Rewrite/RewriteInstance.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,10 @@ UseGnuStack("use-gnu-stack",
235235
cl::ZeroOrMore,
236236
cl::cat(BoltCategory));
237237

238-
cl::opt<bool> TimeRewrite("time-rewrite",
239-
cl::desc("print time spent in rewriting passes"),
240-
cl::Hidden, cl::cat(BoltCategory));
238+
static cl::opt<bool>
239+
TimeRewrite("time-rewrite",
240+
cl::desc("print time spent in rewriting passes"), cl::Hidden,
241+
cl::cat(BoltCategory));
241242

242243
static cl::opt<bool>
243244
SequentialDisassembly("sequential-disassembly",

0 commit comments

Comments
 (0)