[clang] [flang] [libcxx] [llvm] [llvm-reduce]: print short form, actionable names in the log (PR #132813)

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 27 05:35:54 PDT 2025


https://github.com/YLChenZ updated https://github.com/llvm/llvm-project/pull/132813

>From 054f69dc6d30d162b94539265cc8436c300b163a Mon Sep 17 00:00:00 2001
From: YLChen <chentongyongcz at gmail.com>
Date: Tue, 25 Mar 2025 02:47:03 +0800
Subject: [PATCH 1/4] [llvm-reduce]: print short form, actionable names in the
 log

---
 llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp             | 4 ++--
 llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp           | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp          | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp         | 4 ++--
 llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp          | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceDbgRecords.cpp          | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceDistinctMetadata.cpp    | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp      | 4 ++--
 llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp           | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp       | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp        | 2 +-
 .../llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp      | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp          | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp        | 6 +++---
 llvm/tools/llvm-reduce/deltas/ReduceInstructionFlags.cpp    | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp        | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp     | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceInvokes.cpp             | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceMemoryOperations.cpp    | 6 +++---
 llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp            | 4 ++--
 llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp          | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp             | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp      | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp            | 6 +++---
 llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp        | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp      | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp        | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp       | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp        | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp      | 2 +-
 llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp    | 6 +++---
 llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp    | 2 +-
 llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp               | 2 +-
 llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp      | 2 +-
 llvm/tools/llvm-reduce/deltas/StripDebugInfo.cpp            | 2 +-
 36 files changed, 48 insertions(+), 48 deletions(-)

diff --git a/llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp b/llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp
index 2f2df549b6728..785e2910d47f7 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp
@@ -45,9 +45,9 @@ static void extractIFuncsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceAliasesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractAliasesFromModule, "Reducing Aliases");
+  runDeltaPass(Test, extractAliasesFromModule, "Reducing Aliases (aliases)");
 }
 
 void llvm::reduceIFuncsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractIFuncsFromModule, "Reducing Ifuncs");
