[llvm] 2592ccd - [llvm-reduce] Unify pass logging
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 18 08:43:00 PDT 2022
Author: Arthur Eubanks
Date: 2022-10-18T08:42:37-07:00
New Revision: 2592ccdea7a3b62bcfee4aef87fc0e2163a47d28
URL: https://github.com/llvm/llvm-project/commit/2592ccdea7a3b62bcfee4aef87fc0e2163a47d28
DIFF: https://github.com/llvm/llvm-project/commit/2592ccdea7a3b62bcfee4aef87fc0e2163a47d28.diff
LOG: [llvm-reduce] Unify pass logging
We randomly use outs() or errs(), which makes test logs confusing.
We also randomly add/don't add a line afterward.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D136130
Added:
Modified:
llvm/tools/llvm-reduce/deltas/Delta.cpp
llvm/tools/llvm-reduce/deltas/Delta.h
llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp
llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp
llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp
llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp
llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp
llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp
llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp
llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp
llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp
llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp
llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp
llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp
llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp
llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp
llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp
llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp
llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp
llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp
llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp
llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp
llvm/tools/llvm-reduce/llvm-reduce.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-reduce/deltas/Delta.cpp b/llvm/tools/llvm-reduce/deltas/Delta.cpp
index e8224caa134f7..73a00e6261040 100644
--- a/llvm/tools/llvm-reduce/deltas/Delta.cpp
+++ b/llvm/tools/llvm-reduce/deltas/Delta.cpp
@@ -235,10 +235,11 @@ SmallString<0> ProcessChunkFromSerializedBitcode(
/// reduces the amount of chunks that are considered interesting by the
/// given test. The number of chunks is determined by a preliminary run of the
/// reduction pass where no change must be made to the module.
-void llvm::runDeltaPass(TestRunner &Test,
- ReductionFunc ExtractChunksFromModule) {
+void llvm::runDeltaPass(TestRunner &Test, ReductionFunc ExtractChunksFromModule,
+ StringRef Message) {
assert(!verifyReducerWorkItem(Test.getProgram(), &errs()) &&
"input module is broken before making changes");
+ errs() << "*** " << Message << "...\n";
SmallString<128> CurrentFilepath;
if (!isReduced(Test.getProgram(), Test, CurrentFilepath)) {
@@ -275,6 +276,7 @@ void llvm::runDeltaPass(TestRunner &Test,
if (!Targets) {
if (Verbose)
errs() << "\nNothing to reduce\n";
+ errs() << "----------------------------\n";
return;
}
@@ -412,4 +414,5 @@ void llvm::runDeltaPass(TestRunner &Test,
Test.setProgram(std::move(ReducedProgram));
if (Verbose)
errs() << "Couldn't increase anymore.\n";
+ errs() << "----------------------------\n";
}
diff --git a/llvm/tools/llvm-reduce/deltas/Delta.h b/llvm/tools/llvm-reduce/deltas/Delta.h
index f8c8ede3f1550..e89cb72f10db9 100644
--- a/llvm/tools/llvm-reduce/deltas/Delta.h
+++ b/llvm/tools/llvm-reduce/deltas/Delta.h
@@ -105,7 +105,8 @@ using ReductionFunc = function_ref<void(Oracle &, ReducerWorkItem &)>;
///
/// Other implementations of the Delta Debugging algorithm can also be found in
/// the CReduce, Delta, and Lithium projects.
-void runDeltaPass(TestRunner &Test, ReductionFunc ExtractChunksFromModule);
+void runDeltaPass(TestRunner &Test, ReductionFunc ExtractChunksFromModule,
+ StringRef Message);
} // namespace llvm
#endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp b/llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp
index cdcd4261cb5e2..8ceae2049312d 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp
@@ -30,7 +30,5 @@ static void extractAliasesFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceAliasesDeltaPass(TestRunner &Test) {
- errs() << "*** Reducing Aliases ...\n";
- runDeltaPass(Test, extractAliasesFromModule);
- errs() << "----------------------------\n";
+ runDeltaPass(Test, extractAliasesFromModule, "Reducing Aliases");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp b/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
index 45b5525a12a50..e251256cc0ebb 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
@@ -119,6 +119,5 @@ static void extractArgumentsFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceArgumentsDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing Arguments...\n";
- runDeltaPass(Test, extractArgumentsFromModule);
+ runDeltaPass(Test, extractArgumentsFromModule, "Reducing Arguments");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp b/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
index 7b870888b0d48..35d8b840ab726 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
@@ -178,6 +178,5 @@ static void extractAttributesFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceAttributesDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing Attributes...\n";
- runDeltaPass(Test, extractAttributesFromModule);
+ runDeltaPass(Test, extractAttributesFromModule, "Reducing Attributes");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp b/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
index 1cef2a162d797..5f70640a3b578 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
@@ -173,6 +173,5 @@ static void extractBasicBlocksFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceBasicBlocksDeltaPass(TestRunner &Test) {
- errs() << "*** Reducing Basic Blocks...\n";
- runDeltaPass(Test, extractBasicBlocksFromModule);
+ runDeltaPass(Test, extractBasicBlocksFromModule, "Reducing Basic Blocks");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp b/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp
index 474139e30fd69..6ae535fdfd13d 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp
@@ -96,7 +96,5 @@ static void extractDIMetadataFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceDIMetadataDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing DIMetadata...\n";
- runDeltaPass(Test, extractDIMetadataFromModule);
- outs() << "----------------------------\n";
+ runDeltaPass(Test, extractDIMetadataFromModule, "Reducing DIMetadata");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp b/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp
index ed583e9cf5736..19cda6ded2204 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp
@@ -31,7 +31,6 @@ static void extractFunctionBodiesFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceFunctionBodiesDeltaPass(TestRunner &Test) {
- errs() << "*** Reducing Function Bodies...\n";
- runDeltaPass(Test, extractFunctionBodiesFromModule);
- errs() << "----------------------------\n";
+ runDeltaPass(Test, extractFunctionBodiesFromModule,
+ "Reducing Function Bodies");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp b/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
index faade8a581026..61f7af924cb19 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
@@ -50,7 +50,5 @@ static void extractFunctionsFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceFunctionsDeltaPass(TestRunner &Test) {
- errs() << "*** Reducing Functions...\n";
- runDeltaPass(Test, extractFunctionsFromModule);
- errs() << "----------------------------\n";
+ runDeltaPass(Test, extractFunctionsFromModule, "Reducing Functions");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp
index 1a9526062b5ea..8677a72a4a3db 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp
@@ -31,6 +31,5 @@ static void reduceGOs(Oracle &O, Module &Program) {
}
void llvm::reduceGlobalObjectsDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing GlobalObjects...\n";
- runDeltaPass(Test, reduceGOs);
+ runDeltaPass(Test, reduceGOs, "Reducing GlobalObjects");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp
index 26a3cbded08d2..eb0ea4e78ba8a 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp
@@ -58,6 +58,5 @@ static void reduceGVs(Oracle &O, Module &Program) {
}
void llvm::reduceGlobalValuesDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing GlobalValues...\n";
- runDeltaPass(Test, reduceGVs);
+ runDeltaPass(Test, reduceGVs, "Reducing GlobalValues");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
index c9e4d9f676821..9765b38d9ce43 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
@@ -29,6 +29,5 @@ static void extractGVsFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceGlobalsInitializersDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing GVs initializers...\n";
- runDeltaPass(Test, extractGVsFromModule);
+ runDeltaPass(Test, extractGVsFromModule, "Reducing GV Initializers");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
index 908c984bf57f6..bc45f69361cb4 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
@@ -59,6 +59,5 @@ static void extractGVsFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceGlobalsDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing GVs...\n";
- runDeltaPass(Test, extractGVsFromModule);
+ runDeltaPass(Test, extractGVsFromModule, "Reducing GlobalVariables");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp b/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp
index 975bdc28c4cc9..1e78176f146b3 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp
@@ -67,16 +67,15 @@ static void stripIRFromFunctions(Oracle &O, ReducerWorkItem &WorkItem) {
}
void llvm::reduceIRInstructionReferencesDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing IR references from instructions...\n";
- runDeltaPass(Test, stripIRFromInstructions);
+ runDeltaPass(Test, stripIRFromInstructions,
+ "Reducing IR references from instructions");
}
void llvm::reduceIRBlockReferencesDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing IR references from blocks...\n";
- runDeltaPass(Test, stripIRFromBlocks);
+ runDeltaPass(Test, stripIRFromBlocks, "Reducing IR references from blocks");
}
void llvm::reduceIRFunctionReferencesDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing IR references from functions...\n";
- runDeltaPass(Test, stripIRFromFunctions);
+ runDeltaPass(Test, stripIRFromFunctions,
+ "Reducing IR references from functions");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp
index 4c3b4d3963d61..72882a814e917 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp
@@ -30,6 +30,5 @@ static void removeFlagsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
}
void llvm::reduceInstructionFlagsMIRDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing Instruction flags...\n";
- runDeltaPass(Test, removeFlagsFromModule);
+ runDeltaPass(Test, removeFlagsFromModule, "Reducing Instruction Flags");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp
index 078da9e333fba..bdd227b04a795 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp
@@ -52,6 +52,5 @@ static void extractInstrFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceInstructionsDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing Instructions...\n";
- runDeltaPass(Test, extractInstrFromModule);
+ runDeltaPass(Test, extractInstrFromModule, "Reducing Instructions");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp
index f21bcdcf54d38..63240923792c6 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp
@@ -158,6 +158,5 @@ static void extractInstrFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
}
void llvm::reduceInstructionsMIRDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing Instructions...\n";
- runDeltaPass(Test, extractInstrFromModule);
+ runDeltaPass(Test, extractInstrFromModule, "Reducing Instructions");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp b/llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp
index 0681e35e40de6..c2a20dbe22c92 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp
@@ -76,7 +76,5 @@ static void extractMetadataFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceMetadataDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing Metadata...\n";
- runDeltaPass(Test, extractMetadataFromModule);
- outs() << "----------------------------\n";
+ runDeltaPass(Test, extractMetadataFromModule, "Reducing Metadata");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp b/llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp
index cbde789fa1da6..7c31437c37d26 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp
@@ -25,6 +25,5 @@ static void clearModuleData(Oracle &O, Module &Program) {
}
void llvm::reduceModuleDataDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing Module Data...\n";
- runDeltaPass(Test, clearModuleData);
+ runDeltaPass(Test, clearModuleData, "Reducing Module Data");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
index 327125b76b5a1..99beb318ef169 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
@@ -107,6 +107,5 @@ static void replaceOpcodesInModule(Oracle &O, Module &Mod) {
}
void llvm::reduceOpcodesDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing Opcodes...\n";
- runDeltaPass(Test, replaceOpcodesInModule);
+ runDeltaPass(Test, replaceOpcodesInModule, "Reducing Opcodes");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
index c28bbb2e48dce..0998d6b842369 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
@@ -104,6 +104,6 @@ static void extractOperandBundesFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceOperandBundesDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing OperandBundes...\n";
- runDeltaPass(Test, extractOperandBundesFromModule);
+ runDeltaPass(Test, extractOperandBundesFromModule,
+ "Reducing Operand Bundles");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp
index 773d19c27fd8e..348421b8d6997 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp
@@ -82,7 +82,6 @@ static bool switchCaseExists(Use &Op, ConstantInt *CI) {
}
void llvm::reduceOperandsOneDeltaPass(TestRunner &Test) {
- errs() << "*** Reducing Operands to one...\n";
auto ReduceValue = [](Use &Op) -> Value * {
if (!shouldReduceOperand(Op))
return nullptr;
@@ -117,13 +116,15 @@ void llvm::reduceOperandsOneDeltaPass(TestRunner &Test) {
return nullptr;
};
- runDeltaPass(Test, [ReduceValue](Oracle &O, Module &Program) {
- extractOperandsFromModule(O, Program, ReduceValue);
- });
+ runDeltaPass(
+ Test,
+ [ReduceValue](Oracle &O, Module &Program) {
+ extractOperandsFromModule(O, Program, ReduceValue);
+ },
+ "Reducing Operands to one");
}
void llvm::reduceOperandsZeroDeltaPass(TestRunner &Test) {
- errs() << "*** Reducing Operands to zero...\n";
auto ReduceValue = [](Use &Op) -> Value * {
if (!shouldReduceOperand(Op))
return nullptr;
@@ -134,13 +135,15 @@ void llvm::reduceOperandsZeroDeltaPass(TestRunner &Test) {
// Don't replace existing zeroes.
return isZero(Op) ? nullptr : Constant::getNullValue(Op->getType());
};
- runDeltaPass(Test, [ReduceValue](Oracle &O, Module &Program) {
- extractOperandsFromModule(O, Program, ReduceValue);
- });
+ runDeltaPass(
+ Test,
+ [ReduceValue](Oracle &O, Module &Program) {
+ extractOperandsFromModule(O, Program, ReduceValue);
+ },
+ "Reducing Operands to zero");
}
void llvm::reduceOperandsNaNDeltaPass(TestRunner &Test) {
- errs() << "*** Reducing Operands to NaN...\n";
auto ReduceValue = [](Use &Op) -> Value * {
Type *Ty = Op->getType();
if (!Ty->isFPOrFPVectorTy())
@@ -160,7 +163,10 @@ void llvm::reduceOperandsNaNDeltaPass(TestRunner &Test) {
return ConstantFP::getQNaN(Ty);
};
- runDeltaPass(Test, [ReduceValue](Oracle &O, Module &Program) {
- extractOperandsFromModule(O, Program, ReduceValue);
- });
+ runDeltaPass(
+ Test,
+ [ReduceValue](Oracle &O, Module &Program) {
+ extractOperandsFromModule(O, Program, ReduceValue);
+ },
+ "Reducing Operands to NaN");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp
index bb15a72a1581d..8120bfa6b4eed 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp
@@ -222,6 +222,6 @@ static void extractOperandsFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceOperandsSkipDeltaPass(TestRunner &Test) {
- errs() << "*** Reducing operands by skipping over instructions ...\n";
- runDeltaPass(Test, extractOperandsFromModule);
+ runDeltaPass(Test, extractOperandsFromModule,
+ "Reducing operands by skipping over instructions");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
index f738a51909319..c77cccb719a65 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
@@ -195,6 +195,6 @@ static void reduceOperandsToArgs(Oracle &O, Module &Program) {
}
void llvm::reduceOperandsToArgsDeltaPass(TestRunner &Test) {
- outs() << "*** Converting operands to function arguments ...\n";
- return runDeltaPass(Test, reduceOperandsToArgs);
+ runDeltaPass(Test, reduceOperandsToArgs,
+ "Converting operands to function arguments");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp b/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp
index ab4d28a12165c..2c17aea9b745c 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp
@@ -117,6 +117,5 @@ static void removeDefsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
}
void llvm::reduceRegisterDefsMIRDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing register defs...\n";
- runDeltaPass(Test, removeDefsFromModule);
+ runDeltaPass(Test, removeDefsFromModule, "Reducing register defs");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp b/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp
index 93d833c6d3335..acb378b47f020 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp
@@ -68,6 +68,5 @@ static void reduceMasksInModule(Oracle &O, ReducerWorkItem &WorkItem) {
}
void llvm::reduceRegisterMasksMIRDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing register masks...\n";
- runDeltaPass(Test, reduceMasksInModule);
+ runDeltaPass(Test, reduceMasksInModule, "Reducing register masks");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp b/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp
index a461cb8e5527f..6ada985266c27 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp
@@ -62,6 +62,5 @@ static void removeUsesFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
}
void llvm::reduceRegisterUsesMIRDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing register uses...\n";
- runDeltaPass(Test, removeUsesFromModule);
+ runDeltaPass(Test, removeUsesFromModule, "Reducing register uses");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp b/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp
index a86db314c4b56..0e356953b4e2f 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp
@@ -37,7 +37,6 @@ static void extractSpecialGlobalsFromModule(Oracle &O, Module &Program) {
}
void llvm::reduceSpecialGlobalsDeltaPass(TestRunner &Test) {
- errs() << "*** Reducing Special Globals ...\n";
- runDeltaPass(Test, extractSpecialGlobalsFromModule);
- errs() << "----------------------------\n";
+ runDeltaPass(Test, extractSpecialGlobalsFromModule,
+ "Reducing Special Globals");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp b/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
index 504f4c218e1fd..a45d57128a93d 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
@@ -29,6 +29,5 @@ static void reduceUsingSimplifyCFG(Oracle &O, Module &Program) {
}
void llvm::reduceUsingSimplifyCFGDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing using SimplifyCFG...\n";
- runDeltaPass(Test, reduceUsingSimplifyCFG);
+ runDeltaPass(Test, reduceUsingSimplifyCFG, "Reducing using SimplifyCFG");
}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp b/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp
index 1c5bda8ac33bc..4c9ea856f74d8 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp
@@ -41,6 +41,6 @@ static void dropRegisterHintsFromFunctions(Oracle &O,
}
void llvm::reduceVirtualRegisterHintsDeltaPass(TestRunner &Test) {
- outs() << "*** Reducing virtual register hints from functions...\n";
- runDeltaPass(Test, dropRegisterHintsFromFunctions);
+ runDeltaPass(Test, dropRegisterHintsFromFunctions,
+ "Reducing virtual register hints from functions");
}
diff --git a/llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp b/llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp
index ba93ba724eeb7..00710476b6139 100644
--- a/llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp
+++ b/llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp
@@ -47,7 +47,5 @@ static void runPasses(Oracle &O, Module &Program) {
}
void llvm::runIRPassesDeltaPass(TestRunner &Test) {
- errs() << "*** Running passes ...\n";
- runDeltaPass(Test, runPasses);
- errs() << "----------------------------\n";
+ runDeltaPass(Test, runPasses, "Running passes");
}
diff --git a/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp b/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp
index 6e2e52aee9c1e..7bf3eb1a07a1a 100644
--- a/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp
+++ b/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp
@@ -45,6 +45,5 @@ static void extractInstrFromModule(Oracle &O, Module &Program) {
}
void llvm::simplifyInstructionsDeltaPass(TestRunner &Test) {
- outs() << "*** Simplifying Instructions...\n";
- runDeltaPass(Test, extractInstrFromModule);
+ runDeltaPass(Test, extractInstrFromModule, "Simplifying Instructions");
}
diff --git a/llvm/tools/llvm-reduce/llvm-reduce.cpp b/llvm/tools/llvm-reduce/llvm-reduce.cpp
index c7606b5fef9e4..13c6edc64e238 100644
--- a/llvm/tools/llvm-reduce/llvm-reduce.cpp
+++ b/llvm/tools/llvm-reduce/llvm-reduce.cpp
@@ -189,7 +189,7 @@ int main(int Argc, char **Argv) {
if (OutputFilename == "-")
Tester.getProgram().print(outs(), nullptr);
else
- writeOutput(Tester.getProgram(), "\nDone reducing! Reduced testcase: ");
+ writeOutput(Tester.getProgram(), "Done reducing! Reduced testcase: ");
return 0;
}
More information about the llvm-commits
mailing list