Skip to content

Conversation

@rastogishubham
Copy link
Contributor

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

@llvmbot
Copy link
Member

llvmbot commented Nov 20, 2024

@llvm/pr-subscribers-llvm-ir

Author: Shubham Sandeep Rastogi (rastogishubham)

Changes

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


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

11 Files Affected:

  • (added) llvm/include/llvm/CodeGen/DroppedVariableStats.h (+272)
  • (modified) llvm/include/llvm/CodeGen/MachineFunctionPass.h (+2)
  • (modified) llvm/include/llvm/Passes/StandardInstrumentations.h (+2-78)
  • (modified) llvm/lib/CodeGen/CMakeLists.txt (+1)
  • (added) llvm/lib/CodeGen/DroppedVariableStats.cpp (+255)
  • (modified) llvm/lib/CodeGen/MachineFunctionPass.cpp (+14-1)
  • (modified) llvm/lib/Passes/StandardInstrumentations.cpp (+2-176)
  • (modified) llvm/unittests/CodeGen/CMakeLists.txt (+2)
  • (renamed) llvm/unittests/CodeGen/DroppedVariableStatsIRTest.cpp (+30-44)
  • (added) llvm/unittests/CodeGen/DroppedVariableStatsMIRTest.cpp (+1067)
  • (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..f6050c68c91aaf --- /dev/null +++ b/llvm/include/llvm/CodeGen/DroppedVariableStats.h @@ -0,0 +1,272 @@ +///===- 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_values or DBG_VALUEs 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; + } +}; + +/// A class to collect and print dropped debug information due to MIR +/// optimization passes. After every MIR pass is run, it will print how many +/// #DBG_VALUEs were dropped due to that pass. +class DroppedVariableStatsMIR : public DroppedVariableStats { +public: + DroppedVariableStatsMIR() : llvm::DroppedVariableStats(false) {} + + void runBeforePass(StringRef PassID, MachineFunction *MF) { + if (PassID == "Debug Variable Analysis") + return; + setup(); + return runOnMachineFunction(MF, true); + } + + void runAfterPass(StringRef PassID, MachineFunction *MF) { + if (PassID == "Debug Variable Analysis") + return; + runOnMachineFunction(MF, false); + calculateDroppedVarStatsOnMachineFunction(MF, PassID, MF->getName().str()); + cleanup(); + } + +private: + const MachineFunction *MFunc; + /// Populate DebugVariablesBefore, DebugVariablesAfter, InlinedAts before or + /// after a pass has run to facilitate dropped variable calculation for an + /// llvm::MachineFunction. + void runOnMachineFunction(const MachineFunction *MF, bool Before); + /// Iterate over all Instructions in a MachineFunction and report any dropped + /// debug information. + void calculateDroppedVarStatsOnMachineFunction(const MachineFunction *MF, + StringRef PassID, + StringRef FuncOrModName); + /// Override base class method to run on an llvm::MachineFunction + /// 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; +}; + +} // namespace llvm + +#endif diff --git a/llvm/include/llvm/CodeGen/MachineFunctionPass.h b/llvm/include/llvm/CodeGen/MachineFunctionPass.h index caaf22c2139e31..d82b593497ffc3 100644 --- a/llvm/include/llvm/CodeGen/MachineFunctionPass.h +++ b/llvm/include/llvm/CodeGen/MachineFunctionPass.h @@ -18,6 +18,7 @@ #ifndef LLVM_CODEGEN_MACHINEFUNCTIONPASS_H #define LLVM_CODEGEN_MACHINEFUNCTIONPASS_H +#include "llvm/CodeGen/DroppedVariableStats.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/Pass.h" @@ -67,6 +68,7 @@ class MachineFunctionPass : public FunctionPass { MachineFunctionProperties RequiredProperties; MachineFunctionProperties SetProperties; MachineFunctionProperties ClearedProperties; + DroppedVariableStatsMIR DroppedVarStatsMF; /// createPrinterPass - Get a machine function printer pass. Pass *createPrinterPass(raw_ostream &O, 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..71f91292160f58 --- /dev/null +++ b/llvm/lib/CodeGen/DroppedVariableStats.cpp @@ -0,0 +1,255 @@ +///===- 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_values or DBG_VALUEs 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 Pa... [truncated] 
Moved the MIR Test to the unittests/CodeGen folder
@rastogishubham rastogishubham merged commit 249755c into llvm:main Dec 3, 2024
8 checks passed
@rastogishubham rastogishubham deleted the MIRStatsFix branch December 3, 2024 20:37
@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 3, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-win-fast running on as-builder-3 while building llvm at step 7 "test-build-unified-tree-check-llvm-unit".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-llvm-unit) failure: test (failure) ******************** TEST 'LLVM-Unit :: CodeGen/./CodeGenTests.exe/20/75' FAILED ******************** Script(shard): -- GTEST_OUTPUT=json:C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\unittests\CodeGen\.\CodeGenTests.exe-LLVM-Unit-9308-20-75.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=75 GTEST_SHARD_INDEX=20 C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\unittests\CodeGen\.\CodeGenTests.exe -- Script: -- C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\unittests\CodeGen\.\CodeGenTests.exe --gtest_filter=DroppedVariableStatsMIR.DbgValLost -- unknown file: error: SEH exception with code 0x3221225477 thrown in the test body. Stack trace: unknown file SEH exception with code 0x3221225477 thrown in the test body. Stack trace: ******************** 
@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 3, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-ubuntu-fast running on sie-linux-worker while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure) ******************** TEST 'LLVM-Unit :: CodeGen/./CodeGenTests/19/39' FAILED ******************** Script(shard): -- GTEST_OUTPUT=json:/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/unittests/CodeGen/./CodeGenTests-LLVM-Unit-1924373-19-39.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=39 GTEST_SHARD_INDEX=19 /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/unittests/CodeGen/./CodeGenTests -- Note: This is test shard 20 of 39. [==========] Running 8 tests from 8 test suites. [----------] Global test environment set-up. [----------] 1 test from AArch64SelectionDAGTest [ RUN ] AArch64SelectionDAGTest.getSplatSourceVector_Fixed_ADD_of_BUILD_VECTOR /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp:44: Skipped [ SKIPPED ] AArch64SelectionDAGTest.getSplatSourceVector_Fixed_ADD_of_BUILD_VECTOR (0 ms) [----------] 1 test from AArch64SelectionDAGTest (0 ms total) [----------] 1 test from AsmPrinterEmitDwarfLengthOrOffsetTest [ RUN ] AsmPrinterEmitDwarfLengthOrOffsetTest.DWARF64 [ OK ] AsmPrinterEmitDwarfLengthOrOffsetTest.DWARF64 (0 ms) [----------] 1 test from AsmPrinterEmitDwarfLengthOrOffsetTest (0 ms total) [----------] 1 test from DroppedVariableStatsMIR [ RUN ] DroppedVariableStatsMIR.ChildScopes -- exit: -11 -- shard JSON output does not exist: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/unittests/CodeGen/./CodeGenTests-LLVM-Unit-1924373-19-39.json ******************** 
@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 3, 2024

