Revert "[BOLT] Add NamedRegionTimer to inferStaleProfile (#92621)"

This reverts commit 9f2313829f.

Creates a dependency cycle: lib/Rewrite depends on lib/Profile.
This commit is contained in:
Amir Ayupov
2024-05-21 13:55:32 -07:00
parent 9f2313829f
commit 32c9d5ef4f
2 changed files with 4 additions and 9 deletions

View File

@@ -30,7 +30,6 @@
#include "llvm/ADT/Bitfields.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/xxhash.h"
#include "llvm/Transforms/Utils/SampleProfileInference.h"
@@ -43,7 +42,6 @@ using namespace llvm;
namespace opts {
extern cl::opt<bool> TimeRewrite;
extern cl::OptionCategory BoltOptCategory;
cl::opt<bool>
@@ -707,10 +705,6 @@ void assignProfile(BinaryFunction &BF,
bool YAMLProfileReader::inferStaleProfile(
BinaryFunction &BF, const yaml::bolt::BinaryFunctionProfile &YamlBF) {
NamedRegionTimer T("inferStaleProfile", "stale profile inference", "rewrite",
"Rewrite passes", opts::TimeRewrite);
if (!BF.hasCFG())
return false;

View File

@@ -235,9 +235,10 @@ UseGnuStack("use-gnu-stack",
cl::ZeroOrMore,
cl::cat(BoltCategory));
cl::opt<bool> TimeRewrite("time-rewrite",
cl::desc("print time spent in rewriting passes"),
cl::Hidden, cl::cat(BoltCategory));
static cl::opt<bool>
TimeRewrite("time-rewrite",
cl::desc("print time spent in rewriting passes"), cl::Hidden,
cl::cat(BoltCategory));
static cl::opt<bool>
SequentialDisassembly("sequential-disassembly",