Skip to content

Commit d328d41

Browse files
committed
Revert "Add a pass to collect dropped var stats for MIR (#120780)"
This reverts commit 3bf91ad. (llvmorg-20-init-16123-g3bf91ad2a9c7) `llvm/CodeGen` should not depend on `llvm/Passes`.
1 parent 9ae92d7 commit d328d41

File tree

7 files changed

+1
-1245
lines changed

7 files changed

+1
-1245
lines changed

llvm/include/llvm/CodeGen/DroppedVariableStatsMIR.h

Lines changed: 0 additions & 70 deletions
This file was deleted.

llvm/include/llvm/CodeGen/MachineFunctionPass.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#ifndef LLVM_CODEGEN_MACHINEFUNCTIONPASS_H
1919
#define LLVM_CODEGEN_MACHINEFUNCTIONPASS_H
2020

21-
#include "llvm/CodeGen/DroppedVariableStatsMIR.h"
2221
#include "llvm/CodeGen/MachineFunction.h"
2322
#include "llvm/Pass.h"
2423

@@ -68,7 +67,6 @@ class MachineFunctionPass : public FunctionPass {
6867
MachineFunctionProperties RequiredProperties;
6968
MachineFunctionProperties SetProperties;
7069
MachineFunctionProperties ClearedProperties;
71-
DroppedVariableStatsMIR DroppedVarStatsMF;
7270

7371
/// createPrinterPass - Get a machine function printer pass.
7472
Pass *createPrinterPass(raw_ostream &O,

llvm/lib/CodeGen/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ add_llvm_component_library(LLVMCodeGen
5050
DeadMachineInstructionElim.cpp
5151
DetectDeadLanes.cpp
5252
DFAPacketizer.cpp
53-
DroppedVariableStatsMIR.cpp
5453
DwarfEHPrepare.cpp
5554
EarlyIfConversion.cpp
5655
EdgeBundles.cpp

llvm/lib/CodeGen/DroppedVariableStatsMIR.cpp

Lines changed: 0 additions & 77 deletions
This file was deleted.

llvm/lib/CodeGen/MachineFunctionPass.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@
3232
using namespace llvm;
3333
using namespace ore;
3434

35-
static cl::opt<bool> DroppedVarStatsMIR(
36-
"dropped-variable-stats-mir", cl::Hidden,
37-
cl::desc("Dump dropped debug variables stats for MIR passes"),
38-
cl::init(false));
39-
4035
Pass *MachineFunctionPass::createPrinterPass(raw_ostream &O,
4136
const std::string &Banner) const {
4237
return createMachineFunctionPrinterPass(O, Banner);
@@ -96,15 +91,7 @@ bool MachineFunctionPass::runOnFunction(Function &F) {
9691

9792
MFProps.reset(ClearedProperties);
9893

99-
bool RV;
100-
if (DroppedVarStatsMIR) {
101-
auto PassName = getPassName();
102-
DroppedVarStatsMF.runBeforePass(PassName, &MF);
103-
RV = runOnMachineFunction(MF);
104-
DroppedVarStatsMF.runAfterPass(PassName, &MF);
105-
} else {
106-
RV = runOnMachineFunction(MF);
107-
}
94+
bool RV = runOnMachineFunction(MF);
10895

10996
if (ShouldEmitSizeRemarks) {
11097
// We wanted size remarks. Check if there was a change to the number of

llvm/unittests/CodeGen/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ add_llvm_unittest(CodeGenTests
2727
CCStateTest.cpp
2828
DIEHashTest.cpp
2929
DIETest.cpp
30-
DroppedVariableStatsMIRTest.cpp
3130
DwarfStringPoolEntryRefTest.cpp
3231
InstrRefLDVTest.cpp
3332
LowLevelTypeTest.cpp

0 commit comments

Comments
 (0)