LLVM Buildbot has detected a new failure on builder llvm-nvptx64-nvidia-ubuntu running on as-builder-7 while building llvm at step 6 "test-build-unified-tree-check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-llvm) failure: test (failure) ******************** TEST 'LLVM-Unit :: CodeGen/./CodeGenTests/98/154' FAILED ******************** Script(shard): -- GTEST_OUTPUT=json:/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/unittests/CodeGen/./CodeGenTests-LLVM-Unit-2633647-98-154.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=154 GTEST_SHARD_INDEX=98 /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/unittests/CodeGen/./CodeGenTests -- Note: This is test shard 99 of 154. [==========] Running 2 tests from 2 test suites. [----------] Global test environment set-up. [----------] 1 test from DroppedVariableStatsMIR [ RUN ] DroppedVariableStatsMIR.InlinedAt -- exit: -11 -- shard JSON output does not exist: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/unittests/CodeGen/./CodeGenTests-LLVM-Unit-2633647-98-154.json ******************** 
rastogishubham added a commit that referenced this pull request Dec 3, 2024
…7044)" This reverts commit 249755c. Broke https://lab.llvm.org/buildbot/#/builders/160/builds/9420 Note: This is test shard 99 of 154. [==========] Running 2 tests from 2 test suites. [----------] Global test environment set-up. [----------] 1 test from DroppedVariableStatsMIR [ RUN ] DroppedVariableStatsMIR.InlinedAt -- exit: -11
@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 3, 2024

