Skip to content

Reland [NFC] Move DroppedVariableStats to its own file and redesign it to be extensible. #117042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

rastogishubham
Copy link
Contributor

@rastogishubham rastogishubham commented Nov 20, 2024

Moved the IR unit test to the CodeGen folder to resolve linker errors:

error: undefined reference to 'vtable for llvm::DroppedVariableStatsIR'

This patch is trying to reland #115563

@llvmbot
Copy link
Member

llvmbot commented Nov 20, 2024

@llvm/pr-subscribers-llvm-ir

Author: Shubham Sandeep Rastogi (rastogishubham)

Changes

Moved the IR unit test to the CodeGen folder to resolve linker errors:

error: undefined reference to 'vtable for llvm::DroppedVariableStatsIR'


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

8 Files Affected:

  • (added) llvm/include/llvm/CodeGen/DroppedVariableStats.h (+226)
  • (modified) llvm/include/llvm/Passes/StandardInstrumentations.h (+2-78)
  • (modified) llvm/lib/CodeGen/CMakeLists.txt (+1)
  • (added) llvm/lib/CodeGen/DroppedVariableStats.cpp (+194)
  • (modified) llvm/lib/Passes/StandardInstrumentations.cpp (+2-176)
  • (modified) llvm/unittests/CodeGen/CMakeLists.txt (+1)
  • (renamed) llvm/unittests/CodeGen/DroppedVariableStatsIRTest.cpp (+30-44)
  • (modified) llvm/unittests/IR/CMakeLists.txt (-1)