+  runDeltaPass(Test, extractIFuncsFromModule, "Reducing Ifuncs (ifuncs)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp b/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
index 5b1363d3293a6..d96c8d67da128 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
@@ -120,5 +120,5 @@ static void extractArgumentsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceArgumentsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractArgumentsFromModule, "Reducing Arguments");
+  runDeltaPass(Test, extractArgumentsFromModule, "Reducing Arguments (arguments)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp b/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
index e643fe2a51967..72f0377cbbeb8 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
@@ -149,5 +149,5 @@ static void extractAttributesFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceAttributesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractAttributesFromModule, "Reducing Attributes");
+  runDeltaPass(Test, extractAttributesFromModule, "Reducing Attributes (attributes)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp b/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
index da363df77d0c0..f418e056ed666 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
@@ -189,7 +189,7 @@ static void extractBasicBlocksFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceBasicBlocksDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractBasicBlocksFromModule, "Reducing Basic Blocks");
+  runDeltaPass(Test, extractBasicBlocksFromModule, "Reducing Basic Blocks (basic-blocks)");
 }
 
 static void removeUnreachableBasicBlocksFromModule(Oracle &O,
@@ -222,5 +222,5 @@ static void removeUnreachableBasicBlocksFromModule(Oracle &O,
 
 void llvm::reduceUnreachableBasicBlocksDeltaPass(TestRunner &Test) {
   runDeltaPass(Test, removeUnreachableBasicBlocksFromModule,
-               "Removing Unreachable Basic Blocks");
+               "Removing Unreachable Basic Blocks (unreachable-basic-blocks)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp b/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp
index 38352d6342d4f..50d0840f0adf7 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp
@@ -98,5 +98,5 @@ static void extractDIMetadataFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceDIMetadataDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractDIMetadataFromModule, "Reducing DIMetadata");
+  runDeltaPass(Test, extractDIMetadataFromModule, "Reducing DIMetadata (di-metadata)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceDbgRecords.cpp b/llvm/tools/llvm-reduce/deltas/ReduceDbgRecords.cpp
index 25de659109c9f..0d64ee93e5e98 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceDbgRecords.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceDbgRecords.cpp
@@ -35,5 +35,5 @@ static void extractDbgRecordsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceDbgRecordDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractDbgRecordsFromModule, "Reducing DbgRecords");
+  runDeltaPass(Test, extractDbgRecordsFromModule, "Reducing DbgRecords (dbg-records)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceDistinctMetadata.cpp b/llvm/tools/llvm-reduce/deltas/ReduceDistinctMetadata.cpp
index 0f46409977a33..f553010e67d6c 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceDistinctMetadata.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceDistinctMetadata.cpp
@@ -138,5 +138,5 @@ static void extractDistinctMetadataFromModule(Oracle &O,
 
 void llvm::reduceDistinctMetadataDeltaPass(TestRunner &Test) {
   runDeltaPass(Test, extractDistinctMetadataFromModule,
-               "Reducing Distinct Metadata");
+               "Reducing Distinct Metadata (distinct-metadata)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp b/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp
index 21875ba00cf8b..fa523618d9962 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp
@@ -34,7 +34,7 @@ static void extractFunctionBodiesFromModule(Oracle &O,
 
 void llvm::reduceFunctionBodiesDeltaPass(TestRunner &Test) {
   runDeltaPass(Test, extractFunctionBodiesFromModule,
-               "Reducing Function Bodies");
+               "Reducing Function Bodies (function-bodies)");
 }
 
 static void reduceFunctionData(Oracle &O, ReducerWorkItem &WorkItem) {
@@ -58,5 +58,5 @@ static void reduceFunctionData(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceFunctionDataDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceFunctionData, "Reducing Function Data");
+  runDeltaPass(Test, reduceFunctionData, "Reducing Function Data (function-data)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp b/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
index 619811c89202e..4f3a001129e88 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
@@ -56,5 +56,5 @@ static void extractFunctionsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceFunctionsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractFunctionsFromModule, "Reducing Functions");
+  runDeltaPass(Test, extractFunctionsFromModule, "Reducing Functions (functions)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp
index 1d1463a055bd8..c4b9fae85b68f 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp
@@ -31,5 +31,5 @@ static void reduceGOs(Oracle &O, ReducerWorkItem &Program) {
 }
 
 void llvm::reduceGlobalObjectsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceGOs, "Reducing GlobalObjects");
+  runDeltaPass(Test, reduceGOs, "Reducing GlobalObjects (global-objects)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp
index 6e8c21008502f..b0b0a247118cf 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp
@@ -68,5 +68,5 @@ static void reduceGVs(Oracle &O, ReducerWorkItem &Program) {
 }
 
 void llvm::reduceGlobalValuesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceGVs, "Reducing GlobalValues");
+  runDeltaPass(Test, reduceGVs, "Reducing GlobalValues (global-values)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
index 4c7125217f252..59fd58848585e 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
@@ -29,5 +29,5 @@ static void extractGVsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceGlobalsInitializersDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractGVsFromModule, "Reducing GV Initializers");
+  runDeltaPass(Test, extractGVsFromModule, "Reducing GV Initializers (global-initializers)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
index b448081ee1a27..f8d9a88a93641 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
@@ -55,5 +55,5 @@ static void extractGVsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceGlobalsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractGVsFromModule, "Reducing GlobalVariables");
+  runDeltaPass(Test, extractGVsFromModule, "Reducing GlobalVariables (global-variables)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp b/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp
index 4bb1eb7db1d09..41dcb69444bb3 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp
@@ -70,14 +70,14 @@ static void stripIRFromFunctions(Oracle &O, ReducerWorkItem &WorkItem) {
 
 void llvm::reduceIRInstructionReferencesDeltaPass(TestRunner &Test) {
   runDeltaPass(Test, stripIRFromInstructions,
-               "Reducing IR references from instructions");
+               "Reducing IR references from instructions (ir-instruction-references)");
 }
 
 void llvm::reduceIRBlockReferencesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, stripIRFromBlocks, "Reducing IR references from blocks");
+  runDeltaPass(Test, stripIRFromBlocks, "Reducing IR references from blocks (ir-block-references)");
 }
 
 void llvm::reduceIRFunctionReferencesDeltaPass(TestRunner &Test) {
   runDeltaPass(Test, stripIRFromFunctions,
-               "Reducing IR references from functions");
+               "Reducing IR references from functions (ir-function-references)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlags.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlags.cpp
index e157747004782..459efb75878c7 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlags.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlags.cpp
@@ -85,5 +85,5 @@ static void reduceFlagsInModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceInstructionFlagsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceFlagsInModule, "Reducing Instruction Flags");
+  runDeltaPass(Test, reduceFlagsInModule, "Reducing Instruction Flags (instruction-flags)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp
index f2895b31947ec..1988283eb92bd 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp
@@ -31,5 +31,5 @@ static void removeFlagsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceInstructionFlagsMIRDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, removeFlagsFromModule, "Reducing Instruction Flags");
+  runDeltaPass(Test, removeFlagsFromModule, "Reducing Instruction Flags (instruction-flags)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp
index 9917fed000b7a..230a1252f6581 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp
@@ -64,5 +64,5 @@ static void extractInstrFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceInstructionsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractInstrFromModule, "Reducing Instructions");
+  runDeltaPass(Test, extractInstrFromModule, "Reducing Instructions (instructions)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp
index 40bc6b180fb88..89ef249539c3f 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp
@@ -159,5 +159,5 @@ static void extractInstrFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceInstructionsMIRDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractInstrFromModule, "Reducing Instructions");
+  runDeltaPass(Test, extractInstrFromModule, "Reducing Instructions (instructions)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInvokes.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInvokes.cpp
index c6425a753df54..98e9097c916a7 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInvokes.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInvokes.cpp
@@ -37,5 +37,5 @@ static void reduceInvokesInModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceInvokesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceInvokesInModule, "Reducing Invokes");
+  runDeltaPass(Test, reduceInvokesInModule, "Reducing Invokes (invokes)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceMemoryOperations.cpp b/llvm/tools/llvm-reduce/deltas/ReduceMemoryOperations.cpp
index 8e73ea076034c..53a6e3cb1a558 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceMemoryOperations.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceMemoryOperations.cpp
@@ -42,7 +42,7 @@ static void removeVolatileInModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceVolatileInstructionsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, removeVolatileInModule, "Reducing Volatile Instructions");
+  runDeltaPass(Test, removeVolatileInModule, "Reducing Volatile Instructions (volatile)");
 }
 
 static void reduceAtomicSyncScopesInFunction(Oracle &O, Function &F) {
@@ -74,7 +74,7 @@ static void reduceAtomicSyncScopesInModule(Oracle &O,
 
 void llvm::reduceAtomicSyncScopesDeltaPass(TestRunner &Test) {
   runDeltaPass(Test, reduceAtomicSyncScopesInModule,
-               "Reducing Atomic Sync Scopes");
+               "Reducing Atomic Sync Scopes (syncscopes)");
 }
 
 // TODO: Might be helpful to incrementally relax orders
@@ -106,5 +106,5 @@ static void reduceAtomicOrderingInModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceAtomicOrderingDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceAtomicOrderingInModule, "Reducing Atomic Ordering");
+  runDeltaPass(Test, reduceAtomicOrderingInModule, "Reducing Atomic Ordering (atomic-ordering)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp b/llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp
index 316c74876025a..5cf69a548964c 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp
@@ -124,9 +124,9 @@ static void extractMetadataFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceMetadataDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractMetadataFromModule, "Reducing Metadata");
+  runDeltaPass(Test, extractMetadataFromModule, "Reducing Metadata (metadata)");
 }
 
 void llvm::reduceNamedMetadataDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceNamedMetadataOperands, "Reducing Named Metadata");
+  runDeltaPass(Test, reduceNamedMetadataOperands, "Reducing Named Metadata (named-metadata)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp b/llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp
index 17930abe6dbfe..4ac042d8b8cc2 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp
@@ -27,5 +27,5 @@ static void clearModuleData(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceModuleDataDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, clearModuleData, "Reducing Module Data");
+  runDeltaPass(Test, clearModuleData, "Reducing Module Data (module-data)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
index 9fb4fd61c74e7..3f710e03ea8d2 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
@@ -263,5 +263,5 @@ static void replaceOpcodesInModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceOpcodesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, replaceOpcodesInModule, "Reducing Opcodes");
+  runDeltaPass(Test, replaceOpcodesInModule, "Reducing Opcodes (opcodes)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
index d2274877f126b..3c81cd1d3f391 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
@@ -107,5 +107,5 @@ static void extractOperandBundesFromModule(Oracle &O,
 
 void llvm::reduceOperandBundesDeltaPass(TestRunner &Test) {
   runDeltaPass(Test, extractOperandBundesFromModule,
-               "Reducing Operand Bundles");
+               "Reducing Operand Bundles (operand-bundles)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp
index 6bf84f2985dc2..f23a29112eb8d 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp
@@ -123,7 +123,7 @@ void llvm::reduceOperandsOneDeltaPass(TestRunner &Test) {
       [ReduceValue](Oracle &O, ReducerWorkItem &WorkItem) {
         extractOperandsFromModule(O, WorkItem, ReduceValue);
       },
-      "Reducing Operands to one");
+      "Reducing Operands to one (operands-one)");
 }
 
 void llvm::reduceOperandsZeroDeltaPass(TestRunner &Test) {
@@ -142,7 +142,7 @@ void llvm::reduceOperandsZeroDeltaPass(TestRunner &Test) {
       [ReduceValue](Oracle &O, ReducerWorkItem &Program) {
         extractOperandsFromModule(O, Program, ReduceValue);
       },
-      "Reducing Operands to zero");
+      "Reducing Operands to zero (operands-zero)");
 }
 
 void llvm::reduceOperandsNaNDeltaPass(TestRunner &Test) {
@@ -170,5 +170,5 @@ void llvm::reduceOperandsNaNDeltaPass(TestRunner &Test) {
       [ReduceValue](Oracle &O, ReducerWorkItem &Program) {
         extractOperandsFromModule(O, Program, ReduceValue);
       },
-      "Reducing Operands to NaN");
+      "Reducing Operands to NaN (operands-nan)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp
index 1763feedcdbc3..565c639532ad1 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp
@@ -232,5 +232,5 @@ static void extractOperandsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 
 void llvm::reduceOperandsSkipDeltaPass(TestRunner &Test) {
   runDeltaPass(Test, extractOperandsFromModule,
-               "Reducing operands by skipping over instructions");
+               "Reducing operands by skipping over instructions (operands-skip)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
index 66d4bd3048171..e85fd9340021d 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
@@ -216,5 +216,5 @@ static void reduceOperandsToArgs(Oracle &O, ReducerWorkItem &WorkItem) {
 
 void llvm::reduceOperandsToArgsDeltaPass(TestRunner &Test) {
   runDeltaPass(Test, reduceOperandsToArgs,
-               "Converting operands to function arguments");
+               "Converting operands to function arguments (operands-to-args)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp b/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp
index 97259649ab858..6fdd1f42c90f4 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp
@@ -118,5 +118,5 @@ static void removeDefsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceRegisterDefsMIRDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, removeDefsFromModule, "Reducing register defs");
+  runDeltaPass(Test, removeDefsFromModule, "Reducing register defs (register-defs)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp b/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp
index f900d5cf8017c..5a37773bcf4f0 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp
@@ -69,5 +69,5 @@ static void reduceMasksInModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceRegisterMasksMIRDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceMasksInModule, "Reducing register masks");
+  runDeltaPass(Test, reduceMasksInModule, "Reducing register masks (register-masks)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp b/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp
index a608935736d1a..5249ccd05b3ea 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp
@@ -63,5 +63,5 @@ static void removeUsesFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceRegisterUsesMIRDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, removeUsesFromModule, "Reducing register uses");
+  runDeltaPass(Test, removeUsesFromModule, "Reducing register uses (register-uses)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp b/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp
index aadd038033d5c..57715cd635657 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp
@@ -43,5 +43,5 @@ static void extractSpecialGlobalsFromModule(Oracle &O,
 
 void llvm::reduceSpecialGlobalsDeltaPass(TestRunner &Test) {
   runDeltaPass(Test, extractSpecialGlobalsFromModule,
-               "Reducing Special Globals");
+               "Reducing Special Globals (special-globals)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp b/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
index c49fcb9855d41..d19fc0bd74e08 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
@@ -32,7 +32,7 @@ static void reduceUsingSimplifyCFG(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::reduceUsingSimplifyCFGDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceUsingSimplifyCFG, "Reducing using SimplifyCFG");
+  runDeltaPass(Test, reduceUsingSimplifyCFG, "Reducing using SimplifyCFG (simplify-cfg)");
 }
 static void reduceConditionals(Oracle &O, ReducerWorkItem &WorkItem,
                                bool Direction) {
@@ -65,7 +65,7 @@ void llvm::reduceConditionalsTrueDeltaPass(TestRunner &Test) {
       [](Oracle &O, ReducerWorkItem &WorkItem) {
         reduceConditionals(O, WorkItem, true);
       },
-      "Reducing conditional branches to true");
+      "Reducing conditional branches to true (simplify-conditionals-true)");
 }
 
 void llvm::reduceConditionalsFalseDeltaPass(TestRunner &Test) {
@@ -74,5 +74,5 @@ void llvm::reduceConditionalsFalseDeltaPass(TestRunner &Test) {
       [](Oracle &O, ReducerWorkItem &WorkItem) {
         reduceConditionals(O, WorkItem, false);
       },
-      "Reducing conditional branches to false");
+      "Reducing conditional branches to false (simplify-conditionals-false)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp b/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp
index 3ec9555c0f2f5..ad78640d3bc3a 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp
@@ -43,5 +43,5 @@ static void dropRegisterHintsFromFunctions(Oracle &O,
 
 void llvm::reduceVirtualRegisterHintsDeltaPass(TestRunner &Test) {
   runDeltaPass(Test, dropRegisterHintsFromFunctions,
-               "Reducing virtual register hints from functions");
+               "Reducing virtual register hints from functions (register-hints)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp b/llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp
index e3af05616fe04..3a2fee5693b95 100644
--- a/llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp
+++ b/llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp
@@ -51,5 +51,5 @@ static void runPasses(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::runIRPassesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, runPasses, "Running passes");
+  runDeltaPass(Test, runPasses, "Running passes (ir-passes)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp b/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp
index fc21593c5415c..2d8af6ae2b8d9 100644
--- a/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp
+++ b/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp
@@ -46,5 +46,5 @@ static void extractInstrFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::simplifyInstructionsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractInstrFromModule, "Simplifying Instructions");
+  runDeltaPass(Test, extractInstrFromModule, "Simplifying Instructions (simplify-instructions)");
 }
diff --git a/llvm/tools/llvm-reduce/deltas/StripDebugInfo.cpp b/llvm/tools/llvm-reduce/deltas/StripDebugInfo.cpp
index c9e1261c366a7..22545e07332e1 100644
--- a/llvm/tools/llvm-reduce/deltas/StripDebugInfo.cpp
+++ b/llvm/tools/llvm-reduce/deltas/StripDebugInfo.cpp
@@ -25,5 +25,5 @@ static void stripDebugInfoImpl(Oracle &O, ReducerWorkItem &WorkItem) {
 }
 
 void llvm::stripDebugInfoDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, stripDebugInfoImpl, "Stripping Debug Info");
+  runDeltaPass(Test, stripDebugInfoImpl, "Stripping Debug Info (strip-debug-info)");
 }

>From 668da24fee032542fad1b89037267fe14afdb1fa Mon Sep 17 00:00:00 2001
From: YLChen <chentongyongcz at gmail.com>
Date: Thu, 27 Mar 2025 11:21:12 +0800
Subject: [PATCH 2/4] separated DeltaPasses from DeltaManager

---
 llvm/tools/llvm-reduce/DeltaManager.cpp       | 155 ++++++++----------
 llvm/tools/llvm-reduce/DeltaPass.h            |  25 +++
 llvm/tools/llvm-reduce/DeltaPasses.def        |  68 ++++++++
 llvm/tools/llvm-reduce/deltas/Delta.h         |   1 +
 .../llvm-reduce/deltas/ReduceAliases.cpp      |   8 +-
 llvm/tools/llvm-reduce/deltas/ReduceAliases.h |   4 +-
 .../llvm-reduce/deltas/ReduceArguments.cpp    |   4 +-
 .../llvm-reduce/deltas/ReduceArguments.h      |   2 +-
 .../llvm-reduce/deltas/ReduceAttributes.cpp   |   4 +-
 .../llvm-reduce/deltas/ReduceAttributes.h     |   4 +-
 .../llvm-reduce/deltas/ReduceBasicBlocks.cpp  |   8 +-
 .../llvm-reduce/deltas/ReduceBasicBlocks.h    |   4 +-
 .../llvm-reduce/deltas/ReduceDIMetadata.cpp   |   4 +-
 .../llvm-reduce/deltas/ReduceDIMetadata.h     |   2 +-
 .../llvm-reduce/deltas/ReduceDbgRecords.cpp   |   4 +-
 .../llvm-reduce/deltas/ReduceDbgRecords.h     |   2 +-
 .../deltas/ReduceDistinctMetadata.cpp         |   4 +-
 .../deltas/ReduceDistinctMetadata.h           |   2 +-
 .../deltas/ReduceFunctionBodies.cpp           |   8 +-
 .../llvm-reduce/deltas/ReduceFunctionBodies.h |   4 +-
 .../llvm-reduce/deltas/ReduceFunctions.cpp    |   4 +-
 .../llvm-reduce/deltas/ReduceFunctions.h      |   2 +-
 .../deltas/ReduceGlobalObjects.cpp            |   4 +-
 .../llvm-reduce/deltas/ReduceGlobalObjects.h  |   2 +-
 .../llvm-reduce/deltas/ReduceGlobalValues.cpp |   4 +-
 .../llvm-reduce/deltas/ReduceGlobalValues.h   |   2 +-
 .../deltas/ReduceGlobalVarInitializers.cpp    |   4 +-
 .../deltas/ReduceGlobalVarInitializers.h      |   2 +-
 .../llvm-reduce/deltas/ReduceGlobalVars.cpp   |   4 +-
 .../llvm-reduce/deltas/ReduceGlobalVars.h     |   2 +-
 .../llvm-reduce/deltas/ReduceIRReferences.cpp |  14 +-
 .../llvm-reduce/deltas/ReduceIRReferences.h   |   8 +-
 .../deltas/ReduceInstructionFlags.cpp         |   4 +-
 .../deltas/ReduceInstructionFlags.h           |   2 +-
 .../deltas/ReduceInstructionFlagsMIR.cpp      |   4 +-
 .../deltas/ReduceInstructionFlagsMIR.h        |   2 +-
 .../llvm-reduce/deltas/ReduceInstructions.cpp |   4 +-
 .../llvm-reduce/deltas/ReduceInstructions.h   |   2 +-
 .../deltas/ReduceInstructionsMIR.cpp          |   4 +-
 .../deltas/ReduceInstructionsMIR.h            |   3 +-
 .../llvm-reduce/deltas/ReduceInvokes.cpp      |   4 +-
 llvm/tools/llvm-reduce/deltas/ReduceInvokes.h |   2 +-
 .../deltas/ReduceMemoryOperations.cpp         |  12 +-
 .../deltas/ReduceMemoryOperations.h           |   6 +-
 .../llvm-reduce/deltas/ReduceMetadata.cpp     |   8 +-
 .../tools/llvm-reduce/deltas/ReduceMetadata.h |   4 +-
 .../llvm-reduce/deltas/ReduceModuleData.cpp   |   4 +-
 .../llvm-reduce/deltas/ReduceModuleData.h     |   2 +-
 .../llvm-reduce/deltas/ReduceOpcodes.cpp      |   4 +-
 llvm/tools/llvm-reduce/deltas/ReduceOpcodes.h |   2 +-
 .../deltas/ReduceOperandBundles.cpp           |   4 +-
 .../llvm-reduce/deltas/ReduceOperandBundles.h |   4 +-
 .../llvm-reduce/deltas/ReduceOperands.cpp     |  12 +-
 .../tools/llvm-reduce/deltas/ReduceOperands.h |   6 +-
 .../llvm-reduce/deltas/ReduceOperandsSkip.cpp |   4 +-
 .../llvm-reduce/deltas/ReduceOperandsSkip.h   |   2 +-
 .../deltas/ReduceOperandsToArgs.cpp           |  20 +--
 .../llvm-reduce/deltas/ReduceOperandsToArgs.h |   2 +-
 .../llvm-reduce/deltas/ReduceRegisterDefs.cpp |   4 +-
 .../llvm-reduce/deltas/ReduceRegisterDefs.h   |   2 +-
 .../deltas/ReduceRegisterMasks.cpp            |   4 +-
 .../llvm-reduce/deltas/ReduceRegisterMasks.h  |   2 +-
 .../llvm-reduce/deltas/ReduceRegisterUses.cpp |   4 +-
 .../llvm-reduce/deltas/ReduceRegisterUses.h   |   2 +-
 .../deltas/ReduceSpecialGlobals.cpp           |   4 +-
 .../llvm-reduce/deltas/ReduceSpecialGlobals.h |   2 +-
 .../deltas/ReduceUsingSimplifyCFG.cpp         |  12 +-
 .../deltas/ReduceUsingSimplifyCFG.h           |   6 +-
 .../deltas/ReduceVirtualRegisters.cpp         |   4 +-
 .../deltas/ReduceVirtualRegisters.h           |   4 +-
 llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp |   4 +-
 llvm/tools/llvm-reduce/deltas/RunIRPasses.h   |   2 +-
 .../deltas/SimplifyInstructions.cpp           |   4 +-
 .../llvm-reduce/deltas/SimplifyInstructions.h |   2 +-
 .../llvm-reduce/deltas/StripDebugInfo.cpp     |   4 +-
 .../tools/llvm-reduce/deltas/StripDebugInfo.h |   2 +-
 76 files changed, 321 insertions(+), 243 deletions(-)
 create mode 100644 llvm/tools/llvm-reduce/DeltaPass.h
 create mode 100644 llvm/tools/llvm-reduce/DeltaPasses.def

diff --git a/llvm/tools/llvm-reduce/DeltaManager.cpp b/llvm/tools/llvm-reduce/DeltaManager.cpp
index 624b5306bc71b..a20a9d06a36f0 100644
--- a/llvm/tools/llvm-reduce/DeltaManager.cpp
+++ b/llvm/tools/llvm-reduce/DeltaManager.cpp
@@ -53,6 +53,8 @@
 #include "deltas/StripDebugInfo.h"
 #include "llvm/ADT/SmallSet.h"
 #include "llvm/Support/CommandLine.h"
+#include "DeltaPass.h"
+#include "llvm/ADT/ArrayRef.h"
 
 using namespace llvm;
 
@@ -71,91 +73,77 @@ static cl::list<std::string>
                              "default, run all delta passes."),
                     cl::cat(LLVMReduceOptions), cl::CommaSeparated);
 
-#define DELTA_PASSES                                                           \
-  do {                                                                         \
-    DELTA_PASS("strip-debug-info", stripDebugInfoDeltaPass)                    \
-    DELTA_PASS("functions", reduceFunctionsDeltaPass)                          \
-    DELTA_PASS("function-bodies", reduceFunctionBodiesDeltaPass)               \
-    DELTA_PASS("special-globals", reduceSpecialGlobalsDeltaPass)               \
-    DELTA_PASS("aliases", reduceAliasesDeltaPass)                              \
-    DELTA_PASS("ifuncs", reduceIFuncsDeltaPass)                                \
-    DELTA_PASS("simplify-conditionals-true", reduceConditionalsTrueDeltaPass)  \
-    DELTA_PASS("simplify-conditionals-false",                                  \
-               reduceConditionalsFalseDeltaPass)                               \
-    DELTA_PASS("invokes", reduceInvokesDeltaPass)                              \
-    DELTA_PASS("unreachable-basic-blocks",                                     \
-               reduceUnreachableBasicBlocksDeltaPass)                          \
-    DELTA_PASS("basic-blocks", reduceBasicBlocksDeltaPass)                     \
-    DELTA_PASS("simplify-cfg", reduceUsingSimplifyCFGDeltaPass)                \
-    DELTA_PASS("function-data", reduceFunctionDataDeltaPass)                   \
-    DELTA_PASS("global-values", reduceGlobalValuesDeltaPass)                   \
-    DELTA_PASS("global-objects", reduceGlobalObjectsDeltaPass)                 \
-    DELTA_PASS("global-initializers", reduceGlobalsInitializersDeltaPass)      \
-    DELTA_PASS("global-variables", reduceGlobalsDeltaPass)                     \
-    DELTA_PASS("di-metadata", reduceDIMetadataDeltaPass)                       \
-    DELTA_PASS("dbg-records", reduceDbgRecordDeltaPass)                        \
-    DELTA_PASS("distinct-metadata", reduceDistinctMetadataDeltaPass)           \
-    DELTA_PASS("metadata", reduceMetadataDeltaPass)                            \
-    DELTA_PASS("named-metadata", reduceNamedMetadataDeltaPass)                 \
-    DELTA_PASS("arguments", reduceArgumentsDeltaPass)                          \
-    DELTA_PASS("instructions", reduceInstructionsDeltaPass)                    \
-    DELTA_PASS("simplify-instructions", simplifyInstructionsDeltaPass)         \
-    DELTA_PASS("ir-passes", runIRPassesDeltaPass)                              \
-    DELTA_PASS("operands-zero", reduceOperandsZeroDeltaPass)                   \
-    DELTA_PASS("operands-one", reduceOperandsOneDeltaPass)                     \
-    DELTA_PASS("operands-nan", reduceOperandsNaNDeltaPass)                     \
-    DELTA_PASS("operands-to-args", reduceOperandsToArgsDeltaPass)              \
-    DELTA_PASS("operands-skip", reduceOperandsSkipDeltaPass)                   \
-    DELTA_PASS("operand-bundles", reduceOperandBundesDeltaPass)                \
-    DELTA_PASS("attributes", reduceAttributesDeltaPass)                        \
-    DELTA_PASS("module-data", reduceModuleDataDeltaPass)                       \
-    DELTA_PASS("opcodes", reduceOpcodesDeltaPass)                              \
-    DELTA_PASS("volatile", reduceVolatileInstructionsDeltaPass)                \
-    DELTA_PASS("atomic-ordering", reduceAtomicOrderingDeltaPass)               \
-    DELTA_PASS("syncscopes", reduceAtomicSyncScopesDeltaPass)                  \
-    DELTA_PASS("instruction-flags", reduceInstructionFlagsDeltaPass)           \
-  } while (false)
-
-#define DELTA_PASSES_MIR                                                       \
-  do {                                                                         \
-    DELTA_PASS("instructions", reduceInstructionsMIRDeltaPass)                 \
-    DELTA_PASS("ir-instruction-references",                                    \
-               reduceIRInstructionReferencesDeltaPass)                         \
-    DELTA_PASS("ir-block-references", reduceIRBlockReferencesDeltaPass)        \
-    DELTA_PASS("ir-function-references", reduceIRFunctionReferencesDeltaPass)  \
-    DELTA_PASS("instruction-flags", reduceInstructionFlagsMIRDeltaPass)        \
-    DELTA_PASS("register-uses", reduceRegisterUsesMIRDeltaPass)                \
-    DELTA_PASS("register-defs", reduceRegisterDefsMIRDeltaPass)                \
-    DELTA_PASS("register-hints", reduceVirtualRegisterHintsDeltaPass)          \
-    DELTA_PASS("register-masks", reduceRegisterMasksMIRDeltaPass)              \
-  } while (false)
+// Generate two separate Pass lists: IR_Passes and MIR_Passes
+static const DeltaPass IR_Passes[] = {
+  #undef DELTA_PASS_IR 
+  #undef DELTA_PASS_MIR 
+  #define DELTA_PASS_IR(NAME, FUNC, DESC) {NAME, FUNC, DESC},
+  #include "DeltaPasses.def"
+  #undef DELTA_PASS_IR
+};
+
+static const DeltaPass MIR_Passes[] = {
+  #undef DELTA_PASS_IR
+#undef DELTA_PASS_MIR
+  #define DELTA_PASS_MIR(NAME, FUNC, DESC) {NAME, FUNC, DESC},
+  #include "DeltaPasses.def"
+  #undef DELTA_PASS_MIR
+};
+  
 
 static void runAllDeltaPasses(TestRunner &Tester,
                               const SmallStringSet &SkipPass) {
-#define DELTA_PASS(NAME, FUNC)                                                 \
-  if (!SkipPass.count(NAME)) {                                                 \
-    FUNC(Tester);                                                              \
-  }
   if (Tester.getProgram().isMIR()) {
-    DELTA_PASSES_MIR;
+    for(const DeltaPass &Pass : MIR_Passes) {
+      if (!SkipPass.count(Pass.Name)) {
+        SmallString<64> Message;
+        Message += Pass.Desc;
+        Message += " (";
+        Message += Pass.Name;
+        Message += ")";
+        Pass.Func(Tester,Message);
+      } 
+    }
   } else {
-    DELTA_PASSES;
+    for(const DeltaPass &Pass : IR_Passes) {
+      if (!SkipPass.count(Pass.Name)) {
+        SmallString<64> Message;
+        Message += Pass.Desc;
+        Message += " (";
+        Message += Pass.Name;
+        Message += ")";
+        Pass.Func(Tester,Message);
+      } 
+    }
   }
-#undef DELTA_PASS
 }
 
 static void runDeltaPassName(TestRunner &Tester, StringRef PassName) {
-#define DELTA_PASS(NAME, FUNC)                                                 \
-  if (PassName == NAME) {                                                      \
-    FUNC(Tester);                                                              \
-    return;                                                                    \
-  }
   if (Tester.getProgram().isMIR()) {
-    DELTA_PASSES_MIR;
+    for(const DeltaPass &Pass : MIR_Passes) {
+      if (PassName == Pass.Name) {
+        SmallString<64> Message;
+        Message += Pass.Desc;
+        Message += " (";
+        Message += Pass.Name;
+        Message += ")";
+        Pass.Func(Tester,Message);
+        return;
+      }
+    }
   } else {
-    DELTA_PASSES;
+    for(const DeltaPass &Pass : IR_Passes) {
+      if (PassName == Pass.Name) {
+        SmallString<64> Message;
+        Message += Pass.Desc;
+        Message += " (";
+        Message += Pass.Name;
+        Message += ")";
+        Pass.Func(Tester,Message);
+        return;
+      }
+    }
   }
-#undef DELTA_PASS
 
   // We should have errored on unrecognized passes before trying to run
   // anything.
@@ -164,24 +152,25 @@ static void runDeltaPassName(TestRunner &Tester, StringRef PassName) {
 
 void llvm::printDeltaPasses(raw_ostream &OS) {
   OS << "Delta passes (pass to `--delta-passes=` as a comma separated list):\n";
-#define DELTA_PASS(NAME, FUNC) OS << "  " << NAME << "\n";
   OS << " IR:\n";
-  DELTA_PASSES;
+  for (const DeltaPass &Pass : IR_Passes) {
+    OS << "  " << Pass.Name  << "\n";
+  }
   OS << " MIR:\n";
-  DELTA_PASSES_MIR;
-#undef DELTA_PASS
+  for (const DeltaPass &Pass : MIR_Passes) {
+    OS << "  " << Pass.Name  << "\n";
+  }
 }
 
 // Built a set of available delta passes.
 static void collectPassNames(const TestRunner &Tester,
                              SmallStringSet &NameSet) {
-#define DELTA_PASS(NAME, FUNC) NameSet.insert(NAME);
-  if (Tester.getProgram().isMIR()) {
-    DELTA_PASSES_MIR;
-  } else {
-    DELTA_PASSES;
+  for (const DeltaPass &Pass : MIR_Passes) {
+    NameSet.insert(Pass.Name);
+  }
+  for (const DeltaPass &Pass : IR_Passes) {
+    NameSet.insert(Pass.Name);
   }
-#undef DELTA_PASS
 }
 
 /// Verify all requested or skipped passes are valid names, and return them in a
diff --git a/llvm/tools/llvm-reduce/DeltaPass.h b/llvm/tools/llvm-reduce/DeltaPass.h
new file mode 100644
index 0000000000000..ae8fd489e4308
--- /dev/null
+++ b/llvm/tools/llvm-reduce/DeltaPass.h
@@ -0,0 +1,25 @@
+//===--- DeltaPass.h - Delta Pass Structure --------------------*- 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
+//
+//===----------------------------------------------------------------------===//
+
+
+
+#ifndef LLVM_TOOLS_LLVM_REDUCE_DELTAPASS_H
+#define LLVM_TOOLS_LLVM_REDUCE_DELTAPASS_H
+
+#include "TestRunner.h"
+
+namespace llvm {
+struct DeltaPass {
+  StringRef Name;           // e.g., "strip-debug-info"
+  void (*Func)(TestRunner &, StringRef); // function pointer, e.g.,stripDebugInfoDeltaPass
+  StringRef Desc;           // e.g., "Stripping Debug Info"
+};
+} // namespace llvm
+
+
+#endif
\ No newline at end of file
diff --git a/llvm/tools/llvm-reduce/DeltaPasses.def b/llvm/tools/llvm-reduce/DeltaPasses.def
new file mode 100644
index 0000000000000..5ef3f79604918
--- /dev/null
+++ b/llvm/tools/llvm-reduce/DeltaPasses.def
@@ -0,0 +1,68 @@
+//===--- DeltaPasses.def - Delta Pass Definitions --------------*- 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
+//
+//===----------------------------------------------------------------------===//
+
+
+#ifndef DELTA_PASS_IR
+#define DELTA_PASS_IR(NAME, FUNC, DESC)
+#endif
+DELTA_PASS_IR("strip-debug-info", stripDebugInfoDeltaPass, "Stripping Debug Info")                    
+DELTA_PASS_IR("functions", reduceFunctionsDeltaPass, "Reducing Functions")                          
+DELTA_PASS_IR("function-bodies", reduceFunctionBodiesDeltaPass, "Reducing Function Bodies")               
+DELTA_PASS_IR("special-globals", reduceSpecialGlobalsDeltaPass, "Reducing Special Globals")               
+DELTA_PASS_IR("aliases", reduceAliasesDeltaPass, "Reducing Aliases")                              
+DELTA_PASS_IR("ifuncs", reduceIFuncsDeltaPass, "Reducing Ifuncs")                                
+DELTA_PASS_IR("simplify-conditionals-true", reduceConditionalsTrueDeltaPass,"Reducing conditional branches to true")  
+DELTA_PASS_IR("simplify-conditionals-false",                                  
+            reduceConditionalsFalseDeltaPass,"Reducing conditional branches to false")                               
+DELTA_PASS_IR("invokes", reduceInvokesDeltaPass, "Reducing Invokes")                              
+DELTA_PASS_IR("unreachable-basic-blocks",                                     
+            reduceUnreachableBasicBlocksDeltaPass, "Removing Unreachable Basic Blocks")                          
+DELTA_PASS_IR("basic-blocks", reduceBasicBlocksDeltaPass, "Reducing Basic Blocks")                     
+DELTA_PASS_IR("simplify-cfg", reduceUsingSimplifyCFGDeltaPass,"Reducing using SimplifyCFG")                
+DELTA_PASS_IR("function-data", reduceFunctionDataDeltaPass, "Reducing Function Data")                   
+DELTA_PASS_IR("global-values", reduceGlobalValuesDeltaPass, "Reducing GlobalValues")                   
+DELTA_PASS_IR("global-objects", reduceGlobalObjectsDeltaPass, "Reducing GlobalObjects")                 
+DELTA_PASS_IR("global-initializers", reduceGlobalsInitializersDeltaPass, "Reducing GV Initializers")      
+DELTA_PASS_IR("global-variables", reduceGlobalsDeltaPass, "Reducing GlobalVariables")                     
+DELTA_PASS_IR("di-metadata", reduceDIMetadataDeltaPass, "Reducing DIMetadata")                       
+DELTA_PASS_IR("dbg-records", reduceDbgRecordDeltaPass, "Reducing DbgRecords")                        
+DELTA_PASS_IR("distinct-metadata", reduceDistinctMetadataDeltaPass, "Reducing Distinct Metadata")           
+DELTA_PASS_IR("metadata", reduceMetadataDeltaPass,"Reducing Metadata")                            
+DELTA_PASS_IR("named-metadata", reduceNamedMetadataDeltaPass,"Reducing Named Metadata")                 
+DELTA_PASS_IR("arguments", reduceArgumentsDeltaPass, "Reducing Arguments")                          
+DELTA_PASS_IR("instructions", reduceInstructionsDeltaPass, "Reducing Instructions")                    
+DELTA_PASS_IR("simplify-instructions", simplifyInstructionsDeltaPass,"Simplifying Instructions")         
+DELTA_PASS_IR("ir-passes", runIRPassesDeltaPass,"Running passes")                              
+DELTA_PASS_IR("operands-zero", reduceOperandsZeroDeltaPass,"Reducing Operands to zero")                   
+DELTA_PASS_IR("operands-one", reduceOperandsOneDeltaPass,"Reducing Operands to one")                     
+DELTA_PASS_IR("operands-nan", reduceOperandsNaNDeltaPass,"Reducing Operands to NaN")                     
+DELTA_PASS_IR("operands-to-args", reduceOperandsToArgsDeltaPass,"Converting operands to function arguments")              
+DELTA_PASS_IR("operands-skip", reduceOperandsSkipDeltaPass,"Reducing operands by skipping over instructions")                   
+DELTA_PASS_IR("operand-bundles", reduceOperandBundesDeltaPass,"Reducing Operand Bundles")                
+DELTA_PASS_IR("attributes", reduceAttributesDeltaPass, "Reducing Attributes")                        
+DELTA_PASS_IR("module-data", reduceModuleDataDeltaPass,"Reducing Module Data")                       
+DELTA_PASS_IR("opcodes", reduceOpcodesDeltaPass,"Reducing Opcodes")                              
+DELTA_PASS_IR("volatile", reduceVolatileInstructionsDeltaPass,"Reducing Volatile Instructions")                
+DELTA_PASS_IR("atomic-ordering", reduceAtomicOrderingDeltaPass,"Reducing Atomic Ordering")               
+DELTA_PASS_IR("syncscopes", reduceAtomicSyncScopesDeltaPass,"Reducing Atomic Sync Scopes")                  
+DELTA_PASS_IR("instruction-flags", reduceInstructionFlagsDeltaPass, "Reducing Instruction Flags")
+
+
+#ifndef DELTA_PASS_MIR
+#define DELTA_PASS_MIR(NAME, FUNC, DESC)
+#endif
+DELTA_PASS_MIR("instructions", reduceInstructionsMIRDeltaPass, "Reducing Instructions")                 
+DELTA_PASS_MIR("ir-instruction-references",                                    
+            reduceIRInstructionReferencesDeltaPass,"Reducing IR references from instructions")                         
+DELTA_PASS_MIR("ir-block-references", reduceIRBlockReferencesDeltaPass,"Reducing IR references from blocks")        
+DELTA_PASS_MIR("ir-function-references", reduceIRFunctionReferencesDeltaPass,"Reducing IR references from functions")  
+DELTA_PASS_MIR("instruction-flags", reduceInstructionFlagsMIRDeltaPass, "Reducing Instruction Flags")        
+DELTA_PASS_MIR("register-uses", reduceRegisterUsesMIRDeltaPass,"Reducing register uses")                
+DELTA_PASS_MIR("register-defs", reduceRegisterDefsMIRDeltaPass,"Reducing register defs")                
+DELTA_PASS_MIR("register-hints", reduceVirtualRegisterHintsDeltaPass,"Reducing virtual register hints from functions")          
+DELTA_PASS_MIR("register-masks", reduceRegisterMasksMIRDeltaPass,"Reducing register masks")
\ No newline at end of file
diff --git a/llvm/tools/llvm-reduce/deltas/Delta.h b/llvm/tools/llvm-reduce/deltas/Delta.h
index 96fcea89484c0..140fa1e870055 100644
--- a/llvm/tools/llvm-reduce/deltas/Delta.h
+++ b/llvm/tools/llvm-reduce/deltas/Delta.h
@@ -20,6 +20,7 @@
 #include "llvm/Support/raw_ostream.h"
 #include <functional>
 #include <utility>
+#include "llvm/ADT/StringRef.h"
 
 namespace llvm {
 
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp b/llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp
index 785e2910d47f7..8c6faab51b6b8 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceAliases.cpp
@@ -44,10 +44,10 @@ static void extractIFuncsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
     lowerGlobalIFuncUsersAsGlobalCtor(Mod, IFuncs);
 }
 
-void llvm::reduceAliasesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractAliasesFromModule, "Reducing Aliases (aliases)");
+void llvm::reduceAliasesDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractAliasesFromModule, PassMessage);
 }
 
-void llvm::reduceIFuncsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractIFuncsFromModule, "Reducing Ifuncs (ifuncs)");
+void llvm::reduceIFuncsDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractIFuncsFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceAliases.h b/llvm/tools/llvm-reduce/deltas/ReduceAliases.h
index 404677d221ca4..b4dbc3082a97f 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceAliases.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceAliases.h
@@ -17,8 +17,8 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceAliasesDeltaPass(TestRunner &Test);
-void reduceIFuncsDeltaPass(TestRunner &Test);
+void reduceAliasesDeltaPass(TestRunner &Test, StringRef PassMessage);
+void reduceIFuncsDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp b/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
index d96c8d67da128..774e641aee20a 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
@@ -119,6 +119,6 @@ static void extractArgumentsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceArgumentsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractArgumentsFromModule, "Reducing Arguments (arguments)");
+void llvm::reduceArgumentsDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractArgumentsFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceArguments.h b/llvm/tools/llvm-reduce/deltas/ReduceArguments.h
index 5adcfe89266bc..f4a327a848cdf 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceArguments.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceArguments.h
@@ -20,7 +20,7 @@
 #include "llvm/Transforms/Utils/Cloning.h"
 
 namespace llvm {
-void reduceArgumentsDeltaPass(TestRunner &Test);
+void reduceArgumentsDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp b/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
index 72f0377cbbeb8..e1bd2adaf4fff 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceAttributes.cpp
@@ -148,6 +148,6 @@ static void extractAttributesFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
   R.visit(WorkItem.getModule());
 }
 
-void llvm::reduceAttributesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractAttributesFromModule, "Reducing Attributes (attributes)");
+void llvm::reduceAttributesDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractAttributesFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceAttributes.h b/llvm/tools/llvm-reduce/deltas/ReduceAttributes.h
index a2e9955ac5bb4..f8c9a52d20a6b 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceAttributes.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceAttributes.h
@@ -14,9 +14,11 @@
 #ifndef LLVM_TOOLS_LLVM_REDUCE_DELTAS_REDUCEATTRIBUTES_H
 #define LLVM_TOOLS_LLVM_REDUCE_DELTAS_REDUCEATTRIBUTES_H
 
+#include "llvm/ADT/StringRef.h"
+
 namespace llvm {
 class TestRunner;
-void reduceAttributesDeltaPass(TestRunner &Test);
+void reduceAttributesDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp b/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
index f418e056ed666..c8cfea3f73dac 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
@@ -188,8 +188,8 @@ static void extractBasicBlocksFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceBasicBlocksDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractBasicBlocksFromModule, "Reducing Basic Blocks (basic-blocks)");
+void llvm::reduceBasicBlocksDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractBasicBlocksFromModule, PassMessage);
 }
 
 static void removeUnreachableBasicBlocksFromModule(Oracle &O,
@@ -220,7 +220,7 @@ static void removeUnreachableBasicBlocksFromModule(Oracle &O,
   }
 }
 