LLVM Buildbot has detected a new failure on builder openmp-offload-sles-build-only running on rocm-worker-hw-04-sles while building llvm at step 8 "Add check check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 8 (Add check check-llvm) failure: test (failure) ******************** TEST 'LLVM-Unit :: CodeGen/./CodeGenTests/19/39' FAILED ******************** Script(shard): -- GTEST_OUTPUT=json:/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/unittests/CodeGen/./CodeGenTests-LLVM-Unit-2161692-19-39.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=39 GTEST_SHARD_INDEX=19 /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/unittests/CodeGen/./CodeGenTests -- Note: This is test shard 20 of 39. [==========] Running 8 tests from 8 test suites. [----------] Global test environment set-up. [----------] 1 test from AArch64SelectionDAGTest [ RUN ] AArch64SelectionDAGTest.getSplatSourceVector_Fixed_ADD_of_BUILD_VECTOR /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp:44: Skipped [ SKIPPED ] AArch64SelectionDAGTest.getSplatSourceVector_Fixed_ADD_of_BUILD_VECTOR (0 ms) [----------] 1 test from AArch64SelectionDAGTest (0 ms total) [----------] 1 test from AsmPrinterEmitDwarfLengthOrOffsetTest [ RUN ] AsmPrinterEmitDwarfLengthOrOffsetTest.DWARF64 [ OK ] AsmPrinterEmitDwarfLengthOrOffsetTest.DWARF64 (0 ms) [----------] 1 test from AsmPrinterEmitDwarfLengthOrOffsetTest (0 ms total) [----------] 1 test from DroppedVariableStatsMIR [ RUN ] DroppedVariableStatsMIR.ChildScopes -- exit: -11 -- shard JSON output does not exist: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/unittests/CodeGen/./CodeGenTests-LLVM-Unit-2161692-19-39.json ******************** 
@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 3, 2024

LLVM Buildbot has detected a new failure on builder llvm-nvptx-nvidia-ubuntu running on as-builder-7 while building llvm at step 6 "test-build-unified-tree-check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-llvm) failure: test (failure) ******************** TEST 'LLVM-Unit :: CodeGen/./CodeGenTests/97/154' FAILED ******************** Script(shard): -- GTEST_OUTPUT=json:/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/unittests/CodeGen/./CodeGenTests-LLVM-Unit-2816359-97-154.json GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=154 GTEST_SHARD_INDEX=97 /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/unittests/CodeGen/./CodeGenTests -- Note: This is test shard 98 of 154. [==========] Running 2 tests from 2 test suites. [----------] Global test environment set-up. [----------] 1 test from DroppedVariableStatsMIR [ RUN ] DroppedVariableStatsMIR.ChildScopes -- exit: -11 -- shard JSON output does not exist: /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/unittests/CodeGen/./CodeGenTests-LLVM-Unit-2816359-97-154.json ******************** 
@nikic
Copy link
Contributor

nikic commented Dec 3, 2024

Please address #115566 (comment) before attempting another reland.

rastogishubham added a commit to rastogishubham/llvm-project that referenced this pull request Dec 19, 2024
I am trying to reland llvm#115566 I also moved the DroppedVariableStats code to the Analysis lib
rastogishubham added a commit to rastogishubham/llvm-project that referenced this pull request Dec 19, 2024
I am trying to reland llvm#115566 I also moved the DroppedVariableStats code to the Analysis lib
rastogishubham added a commit that referenced this pull request Dec 19, 2024
Reland "Add a pass to collect dropped var stats for MIR" (#117044) I am trying to reland #115566 I also moved the DroppedVariableStats code to the Analysis lib This is part of a stack of patches with #120502 being the first one in the stack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4 participants