diff --git a/llvm/include/llvm/CodeGen/DroppedVariableStats.h b/llvm/include/llvm/CodeGen/DroppedVariableStats.h
new file mode 100644
index 00000000000000..371d775b02e876
--- /dev/null
+++ b/llvm/include/llvm/CodeGen/DroppedVariableStats.h
@@ -0,0 +1,226 @@
+///===- DroppedVariableStats.h - Opt Diagnostics -*- C++ -*----------------===//
+///
+/// Part of the LLVM Project, under the Apache License v2.0 with LLVM
+/// Exceptions. See https://llvm.org/LICENSE.txt for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+///
+///===---------------------------------------------------------------------===//
+/// \file
+/// Dropped Variable Statistics for Debug Information. Reports any number
+/// of #dbg_value that get dropped due to an optimization pass.
+///
+///===---------------------------------------------------------------------===//
+
+#ifndef LLVM_CODEGEN_DROPPEDVARIABLESTATS_H
+#define LLVM_CODEGEN_DROPPEDVARIABLESTATS_H
+
+#include "llvm/CodeGen/MachinePassManager.h"
+#include "llvm/IR/DebugInfoMetadata.h"
+#include "llvm/IR/DiagnosticInfo.h"
+#include "llvm/IR/Function.h"
+#include "llvm/IR/Module.h"
+#include "llvm/IR/PassInstrumentation.h"
+
+namespace llvm {
+
+/// A unique key that represents a debug variable.
+/// First const DIScope *: Represents the scope of the debug variable.
+/// Second const DIScope *: Represents the InlinedAt scope of the debug
+/// variable. const DILocalVariable *: It is a pointer to the debug variable
+/// itself.
+using VarID =
+    std::tuple<const DIScope *, const DIScope *, const DILocalVariable *>;
+
+/// A base class to collect and print dropped debug information variable
+/// statistics.
+class DroppedVariableStats {
+public:
+  DroppedVariableStats(bool DroppedVarStatsEnabled)
+      : DroppedVariableStatsEnabled(DroppedVarStatsEnabled) {
+    if (DroppedVarStatsEnabled)
+      llvm::outs()
+          << "Pass Level, Pass Name, Num of Dropped Variables, Func or "
+             "Module Name\n";
+  };
+
+  virtual ~DroppedVariableStats() = default;
+
+  // We intend this to be unique per-compilation, thus no copies.
+  DroppedVariableStats(const DroppedVariableStats &) = delete;
+  void operator=(const DroppedVariableStats &) = delete;
+
+  bool getPassDroppedVariables() { return PassDroppedVariables; }
+
+protected:
+  void setup() {
+    DebugVariablesStack.push_back(
+        {DenseMap<const Function *, DebugVariables>()});
+    InlinedAts.push_back(
+        {DenseMap<StringRef, DenseMap<VarID, DILocation *>>()});
+  }
+
+  void cleanup() {
+    assert(!DebugVariablesStack.empty() &&
+           "DebugVariablesStack shouldn't be empty!");
+    assert(!InlinedAts.empty() && "InlinedAts shouldn't be empty!");
+    DebugVariablesStack.pop_back();
+    InlinedAts.pop_back();
+  }
+
+  bool DroppedVariableStatsEnabled = false;
+  struct DebugVariables {
+    /// DenseSet of VarIDs before an optimization pass has run.
+    DenseSet<VarID> DebugVariablesBefore;
+    /// DenseSet of VarIDs after an optimization pass has run.
+    DenseSet<VarID> DebugVariablesAfter;
+  };
+
+protected:
+  /// A stack of a DenseMap, that maps DebugVariables for every pass to an
+  /// llvm::Function. A stack is used because an optimization pass can call
+  /// other passes.
+  SmallVector<DenseMap<const Function *, DebugVariables>> DebugVariablesStack;
+
+  /// A DenseSet tracking whether a scope was visited before.
+  DenseSet<const DIScope *> VisitedScope;
+  /// A stack of DenseMaps, which map the name of an llvm::Function to a
+  /// DenseMap of VarIDs and their inlinedAt locations before an optimization
+  /// pass has run.
+  SmallVector<DenseMap<StringRef, DenseMap<VarID, DILocation *>>> InlinedAts;
+  /// Calculate the number of dropped variables in an llvm::Function or
+  /// llvm::MachineFunction and print the relevant information to stdout.
+  void calculateDroppedStatsAndPrint(DebugVariables &DbgVariables,
+                                     StringRef FuncName, StringRef PassID,
+                                     StringRef FuncOrModName,
+                                     StringRef PassLevel, const Function *Func);
+
+  /// Check if a \p Var has been dropped or is a false positive. Also update the
+  /// \p DroppedCount if a debug variable is dropped.
+  bool updateDroppedCount(DILocation *DbgLoc, const DIScope *Scope,
+                          const DIScope *DbgValScope,
+                          DenseMap<VarID, DILocation *> &InlinedAtsMap,
+                          VarID Var, unsigned &DroppedCount);
+  /// Run code to populate relevant data structures over an llvm::Function or
+  /// llvm::MachineFunction.
+  void run(DebugVariables &DbgVariables, StringRef FuncName, bool Before);
+  /// Populate the VarIDSet and InlinedAtMap with the relevant information
+  /// needed for before and after pass analysis to determine dropped variable
+  /// status.
+  void populateVarIDSetAndInlinedMap(
+      const DILocalVariable *DbgVar, DebugLoc DbgLoc, DenseSet<VarID> &VarIDSet,
+      DenseMap<StringRef, DenseMap<VarID, DILocation *>> &InlinedAtsMap,
+      StringRef FuncName, bool Before);
+  /// Visit every llvm::Instruction or llvm::MachineInstruction and check if the
+  /// debug variable denoted by its ID \p Var may have been dropped by an
+  /// optimization pass.
+  virtual void
+  visitEveryInstruction(unsigned &DroppedCount,
+                        DenseMap<VarID, DILocation *> &InlinedAtsMap,
+                        VarID Var) = 0;
+  /// Visit every debug record in an llvm::Function or llvm::MachineFunction
+  /// and call populateVarIDSetAndInlinedMap on it.
+  virtual void visitEveryDebugRecord(
+      DenseSet<VarID> &VarIDSet,
+      DenseMap<StringRef, DenseMap<VarID, DILocation *>> &InlinedAtsMap,
+      StringRef FuncName, bool Before) = 0;
+
+private:
+  /// Remove a dropped debug variable's VarID from all Sets in the
+  /// DroppedVariablesBefore stack.
+  void removeVarFromAllSets(VarID Var, const Function *F) {
+    // Do not remove Var from the last element, it will be popped from the
+    // stack.
+    for (auto &DebugVariablesMap : llvm::drop_end(DebugVariablesStack))
+      DebugVariablesMap[F].DebugVariablesBefore.erase(Var);
+  }
+  /// Return true if \p Scope is the same as \p DbgValScope or a child scope of
+  /// \p DbgValScope, return false otherwise.
+  bool isScopeChildOfOrEqualTo(const DIScope *Scope,
+                               const DIScope *DbgValScope);
+  /// Return true if \p InlinedAt is the same as \p DbgValInlinedAt or part of
+  /// the InlinedAt chain, return false otherwise.
+  bool isInlinedAtChildOfOrEqualTo(const DILocation *InlinedAt,
+                                   const DILocation *DbgValInlinedAt);
+  bool PassDroppedVariables = false;
+};
+
+/// A class to collect and print dropped debug information due to LLVM IR
+/// optimization passes. After every LLVM IR pass is run, it will print how many
+/// #dbg_values were dropped due to that pass.
+class DroppedVariableStatsIR : public DroppedVariableStats {
+public:
+  DroppedVariableStatsIR(bool DroppedVarStatsEnabled)
+      : llvm::DroppedVariableStats(DroppedVarStatsEnabled) {}
+
+  virtual ~DroppedVariableStatsIR() = default;
+
+  void runBeforePass(Any IR) {
+    setup();
+    if (const auto *M = unwrapIR<Module>(IR))
+      return this->runOnModule(M, true);
+    if (const auto *F = unwrapIR<Function>(IR))
+      return this->runOnFunction(F, true);
+  }
+
+  void runAfterPass(StringRef P, Any IR) {
+    if (const auto *M = unwrapIR<Module>(IR))
+      runAfterPassModule(P, M);
+    else if (const auto *F = unwrapIR<Function>(IR))
+      runAfterPassFunction(P, F);
+    cleanup();
+  }
+
+  void registerCallbacks(PassInstrumentationCallbacks &PIC);
+
+private:
+  const Function *Func;
+
+  void runAfterPassFunction(StringRef PassID, const Function *F) {
+    runOnFunction(F, false);
+    calculateDroppedVarStatsOnFunction(F, PassID, F->getName().str(),
+                                       "Function");
+  }
+
+  void runAfterPassModule(StringRef PassID, const Module *M) {
+    runOnModule(M, false);
+    calculateDroppedVarStatsOnModule(M, PassID, M->getName().str(), "Module");
+  }
+  /// Populate DebugVariablesBefore, DebugVariablesAfter, InlinedAts before or
+  /// after a pass has run to facilitate dropped variable calculation for an
+  /// llvm::Function.
+  void runOnFunction(const Function *F, bool Before);
+  /// Iterate over all Instructions in a Function and report any dropped debug
+  /// information.
+  void calculateDroppedVarStatsOnFunction(const Function *F, StringRef PassID,
+                                          StringRef FuncOrModName,
+                                          StringRef PassLevel);
+  /// Populate DebugVariablesBefore, DebugVariablesAfter, InlinedAts before or
+  /// after a pass has run to facilitate dropped variable calculation for an
+  /// llvm::Module. Calls runOnFunction on every Function in the Module.
+  void runOnModule(const Module *M, bool Before);
+  /// Iterate over all Functions in a Module and report any dropped debug
+  /// information. Will call calculateDroppedVarStatsOnFunction on every
+  /// Function.
+  void calculateDroppedVarStatsOnModule(const Module *M, StringRef PassID,
+                                        StringRef FuncOrModName,
+                                        StringRef PassLevel);
+  /// Override base class method to run on an llvm::Function specifically.
+  virtual void
+  visitEveryInstruction(unsigned &DroppedCount,
+                        DenseMap<VarID, DILocation *> &InlinedAtsMap,
+                        VarID Var) override;
+  /// Override base class method to run on #dbg_values specifically.
+  virtual void visitEveryDebugRecord(
+      DenseSet<VarID> &VarIDSet,
+      DenseMap<StringRef, DenseMap<VarID, DILocation *>> &InlinedAtsMap,
+      StringRef FuncName, bool Before) override;
+
+  template <typename IRUnitT> static const IRUnitT *unwrapIR(Any IR) {
+    const IRUnitT **IRPtr = llvm::any_cast<const IRUnitT *>(&IR);
+    return IRPtr ? *IRPtr : nullptr;
+  }
+};
+
+} // namespace llvm
+
+#endif
diff --git a/llvm/include/llvm/Passes/StandardInstrumentations.h b/llvm/include/llvm/Passes/StandardInstrumentations.h
index 9301a12c740eec..12a34c099eaffe 100644
--- a/llvm/include/llvm/Passes/StandardInstrumentations.h
+++ b/llvm/include/llvm/Passes/StandardInstrumentations.h
@@ -19,6 +19,7 @@
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSet.h"
+#include "llvm/CodeGen/DroppedVariableStats.h"
 #include "llvm/CodeGen/MachineBasicBlock.h"
 #include "llvm/IR/BasicBlock.h"
 #include "llvm/IR/DebugInfoMetadata.h"