-void llvm::reduceUnreachableBasicBlocksDeltaPass(TestRunner &Test) {
+void llvm::reduceUnreachableBasicBlocksDeltaPass(TestRunner &Test, StringRef PassMessage) {
   runDeltaPass(Test, removeUnreachableBasicBlocksFromModule,
-               "Removing Unreachable Basic Blocks (unreachable-basic-blocks)");
+               PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.h b/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.h
index a090d675ef822..93d5122e75a74 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.h
@@ -18,8 +18,8 @@
 #include "llvm/Transforms/Utils/Cloning.h"
 
 namespace llvm {
-void reduceBasicBlocksDeltaPass(TestRunner &Test);
-void reduceUnreachableBasicBlocksDeltaPass(TestRunner &Test);
+void reduceBasicBlocksDeltaPass(TestRunner &Test, StringRef PassMessage);
+void reduceUnreachableBasicBlocksDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp b/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp
index 50d0840f0adf7..a78c92bdf23a0 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp
@@ -97,6 +97,6 @@ static void extractDIMetadataFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
   identifyUninterestingMDNodes(O, MDs);
 }
 
-void llvm::reduceDIMetadataDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractDIMetadataFromModule, "Reducing DIMetadata (di-metadata)");
+void llvm::reduceDIMetadataDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractDIMetadataFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.h b/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.h
index 379c14a0db200..f035e063eb154 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.h
@@ -17,7 +17,7 @@
 #include "TestRunner.h"
 
 namespace llvm {
-void reduceDIMetadataDeltaPass(TestRunner &Test);
+void reduceDIMetadataDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceDbgRecords.cpp b/llvm/tools/llvm-reduce/deltas/ReduceDbgRecords.cpp
index 0d64ee93e5e98..b7b675bb24477 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceDbgRecords.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceDbgRecords.cpp
@@ -34,6 +34,6 @@ static void extractDbgRecordsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
             DR.eraseFromParent();
 }
 
-void llvm::reduceDbgRecordDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractDbgRecordsFromModule, "Reducing DbgRecords (dbg-records)");
+void llvm::reduceDbgRecordDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractDbgRecordsFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceDbgRecords.h b/llvm/tools/llvm-reduce/deltas/ReduceDbgRecords.h
index 07a1e04fceaee..b36d15490bca8 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceDbgRecords.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceDbgRecords.h
@@ -19,7 +19,7 @@
 #include "llvm/IR/DebugProgramInstruction.h"
 
 namespace llvm {
-void reduceDbgRecordDeltaPass(TestRunner &Test);
+void reduceDbgRecordDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceDistinctMetadata.cpp b/llvm/tools/llvm-reduce/deltas/ReduceDistinctMetadata.cpp
index f553010e67d6c..aaa1a9569eb2c 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceDistinctMetadata.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceDistinctMetadata.cpp
@@ -136,7 +136,7 @@ static void extractDistinctMetadataFromModule(Oracle &O,
     cleanUpTemporaries(NamedNode, TemporaryTuple, Program);
 }
 
-void llvm::reduceDistinctMetadataDeltaPass(TestRunner &Test) {
+void llvm::reduceDistinctMetadataDeltaPass(TestRunner &Test, StringRef PassMessage) {
   runDeltaPass(Test, extractDistinctMetadataFromModule,
-               "Reducing Distinct Metadata (distinct-metadata)");
+               PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceDistinctMetadata.h b/llvm/tools/llvm-reduce/deltas/ReduceDistinctMetadata.h
index d02e8e6107b75..1467004c2ba8c 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceDistinctMetadata.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceDistinctMetadata.h
@@ -17,7 +17,7 @@
 #include "TestRunner.h"
 
 namespace llvm {
-void reduceDistinctMetadataDeltaPass(TestRunner &Test);
+void reduceDistinctMetadataDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp b/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp
index fa523618d9962..d856db74f8491 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp
@@ -32,9 +32,9 @@ static void extractFunctionBodiesFromModule(Oracle &O,
   }
 }
 
-void llvm::reduceFunctionBodiesDeltaPass(TestRunner &Test) {
+void llvm::reduceFunctionBodiesDeltaPass(TestRunner &Test, StringRef PassMessage) {
   runDeltaPass(Test, extractFunctionBodiesFromModule,
-               "Reducing Function Bodies (function-bodies)");
+               PassMessage);
 }
 
 static void reduceFunctionData(Oracle &O, ReducerWorkItem &WorkItem) {
@@ -57,6 +57,6 @@ static void reduceFunctionData(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceFunctionDataDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceFunctionData, "Reducing Function Data (function-data)");
+void llvm::reduceFunctionDataDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, reduceFunctionData, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.h b/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.h
index ae738fb1b88e3..082f9cc0451f5 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.h
@@ -17,8 +17,8 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceFunctionBodiesDeltaPass(TestRunner &Test);
-void reduceFunctionDataDeltaPass(TestRunner &Test);
+void reduceFunctionBodiesDeltaPass(TestRunner &Test, StringRef PassMessage);
+void reduceFunctionDataDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp b/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
index 4f3a001129e88..286d98a7a0b71 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
@@ -55,6 +55,6 @@ static void extractFunctionsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceFunctionsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractFunctionsFromModule, "Reducing Functions (functions)");
+void llvm::reduceFunctionsDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractFunctionsFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceFunctions.h b/llvm/tools/llvm-reduce/deltas/ReduceFunctions.h
index d3ff0d9511289..a847387ea84db 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceFunctions.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceFunctions.h
@@ -18,7 +18,7 @@
 #include "llvm/Transforms/Utils/Cloning.h"
 
 namespace llvm {
-void reduceFunctionsDeltaPass(TestRunner &Test);
+void reduceFunctionsDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp
index c4b9fae85b68f..27b354ce86965 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.cpp
@@ -30,6 +30,6 @@ static void reduceGOs(Oracle &O, ReducerWorkItem &Program) {
   }
 }
 
-void llvm::reduceGlobalObjectsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceGOs, "Reducing GlobalObjects (global-objects)");
+void llvm::reduceGlobalObjectsDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, reduceGOs, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.h b/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.h
index 35c38a9ecf212..d743dc8539913 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalObjects.h
@@ -12,7 +12,7 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceGlobalObjectsDeltaPass(TestRunner &Test);
+void reduceGlobalObjectsDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp
index b0b0a247118cf..c956efad9a6ef 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.cpp
@@ -67,6 +67,6 @@ static void reduceGVs(Oracle &O, ReducerWorkItem &Program) {
   }
 }
 
-void llvm::reduceGlobalValuesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceGVs, "Reducing GlobalValues (global-values)");
+void llvm::reduceGlobalValuesDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, reduceGVs, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.h b/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.h
index 19c0707936528..b97a7885a829f 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalValues.h
@@ -17,7 +17,7 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceGlobalValuesDeltaPass(TestRunner &Test);
+void reduceGlobalValuesDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
index 59fd58848585e..4569de706195e 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.cpp
@@ -28,6 +28,6 @@ static void extractGVsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
     }
 }
 
-void llvm::reduceGlobalsInitializersDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractGVsFromModule, "Reducing GV Initializers (global-initializers)");
+void llvm::reduceGlobalsInitializersDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractGVsFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.h b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.h
index 318b29b6ca5e4..25b5be7ab145c 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVarInitializers.h
@@ -19,7 +19,7 @@
 #include "llvm/Transforms/Utils/Cloning.h"
 
 namespace llvm {
-void reduceGlobalsInitializersDeltaPass(TestRunner &Test);
+void reduceGlobalsInitializersDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
index f8d9a88a93641..87c2e7823f82b 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
@@ -54,6 +54,6 @@ static void extractGVsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceGlobalsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractGVsFromModule, "Reducing GlobalVariables (global-variables)");
+void llvm::reduceGlobalsDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractGVsFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.h b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.h
index 1198dceb45368..e62b4dd19bef4 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.h
@@ -19,7 +19,7 @@
 #include "llvm/Transforms/Utils/Cloning.h"
 
 namespace llvm {
-void reduceGlobalsDeltaPass(TestRunner &Test);
+void reduceGlobalsDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp b/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp
index 41dcb69444bb3..43c4b6a785af6 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp
@@ -68,16 +68,14 @@ static void stripIRFromFunctions(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceIRInstructionReferencesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, stripIRFromInstructions,
-               "Reducing IR references from instructions (ir-instruction-references)");
+void llvm::reduceIRInstructionReferencesDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, stripIRFromInstructions, PassMessage);
 }
 
