[llvm] [llvm-exegesis] Remove llvm prefix where unnecessary (PR #79802)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 02:00:33 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-tools-llvm-exegesis

Author: Aiden Grossman (boomanaiden154)

<details>
<summary>Changes</summary>

This patch removes the llvm:: prefix within llvm-exegesis where it is not necessary. This is most occurrences of the prefix within exegesis as exegesis is within the llvm namespace. This patch makes things more consistent as the vast majority of the code did not use the llvm:: prefix for anything.

---

Patch is 36.81 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/79802.diff


19 Files Affected:

- (modified) llvm/tools/llvm-exegesis/lib/Analysis.cpp (+6-7) 
- (modified) llvm/tools/llvm-exegesis/lib/Analysis.h (+2-3) 
- (modified) llvm/tools/llvm-exegesis/lib/Assembler.cpp (+2-2) 
- (modified) llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp (+9-10) 
- (modified) llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h (+4-4) 
- (modified) llvm/tools/llvm-exegesis/lib/Clustering.cpp (+1-1) 
- (modified) llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp (+11-11) 
- (modified) llvm/tools/llvm-exegesis/lib/LlvmState.cpp (+13-14) 
- (modified) llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp (+1-1) 
- (modified) llvm/tools/llvm-exegesis/lib/Mips/Target.cpp (+1-1) 
- (modified) llvm/tools/llvm-exegesis/lib/PerfHelper.cpp (+9-10) 
- (modified) llvm/tools/llvm-exegesis/lib/PerfHelper.h (+2-3) 
- (modified) llvm/tools/llvm-exegesis/lib/ProgressMeter.h (+1-1) 
- (modified) llvm/tools/llvm-exegesis/lib/SchedClassResolution.cpp (+6-6) 
- (modified) llvm/tools/llvm-exegesis/lib/Target.cpp (+12-13) 
- (modified) llvm/tools/llvm-exegesis/lib/X86/Target.cpp (+7-7) 
- (modified) llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp (+23-26) 
- (modified) llvm/tools/llvm-exegesis/lib/X86/X86Counter.h (+4-4) 
- (modified) llvm/tools/llvm-exegesis/llvm-exegesis.cpp (+9-11) 


``````````diff
diff --git a/llvm/tools/llvm-exegesis/lib/Analysis.cpp b/llvm/tools/llvm-exegesis/lib/Analysis.cpp
index 2b924b9423f4e0c..418fee8be74f0e5 100644
--- a/llvm/tools/llvm-exegesis/lib/Analysis.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Analysis.cpp
@@ -254,8 +254,7 @@ static void writeLatencySnippetHtml(raw_ostream &OS,
   }
 }
 
