aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-reduce/llvm-reduce.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-reduce/llvm-reduce.cpp')
-rw-r--r--llvm/tools/llvm-reduce/llvm-reduce.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/tools/llvm-reduce/llvm-reduce.cpp b/llvm/tools/llvm-reduce/llvm-reduce.cpp
index 11e3dd0..e07351a 100644
--- a/llvm/tools/llvm-reduce/llvm-reduce.cpp
+++ b/llvm/tools/llvm-reduce/llvm-reduce.cpp
@@ -88,6 +88,12 @@ static cl::opt<std::string> TargetTriple("mtriple",
cl::desc("Set the target triple"),
cl::cat(Options));
+static cl::opt<int>
+ MaxPassIterations("max-pass-iterations",
+ cl::desc("Maximum number of times to run the full set "
+ "of delta passes (default=1)"),
+ cl::init(1), cl::cat(Options));
+
static codegen::RegisterCodeGenFlags CGF;
void writeOutput(ReducerWorkItem &M, StringRef Message) {
@@ -161,7 +167,7 @@ int main(int Argc, char **Argv) {
TestRunner Tester(TestFilename, TestArguments, std::move(OriginalProgram));
// Try to reduce code
- runDeltaPasses(Tester);
+ runDeltaPasses(Tester, MaxPassIterations);
// Print reduced file to STDOUT
if (OutputFilename == "-")