-void llvm::reduceIRBlockReferencesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, stripIRFromBlocks, "Reducing IR references from blocks (ir-block-references)");
+void llvm::reduceIRBlockReferencesDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, stripIRFromBlocks, PassMessage);
 }
 
-void llvm::reduceIRFunctionReferencesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, stripIRFromFunctions,
-               "Reducing IR references from functions (ir-function-references)");
+void llvm::reduceIRFunctionReferencesDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, stripIRFromFunctions, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.h b/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.h
index 548559a0775b4..1b0a64a212975 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceIRReferences.h
@@ -14,17 +14,19 @@
 #ifndef LLVM_TOOLS_LLVM_REDUCE_DELTAS_REDUCEIRREFERENCES_MIR_H
 #define LLVM_TOOLS_LLVM_REDUCE_DELTAS_REDUCEIRREFERENCES_MIR_H
 
+#include "llvm/ADT/StringRef.h"
+
 namespace llvm {
 class TestRunner;
 
 /// Remove IR references from instructions (i.e. from memory operands)
-void reduceIRInstructionReferencesDeltaPass(TestRunner &Test);
+void reduceIRInstructionReferencesDeltaPass(TestRunner &Test, StringRef PassMessage);
 
 /// Remove IR BasicBlock references (the block names)
-void reduceIRBlockReferencesDeltaPass(TestRunner &Test);
+void reduceIRBlockReferencesDeltaPass(TestRunner &Test, StringRef PassMessage);
 
 /// Remove IR references from function level fields (e.g. frame object names)
-void reduceIRFunctionReferencesDeltaPass(TestRunner &Test);
+void reduceIRFunctionReferencesDeltaPass(TestRunner &Test, StringRef PassMessage);
 
 } // namespace llvm
 
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlags.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlags.cpp
index 459efb75878c7..a9f08fc54135f 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlags.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlags.cpp
@@ -84,6 +84,6 @@ static void reduceFlagsInModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceInstructionFlagsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceFlagsInModule, "Reducing Instruction Flags (instruction-flags)");
+void llvm::reduceInstructionFlagsDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, reduceFlagsInModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlags.h b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlags.h
index 1764c0199da87..e1a5d5c5d28a8 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlags.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlags.h
@@ -12,7 +12,7 @@
 #include "TestRunner.h"
 
 namespace llvm {
-void reduceInstructionFlagsDeltaPass(TestRunner &Test);
+void reduceInstructionFlagsDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp
index 1988283eb92bd..9d4ff7c045877 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.cpp
@@ -30,6 +30,6 @@ static void removeFlagsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceInstructionFlagsMIRDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, removeFlagsFromModule, "Reducing Instruction Flags (instruction-flags)");
+void llvm::reduceInstructionFlagsMIRDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, removeFlagsFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.h b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.h
index a5a34d275e2f0..43e4471c3aaa7 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructionFlagsMIR.h
@@ -17,7 +17,7 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceInstructionFlagsMIRDeltaPass(TestRunner &Test);
+void reduceInstructionFlagsMIRDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp
index 230a1252f6581..8273dbc828d60 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp
@@ -63,6 +63,6 @@ static void extractInstrFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
     I->eraseFromParent();
 }
 
-void llvm::reduceInstructionsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractInstrFromModule, "Reducing Instructions (instructions)");
+void llvm::reduceInstructionsDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractInstrFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructions.h b/llvm/tools/llvm-reduce/deltas/ReduceInstructions.h
index 8c13a02cb98f3..b7f8c21239ebc 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructions.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructions.h
@@ -19,7 +19,7 @@
 #include "llvm/Transforms/Utils/Cloning.h"
 
 namespace llvm {
-void reduceInstructionsDeltaPass(TestRunner &Test);
+void reduceInstructionsDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp
index 89ef249539c3f..a02f2a158f135 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp
@@ -158,6 +158,6 @@ static void extractInstrFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceInstructionsMIRDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractInstrFromModule, "Reducing Instructions (instructions)");
+void llvm::reduceInstructionsMIRDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractInstrFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.h b/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.h
index 70e0ac5fcf37f..1cb2c76b901cd 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.h
@@ -14,10 +14,11 @@
 #ifndef LLVM_TOOLS_LLVM_REDUCE_DELTAS_REDUCEINSTRUCTIONS_MIR_H
 #define LLVM_TOOLS_LLVM_REDUCE_DELTAS_REDUCEINSTRUCTIONS_MIR_H
 
+#include "llvm/ADT/StringRef.h"
 namespace llvm {
 class TestRunner;
 
-void reduceInstructionsMIRDeltaPass(TestRunner &Test);
+void reduceInstructionsMIRDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInvokes.cpp b/llvm/tools/llvm-reduce/deltas/ReduceInvokes.cpp
index 98e9097c916a7..0dc57cf906080 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInvokes.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInvokes.cpp
@@ -36,6 +36,6 @@ static void reduceInvokesInModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceInvokesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceInvokesInModule, "Reducing Invokes (invokes)");
+void llvm::reduceInvokesDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, reduceInvokesInModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceInvokes.h b/llvm/tools/llvm-reduce/deltas/ReduceInvokes.h
index 9607add166005..351a82fa4b888 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceInvokes.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceInvokes.h
@@ -12,7 +12,7 @@
 #include "TestRunner.h"
 
 namespace llvm {
-void reduceInvokesDeltaPass(TestRunner &Test);
+void reduceInvokesDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceMemoryOperations.cpp b/llvm/tools/llvm-reduce/deltas/ReduceMemoryOperations.cpp
index 53a6e3cb1a558..ed11c177f39fc 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceMemoryOperations.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceMemoryOperations.cpp
@@ -41,8 +41,8 @@ static void removeVolatileInModule(Oracle &O, ReducerWorkItem &WorkItem) {
     removeVolatileInFunction(O, F);
 }
 
-void llvm::reduceVolatileInstructionsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, removeVolatileInModule, "Reducing Volatile Instructions (volatile)");
+void llvm::reduceVolatileInstructionsDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, removeVolatileInModule, PassMessage);
 }
 
 static void reduceAtomicSyncScopesInFunction(Oracle &O, Function &F) {
@@ -72,9 +72,9 @@ static void reduceAtomicSyncScopesInModule(Oracle &O,
     reduceAtomicSyncScopesInFunction(O, F);
 }
 
-void llvm::reduceAtomicSyncScopesDeltaPass(TestRunner &Test) {
+void llvm::reduceAtomicSyncScopesDeltaPass(TestRunner &Test, StringRef PassMessage) {
   runDeltaPass(Test, reduceAtomicSyncScopesInModule,
-               "Reducing Atomic Sync Scopes (syncscopes)");
+               PassMessage);
 }
 
 // TODO: Might be helpful to incrementally relax orders
@@ -105,6 +105,6 @@ static void reduceAtomicOrderingInModule(Oracle &O, ReducerWorkItem &WorkItem) {
     reduceAtomicOrderingInFunction(O, F);
 }
 
-void llvm::reduceAtomicOrderingDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceAtomicOrderingInModule, "Reducing Atomic Ordering (atomic-ordering)");
+void llvm::reduceAtomicOrderingDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, reduceAtomicOrderingInModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceMemoryOperations.h b/llvm/tools/llvm-reduce/deltas/ReduceMemoryOperations.h
index ca6a770dff081..406d271bee52f 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceMemoryOperations.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceMemoryOperations.h
@@ -12,9 +12,9 @@
 #include "TestRunner.h"
 
 namespace llvm {
-void reduceVolatileInstructionsDeltaPass(TestRunner &Test);
-void reduceAtomicSyncScopesDeltaPass(TestRunner &Test);
-void reduceAtomicOrderingDeltaPass(TestRunner &Test);
+void reduceVolatileInstructionsDeltaPass(TestRunner &Test, StringRef PassMessage);
+void reduceAtomicSyncScopesDeltaPass(TestRunner &Test, StringRef PassMessage);
+void reduceAtomicOrderingDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp b/llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp
index 5cf69a548964c..3d5dca19cfc5d 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp
@@ -123,10 +123,10 @@ static void extractMetadataFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceMetadataDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractMetadataFromModule, "Reducing Metadata (metadata)");
+void llvm::reduceMetadataDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractMetadataFromModule, PassMessage);
 }
 
-void llvm::reduceNamedMetadataDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceNamedMetadataOperands, "Reducing Named Metadata (named-metadata)");
+void llvm::reduceNamedMetadataDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, reduceNamedMetadataOperands, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceMetadata.h b/llvm/tools/llvm-reduce/deltas/ReduceMetadata.h
index f3af31a2759bc..60bdead193292 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceMetadata.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceMetadata.h
@@ -17,8 +17,8 @@
 #include "TestRunner.h"
 
 namespace llvm {
-void reduceMetadataDeltaPass(TestRunner &Test);
-void reduceNamedMetadataDeltaPass(TestRunner &Test);
+void reduceMetadataDeltaPass(TestRunner &Test, StringRef PassMessage);
+void reduceNamedMetadataDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp b/llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp
index 4ac042d8b8cc2..1d0f92e7e866b 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceModuleData.cpp
@@ -26,6 +26,6 @@ static void clearModuleData(Oracle &O, ReducerWorkItem &WorkItem) {
     Program.setModuleInlineAsm("");
 }
 
-void llvm::reduceModuleDataDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, clearModuleData, "Reducing Module Data (module-data)");
+void llvm::reduceModuleDataDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, clearModuleData, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceModuleData.h b/llvm/tools/llvm-reduce/deltas/ReduceModuleData.h
index 960fe8c6d3a6d..d5b1470d3cabc 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceModuleData.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceModuleData.h
@@ -12,7 +12,7 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceModuleDataDeltaPass(TestRunner &Test);
+void reduceModuleDataDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
index 3f710e03ea8d2..97c4b5352fc91 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
@@ -262,6 +262,6 @@ static void replaceOpcodesInModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceOpcodesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, replaceOpcodesInModule, "Reducing Opcodes (opcodes)");
+void llvm::reduceOpcodesDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, replaceOpcodesInModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.h b/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.h
index 79edc7f32facf..0d62d7ed15838 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOpcodes.h
@@ -12,7 +12,7 @@
 #include "TestRunner.h"
 
 namespace llvm {
-void reduceOpcodesDeltaPass(TestRunner &Test);
+void reduceOpcodesDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
index 3c81cd1d3f391..1887ec4b1e5f3 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp
@@ -105,7 +105,7 @@ static void extractOperandBundesFromModule(Oracle &O,
     maybeRewriteCallWithDifferentBundles(I.first, I.second);
 }
 
-void llvm::reduceOperandBundesDeltaPass(TestRunner &Test) {
+void llvm::reduceOperandBundesDeltaPass(TestRunner &Test, StringRef PassMessage) {
   runDeltaPass(Test, extractOperandBundesFromModule,
-               "Reducing Operand Bundles (operand-bundles)");
+               PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.h b/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.h
index 390b029242536..fd38b824b6c7e 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.h
@@ -14,9 +14,11 @@
 #ifndef LLVM_TOOLS_LLVM_REDUCE_DELTAS_REDUCEOPERANDBUNDLES_H
 #define LLVM_TOOLS_LLVM_REDUCE_DELTAS_REDUCEOPERANDBUNDLES_H
 
+#include "llvm/ADT/StringRef.h"
+
 namespace llvm {
 class TestRunner;
-void reduceOperandBundesDeltaPass(TestRunner &Test);
+void reduceOperandBundesDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp
index f23a29112eb8d..442baae1b4844 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp
@@ -83,7 +83,7 @@ static bool switchCaseExists(Use &Op, ConstantInt *CI) {
   return SI->findCaseValue(CI) != SI->case_default();
 }
 
-void llvm::reduceOperandsOneDeltaPass(TestRunner &Test) {
+void llvm::reduceOperandsOneDeltaPass(TestRunner &Test, StringRef PassMessage) {
   auto ReduceValue = [](Use &Op) -> Value * {
     if (!shouldReduceOperand(Op))
       return nullptr;
@@ -123,10 +123,10 @@ void llvm::reduceOperandsOneDeltaPass(TestRunner &Test) {
       [ReduceValue](Oracle &O, ReducerWorkItem &WorkItem) {
         extractOperandsFromModule(O, WorkItem, ReduceValue);
       },
-      "Reducing Operands to one (operands-one)");
+      PassMessage);
 }
 
-void llvm::reduceOperandsZeroDeltaPass(TestRunner &Test) {
+void llvm::reduceOperandsZeroDeltaPass(TestRunner &Test, StringRef PassMessage) {
   auto ReduceValue = [](Use &Op) -> Value * {
     if (!shouldReduceOperand(Op))
       return nullptr;
@@ -142,10 +142,10 @@ void llvm::reduceOperandsZeroDeltaPass(TestRunner &Test) {
       [ReduceValue](Oracle &O, ReducerWorkItem &Program) {
         extractOperandsFromModule(O, Program, ReduceValue);
       },
-      "Reducing Operands to zero (operands-zero)");
+      PassMessage);
 }
 
-void llvm::reduceOperandsNaNDeltaPass(TestRunner &Test) {
+void llvm::reduceOperandsNaNDeltaPass(TestRunner &Test, StringRef PassMessage) {
   auto ReduceValue = [](Use &Op) -> Value * {
     Type *Ty = Op->getType();
     if (!Ty->isFPOrFPVectorTy())
@@ -170,5 +170,5 @@ void llvm::reduceOperandsNaNDeltaPass(TestRunner &Test) {
       [ReduceValue](Oracle &O, ReducerWorkItem &Program) {
         extractOperandsFromModule(O, Program, ReduceValue);
       },
-      "Reducing Operands to NaN (operands-nan)");
+      PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperands.h b/llvm/tools/llvm-reduce/deltas/ReduceOperands.h
index b4a18998f8e20..5a29e0e868c3d 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperands.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperands.h
@@ -12,9 +12,9 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceOperandsOneDeltaPass(TestRunner &Test);
-void reduceOperandsZeroDeltaPass(TestRunner &Test);
-void reduceOperandsNaNDeltaPass(TestRunner &Test);
+void reduceOperandsOneDeltaPass(TestRunner &Test, StringRef PassMessage);
+void reduceOperandsZeroDeltaPass(TestRunner &Test, StringRef PassMessage);
+void reduceOperandsNaNDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp
index 565c639532ad1..fe8b240bed559 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.cpp
@@ -230,7 +230,7 @@ static void extractOperandsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceOperandsSkipDeltaPass(TestRunner &Test) {
+void llvm::reduceOperandsSkipDeltaPass(TestRunner &Test, StringRef PassMessage) {
   runDeltaPass(Test, extractOperandsFromModule,
-               "Reducing operands by skipping over instructions (operands-skip)");
+               PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.h b/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.h
index 79897011639a2..2b0969cf37502 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandsSkip.h
@@ -12,7 +12,7 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceOperandsSkipDeltaPass(TestRunner &Test);
+void reduceOperandsSkipDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif /* LLVM_TOOLS_LLVM_REDUCE_DELTAS_REDUCEOPERANDSSKIP_H */
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
index e85fd9340021d..b2ba7d1d0f637 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
@@ -61,20 +61,8 @@ static void replaceFunctionCalls(Function *OldF, Function *NewF) {
   for (Use &U : OldF->uses()) {
     auto *CI = cast<CallBase>(U.getUser());
     assert(&U == &CI->getCalledOperandUse());
-
-    Function *CalledF = CI->getCalledFunction();
-    if (CalledF == OldF) {
-      Callers.push_back(CI);
-    } else {
-      // The call may have undefined behavior by calling a function with a
-      // mismatched signature. In this case, do not bother adjusting the
-      // callsites to pad with any new arguments.
-
-      // TODO: Better QoI to try to add new arguments to the end, and ignore
-      // existing mismatches.
-      assert(!CalledF && CI->getCalledOperand()->stripPointerCasts() == OldF &&
-             "only expected call and function signature mismatch");
-    }
+    assert(CI->getCalledFunction() == OldF);
+    Callers.push_back(CI);
   }
 
   // Call arguments for NewF.
@@ -214,7 +202,7 @@ static void reduceOperandsToArgs(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceOperandsToArgsDeltaPass(TestRunner &Test) {
+void llvm::reduceOperandsToArgsDeltaPass(TestRunner &Test, StringRef PassMessage) {
   runDeltaPass(Test, reduceOperandsToArgs,
-               "Converting operands to function arguments (operands-to-args)");
+               PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.h b/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.h
index 23043dd60b6ff..b45e5b6218716 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.h
@@ -12,7 +12,7 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceOperandsToArgsDeltaPass(TestRunner &Test);
+void reduceOperandsToArgsDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif /* LLVM_TOOLS_LLVM_REDUCE_DELTAS_REDUCEOPERANDSTOARGS_H */
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp b/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp
index 6fdd1f42c90f4..609bb531322d2 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp
@@ -117,6 +117,6 @@ static void removeDefsFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceRegisterDefsMIRDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, removeDefsFromModule, "Reducing register defs (register-defs)");
+void llvm::reduceRegisterDefsMIRDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, removeDefsFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.h b/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.h
index 031d24125bac8..c5318ca2d24a4 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.h
@@ -17,7 +17,7 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceRegisterDefsMIRDeltaPass(TestRunner &Test);
+void reduceRegisterDefsMIRDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp b/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp
index 5a37773bcf4f0..f19b5e483be53 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp
@@ -68,6 +68,6 @@ static void reduceMasksInModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceRegisterMasksMIRDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceMasksInModule, "Reducing register masks (register-masks)");
+void llvm::reduceRegisterMasksMIRDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, reduceMasksInModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.h b/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.h
index b8bb109e5c996..aca5cd712b6be 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.h
@@ -12,7 +12,7 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceRegisterMasksMIRDeltaPass(TestRunner &Test);
+void reduceRegisterMasksMIRDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp b/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp
index 5249ccd05b3ea..572bc61ae6514 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.cpp
@@ -62,6 +62,6 @@ static void removeUsesFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
   }
 }
 
-void llvm::reduceRegisterUsesMIRDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, removeUsesFromModule, "Reducing register uses (register-uses)");
+void llvm::reduceRegisterUsesMIRDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, removeUsesFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.h b/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.h
index 91ecba488f37c..4398d77518066 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceRegisterUses.h
@@ -17,7 +17,7 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceRegisterUsesMIRDeltaPass(TestRunner &Test);
+void reduceRegisterUsesMIRDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp b/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp
index 57715cd635657..a4d173bff1351 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.cpp
@@ -41,7 +41,7 @@ static void extractSpecialGlobalsFromModule(Oracle &O,
   }
 }
 
-void llvm::reduceSpecialGlobalsDeltaPass(TestRunner &Test) {
+void llvm::reduceSpecialGlobalsDeltaPass(TestRunner &Test, StringRef PassMessage) {
   runDeltaPass(Test, extractSpecialGlobalsFromModule,
-               "Reducing Special Globals (special-globals)");
+               PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.h b/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.h
index d17790529e06b..bae815a85a570 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceSpecialGlobals.h
@@ -20,7 +20,7 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceSpecialGlobalsDeltaPass(TestRunner &Test);
+void reduceSpecialGlobalsDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp b/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
index d19fc0bd74e08..af1c64150cab2 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
@@ -31,8 +31,8 @@ static void reduceUsingSimplifyCFG(Oracle &O, ReducerWorkItem &WorkItem) {
     simplifyCFG(BB, TTI);
 }
 
-void llvm::reduceUsingSimplifyCFGDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, reduceUsingSimplifyCFG, "Reducing using SimplifyCFG (simplify-cfg)");
+void llvm::reduceUsingSimplifyCFGDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, reduceUsingSimplifyCFG, PassMessage);
 }
 static void reduceConditionals(Oracle &O, ReducerWorkItem &WorkItem,
                                bool Direction) {
@@ -59,20 +59,20 @@ static void reduceConditionals(Oracle &O, ReducerWorkItem &WorkItem,
     simplifyCFG(BB, TTI);
 }
 
-void llvm::reduceConditionalsTrueDeltaPass(TestRunner &Test) {
+void llvm::reduceConditionalsTrueDeltaPass(TestRunner &Test, StringRef PassMessage) {
   runDeltaPass(
       Test,
       [](Oracle &O, ReducerWorkItem &WorkItem) {
         reduceConditionals(O, WorkItem, true);
       },
-      "Reducing conditional branches to true (simplify-conditionals-true)");
+      PassMessage);
 }
 
-void llvm::reduceConditionalsFalseDeltaPass(TestRunner &Test) {
+void llvm::reduceConditionalsFalseDeltaPass(TestRunner &Test, StringRef PassMessage) {
   runDeltaPass(
       Test,
       [](Oracle &O, ReducerWorkItem &WorkItem) {
         reduceConditionals(O, WorkItem, false);
       },
-      "Reducing conditional branches to false (simplify-conditionals-false)");
+      PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.h b/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.h
index 01a14602909b3..3be5667eb6a73 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.h
@@ -17,9 +17,9 @@
 #include "Delta.h"
 
 namespace llvm {
-void reduceUsingSimplifyCFGDeltaPass(TestRunner &Test);
-void reduceConditionalsTrueDeltaPass(TestRunner &Test);
-void reduceConditionalsFalseDeltaPass(TestRunner &Test);
+void reduceUsingSimplifyCFGDeltaPass(TestRunner &Test, StringRef PassMessage);
+void reduceConditionalsTrueDeltaPass(TestRunner &Test, StringRef PassMessage);
+void reduceConditionalsFalseDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp b/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp
index ad78640d3bc3a..e183fb5f68a69 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.cpp
@@ -41,7 +41,7 @@ static void dropRegisterHintsFromFunctions(Oracle &O,
   }
 }
 
-void llvm::reduceVirtualRegisterHintsDeltaPass(TestRunner &Test) {
+void llvm::reduceVirtualRegisterHintsDeltaPass(TestRunner &Test, StringRef PassMessage) {
   runDeltaPass(Test, dropRegisterHintsFromFunctions,
-               "Reducing virtual register hints from functions (register-hints)");
+               PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.h b/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.h
index 405ba31703e54..fbf4f923a0e5e 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.h
+++ b/llvm/tools/llvm-reduce/deltas/ReduceVirtualRegisters.h
@@ -14,11 +14,13 @@
 #ifndef LLVM_TOOLS_LLVM_REDUCE_DELTAS_REDUCEVIRTUALREGISTERS_H
 #define LLVM_TOOLS_LLVM_REDUCE_DELTAS_REDUCEVIRTUALREGISTERS_H
 
+#include "llvm/ADT/StringRef.h"
+
 namespace llvm {
 class TestRunner;
 
 /// Remove register allocation hints from virtual registes.
-void reduceVirtualRegisterHintsDeltaPass(TestRunner &Test);
+void reduceVirtualRegisterHintsDeltaPass(TestRunner &Test, StringRef PassMessage);
 
 } // namespace llvm
 
diff --git a/llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp b/llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp
index 3a2fee5693b95..9ef1f72d75cca 100644
--- a/llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp
+++ b/llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp
@@ -50,6 +50,6 @@ static void runPasses(Oracle &O, ReducerWorkItem &WorkItem) {
   MPM.run(Program, MAM);
 }
 
-void llvm::runIRPassesDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, runPasses, "Running passes (ir-passes)");
+void llvm::runIRPassesDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, runPasses, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/RunIRPasses.h b/llvm/tools/llvm-reduce/deltas/RunIRPasses.h
index f1d4140d5b57f..9c010ecf4ae6f 100644
--- a/llvm/tools/llvm-reduce/deltas/RunIRPasses.h
+++ b/llvm/tools/llvm-reduce/deltas/RunIRPasses.h
@@ -12,7 +12,7 @@
 #include "Delta.h"
 
 namespace llvm {
-void runIRPassesDeltaPass(TestRunner &Test);
+void runIRPassesDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp b/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp
index 2d8af6ae2b8d9..d151e40afc7ea 100644
--- a/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp
+++ b/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.cpp
@@ -45,6 +45,6 @@ static void extractInstrFromModule(Oracle &O, ReducerWorkItem &WorkItem) {
     I->eraseFromParent();
 }
 
-void llvm::simplifyInstructionsDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, extractInstrFromModule, "Simplifying Instructions (simplify-instructions)");
+void llvm::simplifyInstructionsDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, extractInstrFromModule, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.h b/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.h
index 215cffcd4d12e..49256735998e7 100644
--- a/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.h
+++ b/llvm/tools/llvm-reduce/deltas/SimplifyInstructions.h
@@ -12,7 +12,7 @@
 #include "Delta.h"
 
 namespace llvm {
-void simplifyInstructionsDeltaPass(TestRunner &Test);
+void simplifyInstructionsDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif
diff --git a/llvm/tools/llvm-reduce/deltas/StripDebugInfo.cpp b/llvm/tools/llvm-reduce/deltas/StripDebugInfo.cpp
index 22545e07332e1..f7c0ee789cef5 100644
--- a/llvm/tools/llvm-reduce/deltas/StripDebugInfo.cpp
+++ b/llvm/tools/llvm-reduce/deltas/StripDebugInfo.cpp
@@ -24,6 +24,6 @@ static void stripDebugInfoImpl(Oracle &O, ReducerWorkItem &WorkItem) {
     StripDebugInfo(Program);
 }
 
-void llvm::stripDebugInfoDeltaPass(TestRunner &Test) {
-  runDeltaPass(Test, stripDebugInfoImpl, "Stripping Debug Info (strip-debug-info)");
+void llvm::stripDebugInfoDeltaPass(TestRunner &Test, StringRef PassMessage) {
+  runDeltaPass(Test, stripDebugInfoImpl, PassMessage);
 }
diff --git a/llvm/tools/llvm-reduce/deltas/StripDebugInfo.h b/llvm/tools/llvm-reduce/deltas/StripDebugInfo.h
index 56be459546e94..a2be1182f4279 100644
--- a/llvm/tools/llvm-reduce/deltas/StripDebugInfo.h
+++ b/llvm/tools/llvm-reduce/deltas/StripDebugInfo.h
@@ -12,7 +12,7 @@
 #include "Delta.h"
 
 namespace llvm {
-void stripDebugInfoDeltaPass(TestRunner &Test);
+void stripDebugInfoDeltaPass(TestRunner &Test, StringRef PassMessage);
 } // namespace llvm
 
 #endif

>From 55f42dc63872030d2e28ce71509c572ed0d71ff1 Mon Sep 17 00:00:00 2001
From: YLChen <chentongyongcz at gmail.com>
Date: Thu, 27 Mar 2025 20:31:18 +0800
Subject: [PATCH 3/4] clang format

---
 clang/lib/Frontend/ASTUnit.cpp                   |  9 ++++-----
 clang/lib/Lex/ModuleMap.cpp                      |  3 +--
 clang/lib/Serialization/ASTReader.cpp            |  6 ++++--
 flang/lib/Evaluate/fold-logical.cpp              |  2 +-
 .../utility/forward/forward_like.verify.cpp      |  4 ++--
 .../llvm-reduce/deltas/ReduceOperandsToArgs.cpp  | 16 ++++++++++++++--
 6 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index 0a5f1cfd1a264..4bc0496253f70 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -832,11 +832,10 @@ std::unique_ptr<ASTUnit> ASTUnit::LoadFromASTFile(
   AST->ModCache = createCrossProcessModuleCache();
   AST->HSOpts = HSOpts ? HSOpts : std::make_shared<HeaderSearchOptions>();
   AST->HSOpts->ModuleFormat = std::string(PCHContainerRdr.getFormats().front());
-  AST->HeaderInfo.reset(new HeaderSearch(AST->getHeaderSearchOpts(),
-                                         AST->getSourceManager(),
-                                         AST->getDiagnostics(),
-                                         AST->getLangOpts(),
-                                         /*Target=*/nullptr));
+  AST->HeaderInfo.reset(
+      new HeaderSearch(AST->getHeaderSearchOpts(), AST->getSourceManager(),
+                       AST->getDiagnostics(), AST->getLangOpts(),
+                       /*Target=*/nullptr));
   AST->PPOpts = std::make_shared<PreprocessorOptions>();
 
   // Gather Info for preprocessor construction later on.
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index a1394fd3900b0..c9b5f767555cf 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/lib/Lex/ModuleMap.cpp
@@ -353,8 +353,7 @@ ModuleMap::ModuleMap(SourceManager &SourceMgr, DiagnosticsEngine &Diags,
                      const LangOptions &LangOpts, const TargetInfo *Target,
                      HeaderSearch &HeaderInfo)
     : SourceMgr(SourceMgr), Diags(Diags), LangOpts(LangOpts), Target(Target),
-      HeaderInfo(HeaderInfo) {
-}
+      HeaderInfo(HeaderInfo) {}
 
 ModuleMap::~ModuleMap() = default;
 
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 0cd2cedb48dd9..ce7b9d966d736 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -9613,9 +9613,11 @@ ModuleFile *ASTReader::getLocalModuleFile(ModuleFile &M, unsigned ID) const {
     return I == GlobalSubmoduleMap.end() ? nullptr : I->second;
   } else {
     // It's a prefix (preamble, PCH, ...). Look it up by index.
-   int IndexFromEnd = static_cast<int>(ID >> 1);
+    int IndexFromEnd = static_cast<int>(ID >> 1);
     assert(IndexFromEnd && "got reference to unknown module file");
-    return getModuleManager().pch_modules().end()[-static_cast<int>(IndexFromEnd)];
+    return getModuleManager()
+        .pch_modules()
+        .end()[-static_cast<int>(IndexFromEnd)];
   }
 }
 
diff --git a/flang/lib/Evaluate/fold-logical.cpp b/flang/lib/Evaluate/fold-logical.cpp
index 6950caf327419..731e79b9337da 100644
--- a/flang/lib/Evaluate/fold-logical.cpp
+++ b/flang/lib/Evaluate/fold-logical.cpp
@@ -880,7 +880,7 @@ Expr<Type<TypeCategory::Logical, KIND>> FoldIntrinsicFunction(
       if (args[0]) {
         if (const auto *cst{UnwrapExpr<Constant<SomeDerived>>(args[0])}) {
           if (auto constr{cst->GetScalarValue()}) {
-            if (StructureConstructorValues & values{constr->values()};
+            if (StructureConstructorValues &values{constr->values()};
                 values.size() == 1) {
               const Expr<SomeType> &value{values.begin()->second.value()};
               if (auto flag{ToInt64(value)}) {
diff --git a/libcxx/test/std/utilities/utility/forward/forward_like.verify.cpp b/libcxx/test/std/utilities/utility/forward/forward_like.verify.cpp
index 279f0e60a1c38..5f7a319ff38ee 100644
--- a/libcxx/test/std/utilities/utility/forward/forward_like.verify.cpp
+++ b/libcxx/test/std/utilities/utility/forward/forward_like.verify.cpp
@@ -39,8 +39,8 @@ void test() {
   (void)std::forward_like<vfp>(i);  // expected-error {{no matching function for call to 'forward_like'}}
   (void)std::forward_like<cvfp>(i); // expected-error {{no matching function for call to 'forward_like'}}
 
-  using fpr  = void()&;
-  using fprr = void()&&;
+  using fpr  = void() &;
+  using fprr = void() &&;
   (void)std::forward_like<fpr>(i);  // expected-error {{no matching function for call to 'forward_like'}}
   (void)std::forward_like<fprr>(i); // expected-error {{no matching function for call to 'forward_like'}}
 }
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
index b2ba7d1d0f637..d90913db42a65 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
@@ -61,8 +61,20 @@ static void replaceFunctionCalls(Function *OldF, Function *NewF) {
   for (Use &U : OldF->uses()) {
     auto *CI = cast<CallBase>(U.getUser());
     assert(&U == &CI->getCalledOperandUse());
-    assert(CI->getCalledFunction() == OldF);
-    Callers.push_back(CI);
+
+    Function *CalledF = CI->getCalledFunction();
+    if (CalledF == OldF) {
+      Callers.push_back(CI);
+    } else {
+      // The call may have undefined behavior by calling a function with a
+      // mismatched signature. In this case, do not bother adjusting the
+      // callsites to pad with any new arguments.
+
+      // TODO: Better QoI to try to add new arguments to the end, and ignore
+      // existing mismatches.
+      assert(!CalledF && CI->getCalledOperand()->stripPointerCasts() == OldF &&
+             "only expected call and function signature mismatch");
+    }
   }
 
   // Call arguments for NewF.

>From dbe560a42f64752a3980f4793f4377e6f12f484e Mon Sep 17 00:00:00 2001
From: YLChen <chentongyongcz at gmail.com>
Date: Thu, 27 Mar 2025 20:33:57 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=20HEAD~1=20?=
 =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 llvm/tools/llvm-reduce/DeltaManager.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/llvm/tools/llvm-reduce/DeltaManager.cpp b/llvm/tools/llvm-reduce/DeltaManager.cpp
index a20a9d06a36f0..dfa4aa6a534fd 100644
--- a/llvm/tools/llvm-reduce/DeltaManager.cpp
+++ b/llvm/tools/llvm-reduce/DeltaManager.cpp
@@ -85,9 +85,9 @@ static const DeltaPass IR_Passes[] = {
 static const DeltaPass MIR_Passes[] = {
   #undef DELTA_PASS_IR
 #undef DELTA_PASS_MIR
-  #define DELTA_PASS_MIR(NAME, FUNC, DESC) {NAME, FUNC, DESC},
-  #include "DeltaPasses.def"
-  #undef DELTA_PASS_MIR
+#define DELTA_PASS_MIR(NAME, FUNC, DESC) {NAME, FUNC, DESC},
+#include "DeltaPasses.def"
+#undef DELTA_PASS_MIR
 };
   
 



More information about the llvm-commits mailing list