Skip to content

Commit aee7f33

Browse files
committed
Revert "[llvm-reduce] Add MIR support"
This reverts commit bc2773c. Broke the clang-ppc64le-linux-multistage build. Reverting while I investigate.
1 parent 0658fb4 commit aee7f33

13 files changed

+44
-540
lines changed

llvm/test/tools/llvm-reduce/mir/instr-reduce.mir

-30
This file was deleted.

llvm/test/tools/llvm-reduce/mir/instr-reduce.py

-16
This file was deleted.

llvm/tools/llvm-reduce/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ set(LLVM_LINK_COMPONENTS
55
AllTargetsInfos
66
Core
77
IRReader
8-
MIRParser
98
Support
109
Target
1110
TransformUtils
1211
)
1312

1413
add_llvm_tool(llvm-reduce
1514
DeltaManager.cpp
16-
ReducerWorkItem.cpp
1715
TestRunner.cpp
1816
deltas/Delta.cpp
1917
deltas/ReduceAliases.cpp
@@ -32,7 +30,6 @@ add_llvm_tool(llvm-reduce
3230
deltas/ReduceSpecialGlobals.cpp
3331
deltas/ReduceOperands.cpp
3432
deltas/ReduceOperandsToArgs.cpp
35-
deltas/ReduceInstructionsMIR.cpp
3633
llvm-reduce.cpp
3734

3835
DEPENDS

llvm/tools/llvm-reduce/DeltaManager.cpp

+2-17
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "deltas/ReduceGlobalVarInitializers.h"
2525
#include "deltas/ReduceGlobalVars.h"
2626
#include "deltas/ReduceInstructions.h"
27-
#include "deltas/ReduceInstructionsMIR.h"
2827
#include "deltas/ReduceMetadata.h"
2928
#include "deltas/ReduceModuleData.h"
3029
#include "deltas/ReduceOperandBundles.h"
@@ -60,16 +59,9 @@ static cl::opt<std::string>
6059
DELTA_PASS("attributes", reduceAttributesDeltaPass) \
6160
DELTA_PASS("module-data", reduceModuleDataDeltaPass)
6261

63-
#define DELTA_PASSES_MIR \
64-
DELTA_PASS("instructions", reduceInstructionsMIRDeltaPass)
65-
6662
static void runAllDeltaPasses(TestRunner &Tester) {
6763
#define DELTA_PASS(NAME, FUNC) FUNC(Tester);
68-
if (Tester.getProgram().isMIR()) {
69-
DELTA_PASSES_MIR
70-
} else {
71-
DELTA_PASSES
72-
}
64+
DELTA_PASSES
7365
#undef DELTA_PASS
7466
}
7567

@@ -79,11 +71,7 @@ static void runDeltaPassName(TestRunner &Tester, StringRef PassName) {
7971
FUNC(Tester); \
8072
return; \
8173
}
82-
if (Tester.getProgram().isMIR()) {
83-
DELTA_PASSES_MIR
84-
} else {
85-
DELTA_PASSES
86-
}
74+
DELTA_PASSES
8775
#undef DELTA_PASS
8876
errs() << "unknown pass \"" << PassName << "\"";
8977
exit(1);
@@ -92,10 +80,7 @@ static void runDeltaPassName(TestRunner &Tester, StringRef PassName) {
9280
void llvm::printDeltaPasses(raw_ostream &OS) {
9381
OS << "Delta passes (pass to `--delta-passes=` as a comma separated list):\n";
9482
#define DELTA_PASS(NAME, FUNC) OS << " " << NAME << "\n";
95-
OS << " IR:\n";
9683
DELTA_PASSES
97-
OS << " MIR:\n";
98-
DELTA_PASSES_MIR
9984
#undef DELTA_PASS
10085
}
10186

llvm/tools/llvm-reduce/ReducerWorkItem.cpp

-174
This file was deleted.

llvm/tools/llvm-reduce/ReducerWorkItem.h

-37
This file was deleted.

llvm/tools/llvm-reduce/TestRunner.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using namespace llvm;
1212

1313
TestRunner::TestRunner(StringRef TestName,
1414
const std::vector<std::string> &TestArgs,
15-
std::unique_ptr<ReducerWorkItem> Program)
15+
std::unique_ptr<Module> Program)
1616
: TestName(TestName), TestArgs(TestArgs), Program(std::move(Program)) {
1717
assert(this->Program && "Initialized with null program?");
1818
}

llvm/tools/llvm-reduce/TestRunner.h

+4-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#ifndef LLVM_TOOLS_LLVM_REDUCE_TESTRUNNER_H
1010
#define LLVM_TOOLS_LLVM_REDUCE_TESTRUNNER_H
1111

12-
#include "ReducerWorkItem.h"
1312
#include "llvm/ADT/SmallString.h"
1413
#include "llvm/IR/Module.h"
1514
#include "llvm/Support/Error.h"
@@ -26,24 +25,24 @@ namespace llvm {
2625
class TestRunner {
2726
public:
2827
TestRunner(StringRef TestName, const std::vector<std::string> &TestArgs,
29-
std::unique_ptr<ReducerWorkItem> Program);
28+
std::unique_ptr<Module> Program);
3029

3130
/// Runs the interesting-ness test for the specified file
3231
/// @returns 0 if test was successful, 1 if otherwise
3332
int run(StringRef Filename);
3433

3534
/// Returns the most reduced version of the original testcase
36-
ReducerWorkItem &getProgram() const { return *Program; }
35+
Module &getProgram() const { return *Program; }
3736

38-
void setProgram(std::unique_ptr<ReducerWorkItem> P) {
37+
void setProgram(std::unique_ptr<Module> P) {
3938
assert(P && "Setting null program?");
4039
Program = std::move(P);
4140
}
4241

4342
private:
4443
StringRef TestName;
4544
const std::vector<std::string> &TestArgs;
46-
std::unique_ptr<ReducerWorkItem> Program;
45+
std::unique_ptr<Module> Program;
4746
};
4847

4948
} // namespace llvm

0 commit comments

Comments
 (0)