-void Analysis::printPointHtml(const Benchmark &Point,
-                              llvm::raw_ostream &OS) const {
+void Analysis::printPointHtml(const Benchmark &Point, raw_ostream &OS) const {
   OS << "<li><span class=\"mono\" title=\"";
   writeSnippet<EscapeTag, kEscapeHtmlString>(OS, Point.AssembledSnippet, "\n");
   OS << "\">";
@@ -410,9 +409,9 @@ void Analysis::printSchedClassDescHtml(const ResolvedSchedClass &RSC,
   OS << "</table>";
 }
 
-void Analysis::printClusterRawHtml(
-    const BenchmarkClustering::ClusterId &Id, StringRef display_name,
-    llvm::raw_ostream &OS) const {
+void Analysis::printClusterRawHtml(const BenchmarkClustering::ClusterId &Id,
+                                   StringRef display_name,
+                                   raw_ostream &OS) const {
   const auto &Points = Clustering_.getPoints();
   const auto &Cluster = Clustering_.getCluster(Id);
   if (Cluster.PointIndices.empty())
@@ -538,8 +537,8 @@ Error Analysis::run<Analysis::PrintSchedClassInconsistencies>(
         continue; // Ignore noise and errors. FIXME: take noise into account ?
       if (ClusterId.isUnstable() ^ AnalysisDisplayUnstableOpcodes_)
         continue; // Either display stable or unstable clusters only.
-      auto SchedClassClusterIt = llvm::find_if(
-          SchedClassClusters, [ClusterId](const SchedClassCluster &C) {
+      auto SchedClassClusterIt =
+          find_if(SchedClassClusters, [ClusterId](const SchedClassCluster &C) {
             return C.id() == ClusterId;
           });
       if (SchedClassClusterIt == SchedClassClusters.end()) {
diff --git a/llvm/tools/llvm-exegesis/lib/Analysis.h b/llvm/tools/llvm-exegesis/lib/Analysis.h
index 4a85d45a2d56a62..16eccf6879c2344 100644
--- a/llvm/tools/llvm-exegesis/lib/Analysis.h
+++ b/llvm/tools/llvm-exegesis/lib/Analysis.h
@@ -76,10 +76,9 @@ class Analysis {
   void printInstructionRowCsv(size_t PointId, raw_ostream &OS) const;
 
   void printClusterRawHtml(const BenchmarkClustering::ClusterId &Id,
-                           StringRef display_name, llvm::raw_ostream &OS) const;
+                           StringRef display_name, raw_ostream &OS) const;
 
-  void printPointHtml(const Benchmark &Point,
-                      llvm::raw_ostream &OS) const;
+  void printPointHtml(const Benchmark &Point, raw_ostream &OS) const;
 
   void
   printSchedClassClustersHtml(const std::vector<SchedClassCluster> &Clusters,
diff --git a/llvm/tools/llvm-exegesis/lib/Assembler.cpp b/llvm/tools/llvm-exegesis/lib/Assembler.cpp
index 307b951f4a8496e..3aad91359789688 100644
--- a/llvm/tools/llvm-exegesis/lib/Assembler.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Assembler.cpp
@@ -366,14 +366,14 @@ Expected<ExecutableFunction> ExecutableFunction::create(
   auto SymbolSizes = object::computeSymbolSizes(*ObjectFileHolder.getBinary());
   // Get the size of the function that we want to call into (with the name of
   // FunctionID).
-  auto SymbolIt = llvm::find_if(SymbolSizes, [&](const auto &Pair) {
+  auto SymbolIt = find_if(SymbolSizes, [&](const auto &Pair) {
     auto SymbolName = Pair.first.getName();
     if (SymbolName)
       return *SymbolName == FunctionID;
     // We should always succeed in finding the FunctionID, hence we suppress
     // the error here and assert later on the search result, rather than
     // propagating the Expected<> error back to the caller.
-    llvm::consumeError(SymbolName.takeError());
+    consumeError(SymbolName.takeError());
     return false;
   });
   assert(SymbolIt != SymbolSizes.end() &&
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
index 2b512284f9409aa..81ac7e7ebfde5b0 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
@@ -63,8 +63,8 @@ BenchmarkRunner::BenchmarkRunner(const LLVMState &State, Benchmark::ModeE Mode,
 BenchmarkRunner::~BenchmarkRunner() = default;
 
 void BenchmarkRunner::FunctionExecutor::accumulateCounterValues(
-    const llvm::SmallVectorImpl<int64_t> &NewValues,
-    llvm::SmallVectorImpl<int64_t> *Result) {
+    const SmallVectorImpl<int64_t> &NewValues,
+    SmallVectorImpl<int64_t> *Result) {
   const size_t NumValues = std::max(NewValues.size(), Result->size());
   if (NumValues > Result->size())
     Result->resize(NumValues, 0);
@@ -72,13 +72,13 @@ void BenchmarkRunner::FunctionExecutor::accumulateCounterValues(
     (*Result)[I] += NewValues[I];
 }
 
-Expected<llvm::SmallVector<int64_t, 4>>
+Expected<SmallVector<int64_t, 4>>
 BenchmarkRunner::FunctionExecutor::runAndSample(
     const char *Counters, ArrayRef<const char *> ValidationCounters,
     SmallVectorImpl<int64_t> &ValidationCounterValues) const {
   // We sum counts when there are several counters for a single ProcRes
   // (e.g. P23 on SandyBridge).
-  llvm::SmallVector<int64_t, 4> CounterValues;
+  SmallVector<int64_t, 4> CounterValues;
   SmallVector<StringRef, 2> CounterNames;
   StringRef(Counters).split(CounterNames, '+');
   for (auto &CounterName : CounterNames) {
@@ -114,9 +114,8 @@ class InProcessFunctionExecutorImpl : public BenchmarkRunner::FunctionExecutor {
                                 BenchmarkRunner::ScratchSpace *Scratch)
       : State(State), Function(std::move(Function)), Scratch(Scratch) {}
 
-  static void
-  accumulateCounterValues(const llvm::SmallVector<int64_t, 4> &NewValues,
-                          llvm::SmallVector<int64_t, 4> *Result) {
+  static void accumulateCounterValues(const SmallVector<int64_t, 4> &NewValues,
+                                      SmallVector<int64_t, 4> *Result) {
     const size_t NumValues = std::max(NewValues.size(), Result->size());
     if (NumValues > Result->size())
       Result->resize(NumValues, 0);
@@ -124,7 +123,7 @@ class InProcessFunctionExecutorImpl : public BenchmarkRunner::FunctionExecutor {
       (*Result)[I] += NewValues[I];
   }
 
-  Expected<llvm::SmallVector<int64_t, 4>> runWithCounter(
+  Expected<SmallVector<int64_t, 4>> runWithCounter(
       StringRef CounterName, ArrayRef<const char *> ValidationCounters,
       SmallVectorImpl<int64_t> &ValidationCounterValues) const override {
     const ExegesisTarget &ET = State.getExegesisTarget();
@@ -314,7 +313,7 @@ class SubProcessFunctionExecutorImpl
       close(PipeFiles[1]);
       // Unregister handlers, signal handling is now handled through ptrace in
       // the host process
-      llvm::sys::unregisterHandlers();
+      sys::unregisterHandlers();
       prepareAndRunBenchmark(PipeFiles[0], Key);
       // The child process terminates in the above function, so we should never
       // get to this point.
@@ -484,7 +483,7 @@ class SubProcessFunctionExecutorImpl
     exit(0);
   }
 
-  Expected<llvm::SmallVector<int64_t, 4>> runWithCounter(
+  Expected<SmallVector<int64_t, 4>> runWithCounter(
       StringRef CounterName, ArrayRef<const char *> ValidationCounters,
       SmallVectorImpl<int64_t> &ValidationCounterValues) const override {
     SmallVector<int64_t, 4> Value(1, 0);
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
index aab4b54242e4b1a..9a0cdea197c46b2 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.h
@@ -93,16 +93,16 @@ class BenchmarkRunner {
   public:
     virtual ~FunctionExecutor();
 
-    Expected<llvm::SmallVector<int64_t, 4>>
+    Expected<SmallVector<int64_t, 4>>
     runAndSample(const char *Counters,
                  ArrayRef<const char *> ValidationCounters,
                  SmallVectorImpl<int64_t> &ValidationCounterValues) const;
 
   protected:
     static void
-    accumulateCounterValues(const llvm::SmallVectorImpl<int64_t> &NewValues,
-                            llvm::SmallVectorImpl<int64_t> *Result);
-    virtual Expected<llvm::SmallVector<int64_t, 4>>
+    accumulateCounterValues(const SmallVectorImpl<int64_t> &NewValues,
+                            SmallVectorImpl<int64_t> *Result);
+    virtual Expected<SmallVector<int64_t, 4>>
     runWithCounter(StringRef CounterName,
                    ArrayRef<const char *> ValidationCounters,
                    SmallVectorImpl<int64_t> &ValidationCounterValues) const = 0;
diff --git a/llvm/tools/llvm-exegesis/lib/Clustering.cpp b/llvm/tools/llvm-exegesis/lib/Clustering.cpp
index 1f1fca4d530bac9..fc79718fdeb22b3 100644
--- a/llvm/tools/llvm-exegesis/lib/Clustering.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Clustering.cpp
@@ -307,7 +307,7 @@ void BenchmarkClustering::stabilize(unsigned NumOpcodes) {
       assert(std::distance(it, OldCluster.PointIndices.end()) > 0 &&
              "Should have found at least one bad point");
       // Mark to-be-moved points as belonging to the new cluster.
-      for (size_t P : llvm::make_range(it, OldCluster.PointIndices.end()))
+      for (size_t P : make_range(it, OldCluster.PointIndices.end()))
         ClusterIdForPoint_[P] = UnstableCluster.Id;
       // Actually append to-be-moved points to the new cluster.
       UnstableCluster.PointIndices.insert(UnstableCluster.PointIndices.end(),
diff --git a/llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp b/llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp
index eb7f70fb2b84017..633740494e33e70 100644
--- a/llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp
+++ b/llvm/tools/llvm-exegesis/lib/LatencyBenchmarkRunner.cpp
@@ -33,7 +33,7 @@ LatencyBenchmarkRunner::LatencyBenchmarkRunner(
 
 LatencyBenchmarkRunner::~LatencyBenchmarkRunner() = default;
 
-static double computeVariance(const llvm::SmallVector<int64_t, 4> &Values) {
+static double computeVariance(const SmallVector<int64_t, 4> &Values) {
   if (Values.empty())
     return 0.0;
   double Sum = std::accumulate(Values.begin(), Values.end(), 0.0);
@@ -47,19 +47,19 @@ static double computeVariance(const llvm::SmallVector<int64_t, 4> &Values) {
   return Ret / Values.size();
 }
 
-static int64_t findMin(const llvm::SmallVector<int64_t, 4> &Values) {
+static int64_t findMin(const SmallVector<int64_t, 4> &Values) {
   if (Values.empty())
     return 0;
   return *std::min_element(Values.begin(), Values.end());
 }
 
-static int64_t findMax(const llvm::SmallVector<int64_t, 4> &Values) {
+static int64_t findMax(const SmallVector<int64_t, 4> &Values) {
   if (Values.empty())
     return 0;
   return *std::max_element(Values.begin(), Values.end());
 }
 
-static int64_t findMean(const llvm::SmallVector<int64_t, 4> &Values) {
+static int64_t findMean(const SmallVector<int64_t, 4> &Values) {
   if (Values.empty())
     return 0;
   return std::accumulate(Values.begin(), Values.end(), 0.0) /
@@ -71,7 +71,7 @@ Expected<std::vector<BenchmarkMeasure>> LatencyBenchmarkRunner::runMeasurements(
   // Cycle measurements include some overhead from the kernel. Repeat the
   // measure several times and return the aggregated value, as specified by
   // ResultAggMode.
-  llvm::SmallVector<int64_t, 4> AccumulatedValues;
+  SmallVector<int64_t, 4> AccumulatedValues;
   double MinVariance = std::numeric_limits<double>::infinity();
   const PfmCountersInfo &PCI = State.getPfmCounters();
   const char *CounterName = PCI.CycleCounter;
@@ -125,8 +125,8 @@ Expected<std::vector<BenchmarkMeasure>> LatencyBenchmarkRunner::runMeasurements(
   switch (ResultAggMode) {
   case Benchmark::MinVariance: {
     if (ValuesCount == 1)
-      llvm::errs() << "Each sample only has one value. result-aggregation-mode "
-                      "of min-variance is probably non-sensical\n";
+      errs() << "Each sample only has one value. result-aggregation-mode "
+                "of min-variance is probably non-sensical\n";
     std::vector<BenchmarkMeasure> Result;
     Result.reserve(AccumulatedValues.size());
     for (const int64_t Value : AccumulatedValues)
@@ -153,10 +153,10 @@ Expected<std::vector<BenchmarkMeasure>> LatencyBenchmarkRunner::runMeasurements(
     return std::move(Result);
   }
   }
-  return llvm::make_error<Failure>(llvm::Twine("Unexpected benchmark mode(")
-                                       .concat(std::to_string(Mode))
-                                       .concat(" and unexpected ResultAggMode ")
-                                       .concat(std::to_string(ResultAggMode)));
+  return make_error<Failure>(Twine("Unexpected benchmark mode(")
+                                 .concat(std::to_string(Mode))
+                                 .concat(" and unexpected ResultAggMode ")
+                                 .concat(std::to_string(ResultAggMode)));
 }
 
 } // namespace exegesis
diff --git a/llvm/tools/llvm-exegesis/lib/LlvmState.cpp b/llvm/tools/llvm-exegesis/lib/LlvmState.cpp
index 8aeea456fba1fe5..17d09a1ec0cf34d 100644
--- a/llvm/tools/llvm-exegesis/lib/LlvmState.cpp
+++ b/llvm/tools/llvm-exegesis/lib/LlvmState.cpp
@@ -35,43 +35,42 @@ Expected<LLVMState> LLVMState::Create(std::string TripleName,
   const Target *TheTarget =
       TargetRegistry::lookupTarget(/*MArch=*/"", TheTriple, Error);
   if (!TheTarget) {
-    return llvm::make_error<llvm::StringError>("no LLVM target for triple " +
-                                                   TripleName,
-                                               llvm::inconvertibleErrorCode());
+    return make_error<StringError>("no LLVM target for triple " + TripleName,
+                                   inconvertibleErrorCode());
   }
 
   // Update Triple with the updated triple from the target lookup.
   TripleName = TheTriple.str();
 
   if (CpuName == "native")
-    CpuName = std::string(llvm::sys::getHostCPUName());
+    CpuName = std::string(sys::getHostCPUName());
 
   std::unique_ptr<MCSubtargetInfo> STI(
       TheTarget->createMCSubtargetInfo(TripleName, CpuName, ""));
   assert(STI && "Unable to create subtarget info!");
   if (!STI->isCPUStringValid(CpuName)) {
-    return llvm::make_error<llvm::StringError>(Twine("invalid CPU name (")
-                                                   .concat(CpuName)
-                                                   .concat(") for triple ")
-                                                   .concat(TripleName),
-                                               llvm::inconvertibleErrorCode());
+    return make_error<StringError>(Twine("invalid CPU name (")
+                                       .concat(CpuName)
+                                       .concat(") for triple ")
+                                       .concat(TripleName),
+                                   inconvertibleErrorCode());
   }
   const TargetOptions Options;
   std::unique_ptr<const TargetMachine> TM(
       static_cast<LLVMTargetMachine *>(TheTarget->createTargetMachine(
           TripleName, CpuName, Features, Options, Reloc::Model::Static)));
   if (!TM) {
-    return llvm::make_error<llvm::StringError>(
-        "unable to create target machine", llvm::inconvertibleErrorCode());
+    return make_error<StringError>("unable to create target machine",
+                                   inconvertibleErrorCode());
   }
 
   const ExegesisTarget *ET =
       TripleName.empty() ? &ExegesisTarget::getDefault()
                          : ExegesisTarget::lookup(TM->getTargetTriple());
   if (!ET) {
-    return llvm::make_error<llvm::StringError>(
-        "no Exegesis target for triple " + TripleName,
-        llvm::inconvertibleErrorCode());
+    return make_error<StringError>("no Exegesis target for triple " +
+                                       TripleName,
+                                   inconvertibleErrorCode());
   }
   const PfmCountersInfo &PCI = UseDummyPerfCounters
                                    ? ET->getDummyPfmCounters()
diff --git a/llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp b/llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp
index d781605a601f7a4..9c926d1fc61124d 100644
--- a/llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp
+++ b/llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp
@@ -105,7 +105,7 @@ std::unique_ptr<Instruction>
 Instruction::create(const MCInstrInfo &InstrInfo,
                     const RegisterAliasingTrackerCache &RATC,
                     const BitVectorCache &BVC, unsigned Opcode) {
-  const llvm::MCInstrDesc *const Description = &InstrInfo.get(Opcode);
+  const MCInstrDesc *const Description = &InstrInfo.get(Opcode);
   unsigned OpIndex = 0;
   SmallVector<Operand, 8> Operands;
   SmallVector<Variable, 4> Variables;
diff --git a/llvm/tools/llvm-exegesis/lib/Mips/Target.cpp b/llvm/tools/llvm-exegesis/lib/Mips/Target.cpp
index cc8cd5dd4a109d8..731e037c240df0f 100644
--- a/llvm/tools/llvm-exegesis/lib/Mips/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Mips/Target.cpp
@@ -58,7 +58,7 @@ class ExegesisMipsTarget : public ExegesisTarget {
       : ExegesisTarget(MipsCpuPfmCounters, Mips_MC::isOpcodeAvailable) {}
 
 private:
-  unsigned getScratchMemoryRegister(const llvm::Triple &TT) const override;
+  unsigned getScratchMemoryRegister(const Triple &TT) const override;
   unsigned getMaxMemoryAccessSize() const override { return 64; }
   void fillMemoryOperands(InstructionTemplate &IT, unsigned Reg,
                           unsigned Offset) const override;
diff --git a/llvm/tools/llvm-exegesis/lib/PerfHelper.cpp b/llvm/tools/llvm-exegesis/lib/PerfHelper.cpp
index 6b8df01e9f5440e..3f3288ceb1e4f09 100644
--- a/llvm/tools/llvm-exegesis/lib/PerfHelper.cpp
+++ b/llvm/tools/llvm-exegesis/lib/PerfHelper.cpp
@@ -136,8 +136,8 @@ ConfiguredEvent::readOrError(StringRef /*unused*/) const {
   ssize_t ReadSize = ::read(FileDescriptor, &Count, sizeof(Count));
 
   if (ReadSize != sizeof(Count))
-    return llvm::make_error<llvm::StringError>("Failed to read event counter",
-                                               llvm::errc::io_error);
+    return make_error<StringError>("Failed to read event counter",
+                                   errc::io_error);
 
   SmallVector<int64_t, 1> Result;
   Result.push_back(Count);
@@ -187,7 +187,7 @@ void CounterGroup::stop() {
     ioctl(getFileDescriptor(), PERF_EVENT_IOC_DISABLE, PERF_IOC_FLAG_GROUP);
 }
 
-llvm::Expected<llvm::SmallVector<int64_t, 4>>
+Expected<SmallVector<int64_t, 4>>
 CounterGroup::readOrError(StringRef FunctionBytes) const {
   if (!IsDummyEvent)
     return EventCounter.readOrError(FunctionBytes);
@@ -195,9 +195,9 @@ CounterGroup::readOrError(StringRef FunctionBytes) const {
     return SmallVector<int64_t, 1>(1, 42);
 }
 
-llvm::Expected<llvm::SmallVector<int64_t>>
+Expected<SmallVector<int64_t>>
 CounterGroup::readValidationCountersOrError() const {
-  llvm::SmallVector<int64_t, 4> Result;
+  SmallVector<int64_t, 4> Result;
   for (const auto &ValCounter : ValidationEventCounters) {
     Expected<SmallVector<int64_t>> ValueOrError =
         ValCounter.readOrError(StringRef());
@@ -223,18 +223,17 @@ void CounterGroup::start() {}
 
 void CounterGroup::stop() {}
 
-llvm::Expected<llvm::SmallVector<int64_t, 4>>
+Expected<SmallVector<int64_t, 4>>
 CounterGroup::readOrError(StringRef /*unused*/) const {
   if (IsDummyEvent) {
-    llvm::SmallVector<int64_t, 4> Result;
+    SmallVector<int64_t, 4> Result;
     Result.push_back(42);
     return Result;
   }
-  return llvm::make_error<llvm::StringError>("Not implemented",
-                                             llvm::errc::io_error);
+  return make_error<StringError>("Not implemented", errc::io_error);
 }
 
-llvm::Expected<llvm::SmallVector<int64_t>>
+Expected<SmallVector<int64_t>>
 CounterGroup::readValidationCountersOrError() const {
   return SmallVector<int64_t>(0);
 }
diff --git a/llvm/tools/llvm-exegesis/lib/PerfHelper.h b/llvm/tools/llvm-exegesis/lib/PerfHelper.h
index 7d050b85c9a8c3b..4a825b293b71692 100644
--- a/llvm/tools/llvm-exegesis/lib/PerfHelper.h
+++ b/llvm/tools/llvm-exegesis/lib/PerfHelper.h
@@ -127,11 +127,10 @@ class CounterGroup {
   /// within the benchmarked code.
   /// If empty (or not specified), then no filtering will be done.
   /// Not all counters choose to use this.
-  virtual llvm::Expected<llvm::SmallVector<int64_t, 4>>
+  virtual Expected<SmallVector<int64_t, 4>>
   readOrError(StringRef FunctionBytes = StringRef()) const;
 
-  virt...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/79802


More information about the llvm-commits mailing list