@@ -579,83 +580,6 @@ class PrintCrashIRInstrumentation {
   static void SignalHandler(void *);
 };
 
-/// A class to collect and print dropped debug information variable statistics.
-/// After every LLVM IR pass is run, it will print how many #dbg_values were
-/// dropped due to that pass.
-class DroppedVariableStats {
-public:
-  DroppedVariableStats(bool DroppedVarStatsEnabled) {
-    if (DroppedVarStatsEnabled)
-      llvm::outs()
-          << "Pass Level, Pass Name, Num of Dropped Variables, Func or "
-             "Module Name\n";
-  };
-  // We intend this to be unique per-compilation, thus no copies.
-  DroppedVariableStats(const DroppedVariableStats &) = delete;
-  void operator=(const DroppedVariableStats &) = delete;
-
-  void registerCallbacks(PassInstrumentationCallbacks &PIC);
-  void runBeforePass(StringRef PassID, Any IR);
-  void runAfterPass(StringRef PassID, Any IR, const PreservedAnalyses &PA);
-  void runAfterPassInvalidated(StringRef PassID, const PreservedAnalyses &PA);
-  bool getPassDroppedVariables() { return PassDroppedVariables; }
-
-private:
-  bool PassDroppedVariables = false;
-  /// A unique key that represents a #dbg_value.
-  using VarID =
-      std::tuple<const DIScope *, const DIScope *, const DILocalVariable *>;
-
-  struct DebugVariables {
-    /// DenseSet of VarIDs before an optimization pass has run.
-    DenseSet<VarID> DebugVariablesBefore;
-    /// DenseSet of VarIDs after an optimization pass has run.
-    DenseSet<VarID> DebugVariablesAfter;
-  };
-
-  /// A stack of a DenseMap, that maps DebugVariables for every pass to an
-  /// llvm::Function. A stack is used because an optimization pass can call
-  /// other passes.
-  SmallVector<DenseMap<const Function *, DebugVariables>> DebugVariablesStack;
-
-  /// A DenseSet tracking whether a scope was visited before.
-  DenseSet<const DIScope *> VisitedScope;
-  /// A stack of DenseMaps, which map the name of an llvm::Function to a
-  /// DenseMap of VarIDs and their inlinedAt locations before an optimization
-  /// pass has run.
-  SmallVector<DenseMap<StringRef, DenseMap<VarID, DILocation *>>> InlinedAts;
-
-  /// Iterate over all Functions in a Module and report any dropped debug
-  /// information. Will call calculateDroppedVarStatsOnFunction on every
-  /// Function.
-  void calculateDroppedVarStatsOnModule(const Module *M, StringRef PassID,
-                                        std::string FuncOrModName,
-                                        std::string PassLevel);
-  /// Iterate over all Instructions in a Function and report any dropped debug
-  /// information.
-  void calculateDroppedVarStatsOnFunction(const Function *F, StringRef PassID,
-                                          std::string FuncOrModName,
-                                          std::string PassLevel);
-  /// Populate DebugVariablesBefore, DebugVariablesAfter, InlinedAts before or
-  /// after a pass has run to facilitate dropped variable calculation for an
-  /// llvm::Function.
-  void runOnFunction(const Function *F, bool Before);
-  /// Populate DebugVariablesBefore, DebugVariablesAfter, InlinedAts before or
-  /// after a pass has run to facilitate dropped variable calculation for an
-  /// llvm::Module. Calls runOnFunction on every Function in the Module.
-  void runOnModule(const Module *M, bool Before);
-  /// Remove a dropped #dbg_value VarID from all Sets in the
-  /// DroppedVariablesBefore stack.
-  void removeVarFromAllSets(VarID Var, const Function *F);
-  /// Return true if \p Scope is the same as \p DbgValScope or a child scope of
-  /// \p DbgValScope, return false otherwise.
-  bool isScopeChildOfOrEqualTo(DIScope *Scope, const DIScope *DbgValScope);
-  /// Return true if \p InlinedAt is the same as \p DbgValInlinedAt or part of
-  /// the InlinedAt chain, return false otherwise.
-  bool isInlinedAtChildOfOrEqualTo(const DILocation *InlinedAt,
-                                   const DILocation *DbgValInlinedAt);
-};
-
 /// This class provides an interface to register all the standard pass
 /// instrumentations and manages their state (if any).
 class StandardInstrumentations {
@@ -673,7 +597,7 @@ class StandardInstrumentations {
   PrintCrashIRInstrumentation PrintCrashIR;
   IRChangedTester ChangeTester;
   VerifyInstrumentation Verify;
-  DroppedVariableStats DroppedStats;
+  DroppedVariableStatsIR DroppedStatsIR;
 
   bool VerifyEach;
 
diff --git a/llvm/lib/CodeGen/CMakeLists.txt b/llvm/lib/CodeGen/CMakeLists.txt
index 7b47c0e6f75dbe..263d4a9ee94d2e 100644
--- a/llvm/lib/CodeGen/CMakeLists.txt
+++ b/llvm/lib/CodeGen/CMakeLists.txt
@@ -50,6 +50,7 @@ add_llvm_component_library(LLVMCodeGen
   DeadMachineInstructionElim.cpp
   DetectDeadLanes.cpp
   DFAPacketizer.cpp
+  DroppedVariableStats.cpp
   DwarfEHPrepare.cpp
   EarlyIfConversion.cpp
   EdgeBundles.cpp
diff --git a/llvm/lib/CodeGen/DroppedVariableStats.cpp b/llvm/lib/CodeGen/DroppedVariableStats.cpp
new file mode 100644
index 00000000000000..122fcad1293f1e
--- /dev/null
+++ b/llvm/lib/CodeGen/DroppedVariableStats.cpp
@@ -0,0 +1,194 @@
+///===- DroppedVariableStats.cpp ------------------------------------------===//
+///
+/// Part of the LLVM Project, under the Apache License v2.0 with LLVM
+/// Exceptions. See https://llvm.org/LICENSE.txt for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+///
+///===---------------------------------------------------------------------===//
+/// \file
+/// Dropped Variable Statistics for Debug Information. Reports any number
+/// of #dbg_value that get dropped due to an optimization pass.
+///
+///===---------------------------------------------------------------------===//
+
+#include "llvm/CodeGen/DroppedVariableStats.h"
+#include "llvm/IR/DebugInfoMetadata.h"
+#include "llvm/IR/InstIterator.h"
+#include "llvm/IR/Module.h"
+
+using namespace llvm;
+
+bool DroppedVariableStats::isScopeChildOfOrEqualTo(const DIScope *Scope,
+                                                   const DIScope *DbgValScope) {
+  while (Scope != nullptr) {
+    if (VisitedScope.find(Scope) == VisitedScope.end()) {
+      VisitedScope.insert(Scope);
+      if (Scope == DbgValScope) {
+        VisitedScope.clear();
+        return true;
+      }
+      Scope = Scope->getScope();
+    } else {
+      VisitedScope.clear();
+      return false;
+    }
+  }
+  return false;
+}
+
+bool DroppedVariableStats::isInlinedAtChildOfOrEqualTo(
+    const DILocation *InlinedAt, const DILocation *DbgValInlinedAt) {
+  if (DbgValInlinedAt == InlinedAt)
+    return true;
+  if (!DbgValInlinedAt)
+    return false;
+  auto *IA = InlinedAt;
+  while (IA) {
+    if (IA == DbgValInlinedAt)
+      return true;
+    IA = IA->getInlinedAt();
+  }
+  return false;
+}
+
+void DroppedVariableStats::calculateDroppedStatsAndPrint(
+    DebugVariables &DbgVariables, StringRef FuncName, StringRef PassID,
+    StringRef FuncOrModName, StringRef PassLevel, const Function *Func) {
+  unsigned DroppedCount = 0;
+  DenseSet<VarID> &DebugVariablesBeforeSet = DbgVariables.DebugVariablesBefore;
+  DenseSet<VarID> &DebugVariablesAfterSet = DbgVariables.DebugVariablesAfter;
+  DenseMap<VarID, DILocation *> &InlinedAtsMap = InlinedAts.back()[FuncName];
+  // Find an Instruction that shares the same scope as the dropped #dbg_value or
+  // has a scope that is the child of the scope of the #dbg_value, and has an
+  // inlinedAt equal to the inlinedAt of the #dbg_value or it's inlinedAt chain
+  // contains the inlinedAt of the #dbg_value, if such an Instruction is found,
+  // debug information is dropped.
+  for (VarID Var : DebugVariablesBeforeSet) {
+    if (DebugVariablesAfterSet.contains(Var))
+      continue;
+    visitEveryInstruction(DroppedCount, InlinedAtsMap, Var);
+    removeVarFromAllSets(Var, Func);
+  }
+  if (DroppedCount > 0) {
+    llvm::outs() << PassLevel << ", " << PassID << ", " << DroppedCount << ", "
+                 << FuncOrModName << "\n";
+    PassDroppedVariables = true;
+  } else
+    PassDroppedVariables = false;
+}
+
+bool DroppedVariableStats::updateDroppedCount(
+    DILocation *DbgLoc, const DIScope *Scope, const DIScope *DbgValScope,
+    DenseMap<VarID, DILocation *> &InlinedAtsMap, VarID Var,
+    unsigned &DroppedCount) {
+
+  // If the Scope is a child of, or equal to the DbgValScope and is inlined at
+  // the Var's InlinedAt location, return true to signify that the Var has been
+  // dropped.
+  if (isScopeChildOfOrEqualTo(Scope, DbgValScope))
+    if (isInlinedAtChildOfOrEqualTo(DbgLoc->getInlinedAt(),
+                                    InlinedAtsMap[Var])) {
+      // Found another instruction in the variable's scope, so there exists a
+      // break point at which the variable could be observed. Count it as
+      // dropped.
+      DroppedCount++;
+      return true;
+    }
+  return false;
+}
+
+void DroppedVariableStats::run(DebugVariables &DbgVariables, StringRef FuncName,
+                               bool Before) {
+  auto &VarIDSet = (Before ? DbgVariables.DebugVariablesBefore
+                           : DbgVariables.DebugVariablesAfter);
+  auto &InlinedAtsMap = InlinedAts.back();
+  if (Before)
+    InlinedAtsMap.try_emplace(FuncName, DenseMap<VarID, DILocation *>());
+  VarIDSet = DenseSet<VarID>();
+  visitEveryDebugRecord(VarIDSet, InlinedAtsMap, FuncName, Before);
+}
+
+void DroppedVariableStats::populateVarIDSetAndInlinedMap(
+    const DILocalVariable *DbgVar, DebugLoc DbgLoc, DenseSet<VarID> &VarIDSet,
+    DenseMap<StringRef, DenseMap<VarID, DILocation *>> &InlinedAtsMap,
+    StringRef FuncName, bool Before) {
+  VarID Key{DbgVar->getScope(), DbgLoc->getInlinedAtScope(), DbgVar};
+  VarIDSet.insert(Key);
+  if (Before)
+    InlinedAt...
[truncated]

…t to be extensible.

Moved the IR unit test to the CodeGen folder to resolve linker errors:

error: undefined reference to 'vtable for llvm::DroppedVariableStatsIR'
@rastogishubham rastogishubham merged commit acf3b1a into llvm:main Dec 3, 2024
8 checks passed
@rastogishubham rastogishubham deleted the DroppedRefactorFix branch December 3, 2024 18:39
@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 3, 2024

LLVM Buildbot has detected a new failure on builder clang-cmake-x86_64-avx512-linux running on avx512-intel64 while building llvm at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/7786

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Profile-i386 :: Linux/corrupted-profile.c' FAILED ********************
Exit Code: 2

Command Output (stderr):
--
RUN: at line 1: rm -f /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw
+ rm -f /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw
RUN: at line 2: touch /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw
+ touch /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw
RUN: at line 3: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/./bin/clang   -m32  -ldl  -fprofile-instr-generate -o /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/compiler-rt/test/profile/Linux/corrupted-profile.c
+ /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/./bin/clang -m32 -ldl -fprofile-instr-generate -o /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/compiler-rt/test/profile/Linux/corrupted-profile.c
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/compiler-rt/test/profile/Linux/corrupted-profile.c:64:12: warning: passing 'const IntPtrT *' (aka 'void *const *') to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
   64 |     memset(&SrcDataStart->CounterPtr, 0xAB, sizeof(SrcDataStart->CounterPtr));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/string.h:61:28: note: passing argument to parameter '__s' here
   61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
      |                            ^
1 warning generated.
RUN: at line 4: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw
+ /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw
RUN: at line 5: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw modifyfile
+ /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw modifyfile
RUN: at line 6: cp /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw.old
+ cp /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw.old
RUN: at line 7: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw 2>&1 | FileCheck /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/compiler-rt/test/profile/Linux/corrupted-profile.c
+ /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-i386/Linux/Output/corrupted-profile.c.tmp.profraw
+ FileCheck /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/compiler-rt/test/profile/Linux/corrupted-profile.c
FileCheck error: '<stdin>' is empty.
FileCheck command line:  FileCheck /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/compiler-rt/test/profile/Linux/corrupted-profile.c

--

********************


rastogishubham added a commit that referenced this pull request Dec 3, 2024
Moved the MIR Test to the unittests/CodeGen folder

This is patch is part of a stack of patches, and follows
#117042

I moved the MIR test to the unittests/CodeGen folder 

I am trying to reland #115566
@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 3, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-multistage running on ppc64le-clang-multistage-test while building llvm at step 4 "build stage 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/5002

Here is the relevant piece of the build log for the reference
Step 4 (build stage 1) failure: 'ninja' (failure)
...
[5485/6185] Linking CXX executable bin/clang-apply-replacements
[5486/6185] Linking CXX shared library lib/libclangStaticAnalyzerCore.so.20.0git
[5487/6185] Linking CXX executable bin/tool-template
[5488/6185] Creating library symlink lib/libclangStaticAnalyzerCore.so
[5489/6185] Linking CXX shared library lib/libclangTransformer.so.20.0git
[5490/6185] Creating library symlink lib/libclangTransformer.so
[5491/6185] Linking CXX shared library lib/libclangARCMigrate.so.20.0git
[5492/6185] Creating library symlink lib/libclangARCMigrate.so
[5493/6185] Linking CXX executable bin/arcmt-test
[5494/6185] Linking CXX shared library lib/libclangCodeGen.so.20.0git
FAILED: lib/libclangCodeGen.so.20.0git 
: && /usr/lib64/ccache/c++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/./lib  -Wl,--gc-sections -shared -Wl,-soname,libclangCodeGen.so.20.0git -o lib/libclangCodeGen.so.20.0git tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/ABIInfo.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/ABIInfoImpl.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/BackendUtil.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGAtomic.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBlocks.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGBuiltin.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCUDANV.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCUDARuntime.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCXX.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCXXABI.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCall.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGClass.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCleanup.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCoroutine.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGDebugInfo.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGDecl.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGDeclCXX.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGException.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExpr.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprAgg.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprCXX.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprComplex.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprConstant.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprScalar.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGGPUBuiltin.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGHLSLRuntime.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGLoopInfo.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGNonTrivialStruct.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGObjC.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGObjCGNU.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGObjCMac.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGObjCRuntime.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGOpenCLRuntime.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGOpenMPRuntime.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGOpenMPRuntimeGPU.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGPointerAuth.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGRecordLayoutBuilder.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGStmt.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGStmtOpenMP.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGVTT.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGVTables.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CodeGenABITypes.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CodeGenAction.cpp.o tools/clang/lib/CodeGen
/CodeGenModule.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CodeGenPGO.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CodeGenTBAA.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CodeGenTypes.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/ConstantInitBuilder.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CoverageMappingGen.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/ItaniumCXXABI.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/LinkInModulesPass.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/MacroPPCallbacks.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/MicrosoftCXXABI.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/ModuleBuilder.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/ObjectFilePCHContainerWriter.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/PatternInit.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/SanitizerMetadata.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/SwiftCallingConv.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/TargetInfo.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/AArch64.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/AMDGPU.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/ARC.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/ARM.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/AVR.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/BPF.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/CSKY.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/DirectX.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/Hexagon.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/Lanai.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/LoongArch.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/M68k.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/MSP430.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/Mips.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/NVPTX.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/PNaCl.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/PPC.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/RISCV.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/SPIR.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/Sparc.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/SystemZ.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/TCE.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/VE.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/WebAssembly.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/X86.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/XCore.cpp.o tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/VarBypassDetector.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib:"  lib/libclangFrontend.so.20.0git  lib/libclangSerialization.so.20.0git  lib/libLLVMCoverage.so.20.0git  lib/libLLVMFrontendDriver.so.20.0git  lib/libLLVMLTO.so.20.0git  lib/libLLVMPasses.so.20.0git  lib/libclangAnalysis.so.20.0git  lib/libLLVMFrontendHLSL.so.20.0git  lib/libclangAST.so.20.0git  lib/libclangLex.so.20.0git  lib/libclangBasic.so.20.0git  lib/libLLVMExtensions.so.20.0git  lib/libLLVMCoroutines.so.20.0git  lib/libLLVMHipStdPar.so.20.0git  lib/libLLVMipo.so.20.0git  lib/libLLVMFrontendOpenMP.so.20.0git  lib/libLLVMFrontendOffloading.so.20.0git  lib/libLLVMLinker.so.20.0git  lib/libLLVMIRPrinter.so.20.0git  lib/libLLVMInstrumentation.so.20.0git  lib/libLLVMCodeGenTypes.so.20.0git  lib
libLLVMObjCARCOpts.so.20.0git  lib/libLLVMScalarOpts.so.20.0git  lib/libLLVMAggressiveInstCombine.so.20.0git  lib/libLLVMInstCombine.so.20.0git  lib/libLLVMTarget.so.20.0git  lib/libLLVMTransformUtils.so.20.0git  lib/libLLVMBitWriter.so.20.0git  lib/libLLVMAnalysis.so.20.0git  lib/libLLVMProfileData.so.20.0git  lib/libLLVMObject.so.20.0git  lib/libLLVMIRReader.so.20.0git  lib/libLLVMBitReader.so.20.0git  lib/libLLVMCore.so.20.0git  lib/libLLVMMC.so.20.0git  lib/libLLVMTargetParser.so.20.0git  lib/libLLVMSupport.so.20.0git  lib/libLLVMDemangle.so.20.0git  -Wl,-rpath-link,/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib && :
tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/BackendUtil.cpp.o:(.toc+0x258): undefined reference to `vtable for llvm::DroppedVariableStatsIR'
collect2: error: ld returned 1 exit status
[5495/6185] Linking CXX shared library lib/libclangStaticAnalyzerCheckers.so.20.0git
[5496/6185] Building AMDGPUGenSubtargetInfo.inc...
[5497/6185] Building AMDGPUGenPostLegalizeGICombiner.inc...
[5498/6185] Building RISCVGenSubtargetInfo.inc...
[5499/6185] Building AMDGPUGenAsmWriter.inc...
[5500/6185] Building AMDGPUGenGlobalISel.inc...
[5501/6185] Building AMDGPUGenDAGISel.inc...
[5502/6185] Building AMDGPUGenAsmMatcher.inc...
[5503/6185] Building AMDGPUGenInstrInfo.inc...
[5504/6185] Building AMDGPUGenRegisterBank.inc...
[5505/6185] Building AMDGPUGenRegisterInfo.inc...
ninja: build stopped: subcommand failed.

rastogishubham added a commit that referenced this pull request Dec 3, 2024
…design it to be extensible. (#117042)"

This reverts commit acf3b1a.

Broke https://lab.llvm.org/buildbot/#/builders/76/builds/5002

tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/BackendUtil.cpp.o:(.toc+0x258): undefined reference to `vtable for llvm::DroppedVariableStatsIR'
rastogishubham added a commit that referenced this pull request Dec 3, 2024
…it to be extensible. (#117042)" (#118546)

Removed the virtual destructor in the derived
class DroppedVariableStatsIR
rastogishubham added a commit that referenced this pull request Dec 4, 2024
…edesign it to be extensible. (#117042)" (#118546)"

This reverts commit 0c8928d.

Broke Bot: https://lab.llvm.org/buildbot/#/builders/76/builds/5008

error: undefined reference to `vtable for llvm::DroppedVariableStatsIR'
@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 4, 2024

LLVM Buildbot has detected a new failure on builder lld-x86_64-win running on as-worker-93 while building llvm at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/1751

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM-Unit :: Support/./SupportTests.exe/37/87' FAILED ********************
Script(shard):
--
GTEST_OUTPUT=json:C:\a\lld-x86_64-win\build\unittests\Support\.\SupportTests.exe-LLVM-Unit-13072-37-87.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=87 GTEST_SHARD_INDEX=37 C:\a\lld-x86_64-win\build\unittests\Support\.\SupportTests.exe
--

Script:
--
C:\a\lld-x86_64-win\build\unittests\Support\.\SupportTests.exe --gtest_filter=ProgramEnvTest.CreateProcessLongPath
--
C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp(160): error: Expected equality of these values:
  0
  RC
    Which is: -2

C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp(163): error: fs::remove(Twine(LongPath)): did not return errc::success.
error number: 13
error message: permission denied



C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp:160
Expected equality of these values:
  0
  RC
    Which is: -2

C:\a\lld-x86_64-win\llvm-project\llvm\unittests\Support\ProgramTest.cpp:163
fs::remove(Twine(LongPath)): did not return errc::success.
error number: 13
error message: permission denied




********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 4, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64-aix running on aix-ppc64 while building llvm at step 3 "clean-build-dir".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/1612

Here is the relevant piece of the build log for the reference
Step 3 (clean-build-dir) failure: Delete failed. (failure) (timed out)
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Profile-powerpc :: ContinuousSyncMode/online-merging.c' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 6: rm -rf /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir && mkdir -p /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir && cd /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir
+ rm -rf /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir
+ mkdir -p /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir
+ cd /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir
RUN: at line 9: echo "void dso1(void) {}" > dso1.c
+ echo 'void dso1(void) {}'
RUN: at line 10: echo "void dso2(void) {}" > dso2.c
+ echo 'void dso2(void) {}'
RUN: at line 11: /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/./bin/clang   -m32   -fprofile-generate -mllvm -runtime-counter-relocation -shared -o /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/dso1.dylib dso1.c -fprofile-update=atomic
+ /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/./bin/clang -m32 -fprofile-generate -mllvm -runtime-counter-relocation -shared -o /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/dso1.dylib dso1.c -fprofile-update=atomic
RUN: at line 12: /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/./bin/clang   -m32   -fprofile-generate -mllvm -runtime-counter-relocation -shared -o /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/dso2.dylib dso2.c -fprofile-update=atomic
+ /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/./bin/clang -m32 -fprofile-generate -mllvm -runtime-counter-relocation -shared -o /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/dso2.dylib dso2.c -fprofile-update=atomic
RUN: at line 13: /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/./bin/clang   -m32   -fprofile-generate -mllvm -runtime-counter-relocation -o main.exe /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/compiler-rt/test/profile/ContinuousSyncMode/online-merging.c /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/dso1.dylib /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/dso2.dylib -fprofile-update=atomic
+ /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/./bin/clang -m32 -fprofile-generate -mllvm -runtime-counter-relocation -o main.exe /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/compiler-rt/test/profile/ContinuousSyncMode/online-merging.c /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/dso1.dylib /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/dso2.dylib -fprofile-update=atomic
RUN: at line 18: env LLVM_PROFILE_FILE="/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/profdir/%m%c.profraw"  /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/main.exe nospawn
+ env LLVM_PROFILE_FILE=/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/profdir/%m%c.profraw /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/main.exe nospawn
RUN: at line 19: llvm-profdata merge -o /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.profdata /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/profdir
+ llvm-profdata merge -o /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.profdata /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/profdir
RUN: at line 20: llvm-profdata show --counts --all-functions /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.profdata | FileCheck /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/compiler-rt/test/profile/ContinuousSyncMode/online-merging.c -check-prefix=ROUND1
+ llvm-profdata show --counts --all-functions /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.profdata
+ FileCheck /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/compiler-rt/test/profile/ContinuousSyncMode/online-merging.c -check-prefix=ROUND1
RUN: at line 42: env LLVM_PROFILE_FILE="/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/profdir/%m%c.profraw"  /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/main.exe spawn 'LLVM_PROFILE_FILE=/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/profdir/%m%c.profraw'
+ env LLVM_PROFILE_FILE=/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/profdir/%m%c.profraw /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/main.exe spawn LLVM_PROFILE_FILE=/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/profdir/%m%c.profraw
RUN: at line 43: llvm-profdata merge -o /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.profdata /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/profdir
+ llvm-profdata merge -o /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.profdata /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.dir/profdir
RUN: at line 44: llvm-profdata show --counts --all-functions /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.profdata | FileCheck /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/compiler-rt/test/profile/ContinuousSyncMode/online-merging.c -check-prefix=ROUND2
+ llvm-profdata show --counts --all-functions /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/runtimes/runtimes-bins/compiler-rt/test/profile/Profile-powerpc/ContinuousSyncMode/Output/online-merging.c.tmp.profdata
+ FileCheck /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/compiler-rt/test/profile/ContinuousSyncMode/online-merging.c -check-prefix=ROUND2
/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/compiler-rt/test/profile/ContinuousSyncMode/online-merging.c:54:16: error: ROUND2-DAG: expected string not found in input
// ROUND2-DAG: Block counts: [97]
               ^
<stdin>:9:20: note: scanning from here
 Block counts: [97]
                   ^
<stdin>:13:2: note: possible intended match here
 Block counts: [96]
 ^

Input file: <stdin>
Check file: /home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/compiler-rt/test/profile/ContinuousSyncMode/online-merging.c

-dump-input=help explains the following input dump.

Input was:
<<<<<<
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants