[lld] [llvm] [Pass] Add hyphen to some pass names (PR #74287)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 03:10:33 PST 2023


https://github.com/paperchalice updated https://github.com/llvm/llvm-project/pull/74287

>From 7c436334ad11b383d1c0cdb5b63a3087319ae600 Mon Sep 17 00:00:00 2001
From: PaperChalice <29250197+paperchalice at users.noreply.github.com>
Date: Mon, 4 Dec 2023 15:47:00 +0800
Subject: [PATCH 01/11] [Pass] Rename `callbrprepare` -> `callbr-prepare`

---
 llvm/include/llvm/CodeGen/MachinePassRegistry.def | 2 +-
 llvm/lib/CodeGen/CallBrPrepare.cpp                | 8 +++++---
 llvm/lib/Passes/PassRegistry.def                  | 2 +-
 llvm/test/CodeGen/AArch64/callbr-prepare.ll       | 2 +-
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/llvm/include/llvm/CodeGen/MachinePassRegistry.def b/llvm/include/llvm/CodeGen/MachinePassRegistry.def
index fc2d07fd6616f..dbc0f3f108047 100644
--- a/llvm/include/llvm/CodeGen/MachinePassRegistry.def
+++ b/llvm/include/llvm/CodeGen/MachinePassRegistry.def
@@ -36,7 +36,7 @@ FUNCTION_ANALYSIS("targetir", TargetIRAnalysis,
 #ifndef FUNCTION_PASS
 #define FUNCTION_PASS(NAME, PASS_NAME, CONSTRUCTOR)
 #endif
-FUNCTION_PASS("callbrprepare", CallBrPreparePass, ())
+FUNCTION_PASS("callbr-prepare", CallBrPreparePass, ())
 FUNCTION_PASS("consthoist", ConstantHoistingPass, ())
 FUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass, (false))
 FUNCTION_PASS("expand-large-div-rem", ExpandLargeDivRemPass, ())
diff --git a/llvm/lib/CodeGen/CallBrPrepare.cpp b/llvm/lib/CodeGen/CallBrPrepare.cpp
index fddc4d74b2da9..b6fe0fa00f2b0 100644
--- a/llvm/lib/CodeGen/CallBrPrepare.cpp
+++ b/llvm/lib/CodeGen/CallBrPrepare.cpp
@@ -52,7 +52,7 @@
 
 using namespace llvm;
 
-#define DEBUG_TYPE "callbrprepare"
+#define DEBUG_TYPE "callbr-prepare"
 
 static bool SplitCriticalEdges(ArrayRef<CallBrInst *> CBRs, DominatorTree &DT);
 static bool InsertIntrinsicCalls(ArrayRef<CallBrInst *> CBRs,
@@ -94,9 +94,11 @@ PreservedAnalyses CallBrPreparePass::run(Function &Fn,
 }
 
 char CallBrPrepare::ID = 0;
-INITIALIZE_PASS_BEGIN(CallBrPrepare, DEBUG_TYPE, "Prepare callbr", false, false)
+INITIALIZE_PASS_BEGIN(CallBrPrepare, "callbrprepare", "Prepare callbr", false,
+                      false)
 INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
-INITIALIZE_PASS_END(CallBrPrepare, DEBUG_TYPE, "Prepare callbr", false, false)
+INITIALIZE_PASS_END(CallBrPrepare, "callbrprepare", "Prepare callbr", false,
+                    false)
 
 FunctionPass *llvm::createCallBrPass() { return new CallBrPrepare(); }
 
diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index e23863a235a16..86ced9cda0f81 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -282,7 +282,7 @@ FUNCTION_PASS("assume-simplify", AssumeSimplifyPass())
 FUNCTION_PASS("bdce", BDCEPass())
 FUNCTION_PASS("bounds-checking", BoundsCheckingPass())
 FUNCTION_PASS("break-crit-edges", BreakCriticalEdgesPass())
-FUNCTION_PASS("callbrprepare", CallBrPreparePass())
+FUNCTION_PASS("callbr-prepare", CallBrPreparePass())
 FUNCTION_PASS("callsite-splitting", CallSiteSplittingPass())
 FUNCTION_PASS("chr", ControlHeightReductionPass())
 FUNCTION_PASS("consthoist", ConstantHoistingPass())
diff --git a/llvm/test/CodeGen/AArch64/callbr-prepare.ll b/llvm/test/CodeGen/AArch64/callbr-prepare.ll
index 701355793d1ca..afe18ca8b7c50 100644
--- a/llvm/test/CodeGen/AArch64/callbr-prepare.ll
+++ b/llvm/test/CodeGen/AArch64/callbr-prepare.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt %s -callbrprepare -S -o - | FileCheck %s
-; RUN: opt %s -passes=callbrprepare -S -o - | FileCheck %s
+; RUN: opt %s -passes=callbr-prepare -S -o - | FileCheck %s
 
 define i32 @test0() {
 ; CHECK-LABEL: @test0(

>From caba46892e0b00495612f515e3cc5efbf81ac015 Mon Sep 17 00:00:00 2001
From: PaperChalice <29250197+paperchalice at users.noreply.github.com>
Date: Mon, 4 Dec 2023 15:47:48 +0800
Subject: [PATCH 02/11] [Pass] Rename `dwarfehprepare` -> `dwarf-eh-prepare`

---
 llvm/include/llvm/CodeGen/MachinePassRegistry.def | 2 +-
 llvm/lib/CodeGen/DwarfEHPrepare.cpp               | 6 +++---
 llvm/lib/Passes/PassRegistry.def                  | 2 +-
 llvm/test/CodeGen/X86/dwarf-eh-prepare-dbg.ll     | 2 +-
 llvm/test/CodeGen/X86/dwarf-eh-prepare.ll         | 2 +-
 llvm/test/CodeGen/X86/dwarf_eh_resume.ll          | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/llvm/include/llvm/CodeGen/MachinePassRegistry.def b/llvm/include/llvm/CodeGen/MachinePassRegistry.def
index dbc0f3f108047..40b84e910fa64 100644
--- a/llvm/include/llvm/CodeGen/MachinePassRegistry.def
+++ b/llvm/include/llvm/CodeGen/MachinePassRegistry.def
@@ -120,7 +120,7 @@ DUMMY_FUNCTION_PASS("atomic-expand", AtomicExpandPass, ())
 DUMMY_FUNCTION_PASS("cfguard-check", CFGuardCheckPass, ())
 DUMMY_FUNCTION_PASS("cfguard-dispatch", CFGuardDispatchPass, ())
 DUMMY_FUNCTION_PASS("codegenprepare", CodeGenPreparePass, ())
-DUMMY_FUNCTION_PASS("dwarfehprepare", DwarfEHPass, ())
+DUMMY_FUNCTION_PASS("dwarf-eh-prepare", DwarfEHPass, ())
 DUMMY_FUNCTION_PASS("expandmemcmp", ExpandMemCmpPass, ())
 DUMMY_FUNCTION_PASS("gc-info-printer", GCInfoPrinterPass, ())
 DUMMY_FUNCTION_PASS("gc-lowering", GCLoweringPass, ())
diff --git a/llvm/lib/CodeGen/DwarfEHPrepare.cpp b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
index a44aaf33c6a49..b1a55f5214de1 100644
--- a/llvm/lib/CodeGen/DwarfEHPrepare.cpp
+++ b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
@@ -42,7 +42,7 @@
 
 using namespace llvm;
 
-#define DEBUG_TYPE "dwarfehprepare"
+#define DEBUG_TYPE "dwarf-eh-prepare"
 
 STATISTIC(NumResumesLowered, "Number of resume calls lowered");
 STATISTIC(NumCleanupLandingPadsUnreachable,
@@ -389,12 +389,12 @@ PreservedAnalyses DwarfEHPreparePass::run(Function &F,
 
 char DwarfEHPrepareLegacyPass::ID = 0;
 
-INITIALIZE_PASS_BEGIN(DwarfEHPrepareLegacyPass, DEBUG_TYPE,
+INITIALIZE_PASS_BEGIN(DwarfEHPrepareLegacyPass, "dwarfehprepare",
                       "Prepare DWARF exceptions", false, false)
 INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
 INITIALIZE_PASS_DEPENDENCY(TargetPassConfig)
 INITIALIZE_PASS_DEPENDENCY(TargetTransformInfoWrapperPass)
-INITIALIZE_PASS_END(DwarfEHPrepareLegacyPass, DEBUG_TYPE,
+INITIALIZE_PASS_END(DwarfEHPrepareLegacyPass, "dwarfehprepare",
                     "Prepare DWARF exceptions", false, false)
 
 FunctionPass *llvm::createDwarfEHPass(CodeGenOptLevel OptLevel) {
diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index 86ced9cda0f81..e70bba931f820 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -301,7 +301,7 @@ FUNCTION_PASS("dot-dom-only", DomOnlyPrinter())
 FUNCTION_PASS("dot-post-dom", PostDomPrinter())
 FUNCTION_PASS("dot-post-dom-only", PostDomOnlyPrinter())
 FUNCTION_PASS("dse", DSEPass())
-FUNCTION_PASS("dwarfehprepare", DwarfEHPreparePass(TM))
+FUNCTION_PASS("dwarf-eh-prepare", DwarfEHPreparePass(TM))
 FUNCTION_PASS("expand-large-div-rem", ExpandLargeDivRemPass(TM))
 FUNCTION_PASS("expand-large-fp-convert", ExpandLargeFpConvertPass(TM))
 FUNCTION_PASS("fix-irreducible", FixIrreduciblePass())
diff --git a/llvm/test/CodeGen/X86/dwarf-eh-prepare-dbg.ll b/llvm/test/CodeGen/X86/dwarf-eh-prepare-dbg.ll
index 651e196a4ed76..1886a594b8092 100644
--- a/llvm/test/CodeGen/X86/dwarf-eh-prepare-dbg.ll
+++ b/llvm/test/CodeGen/X86/dwarf-eh-prepare-dbg.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt -S -mtriple=x86_64-linux-gnu -dwarfehprepare < %s | FileCheck %s
-; RUN: opt -S -mtriple=x86_64-linux-gnu -passes=dwarfehprepare < %s | FileCheck %s
+; RUN: opt -S -mtriple=x86_64-linux-gnu -passes=dwarf-eh-prepare < %s | FileCheck %s
 
 ; PR57469: If _Unwind_Resume is defined in the same module and we have debug
 ; info, then the inserted _Unwind_Resume calls also need to have a dummy debug
diff --git a/llvm/test/CodeGen/X86/dwarf-eh-prepare.ll b/llvm/test/CodeGen/X86/dwarf-eh-prepare.ll
index 6778601cfbf6d..a2e797a9dee4c 100644
--- a/llvm/test/CodeGen/X86/dwarf-eh-prepare.ll
+++ b/llvm/test/CodeGen/X86/dwarf-eh-prepare.ll
@@ -1,5 +1,5 @@
 ; RUN: opt -mtriple=x86_64-linux-gnu -dwarfehprepare -simplifycfg-require-and-preserve-domtree=1 -run-twice < %s -S | FileCheck %s
-; RUN: opt -mtriple=x86_64-linux-gnu -passes=dwarfehprepare -codegen-opt-level=2 -simplifycfg-require-and-preserve-domtree=1 -run-twice < %s -S | FileCheck %s
+; RUN: opt -mtriple=x86_64-linux-gnu -passes=dwarf-eh-prepare -codegen-opt-level=2 -simplifycfg-require-and-preserve-domtree=1 -run-twice < %s -S | FileCheck %s
 
 ; Check basic functionality of IR-to-IR DWARF EH preparation. This should
 ; eliminate resumes. This pass requires a TargetMachine, so we put it under X86
diff --git a/llvm/test/CodeGen/X86/dwarf_eh_resume.ll b/llvm/test/CodeGen/X86/dwarf_eh_resume.ll
index 90fad00b68bd8..359b813bd12e5 100644
--- a/llvm/test/CodeGen/X86/dwarf_eh_resume.ll
+++ b/llvm/test/CodeGen/X86/dwarf_eh_resume.ll
@@ -1,5 +1,5 @@
 ; RUN: opt -mtriple=x86_64-linux-gnu -dwarfehprepare -S %s | FileCheck %s
-; RUN: opt -mtriple=x86_64-linux-gnu -passes=dwarfehprepare -S %s | FileCheck %s
+; RUN: opt -mtriple=x86_64-linux-gnu -passes=dwarf-eh-prepare -S %s | FileCheck %s
 
 declare i32 @hoge(...)
 

>From 048c7a8b221b1ea33544a8ace1e1258221e71efc Mon Sep 17 00:00:00 2001
From: PaperChalice <29250197+paperchalice at users.noreply.github.com>
Date: Mon, 4 Dec 2023 16:34:30 +0800
Subject: [PATCH 03/11] [Pass] Rename `loweratomic` -> `lower-atomic`

---
 lld/test/ELF/lto/ltopasses-custom.ll            | 2 +-
 llvm/docs/Passes.rst                            | 4 ++--
 llvm/lib/Passes/PassRegistry.def                | 2 +-
 llvm/lib/Transforms/Scalar/LowerAtomicPass.cpp  | 2 +-
 llvm/lib/Transforms/Utils/LowerAtomic.cpp       | 2 +-
 llvm/test/Feature/optnone-opt.ll                | 2 +-
 llvm/test/ThinLTO/X86/cache-config.ll           | 2 +-
 llvm/test/Transforms/LowerAtomic/atomic-load.ll | 2 +-
 llvm/test/Transforms/LowerAtomic/atomic-swap.ll | 2 +-
 llvm/test/Transforms/LowerAtomic/barrier.ll     | 2 +-
 llvm/test/tools/llvm-lto2/X86/pipeline.ll       | 4 ++--
 11 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/lld/test/ELF/lto/ltopasses-custom.ll b/lld/test/ELF/lto/ltopasses-custom.ll
index ecdc3346aecd8..ecb024cecade4 100644
--- a/lld/test/ELF/lto/ltopasses-custom.ll
+++ b/lld/test/ELF/lto/ltopasses-custom.ll
@@ -2,7 +2,7 @@
 ; RUN: llvm-as %s -o %t.o
 ; RUN: ld.lld %t.o -o %t.so -save-temps --lto-aa-pipeline=basic-aa \
 ; RUN: --lto-newpm-passes=ipsccp -shared
-; RUN: ld.lld %t.o -o %t2.so -save-temps --lto-newpm-passes=loweratomic -shared
+; RUN: ld.lld %t.o -o %t2.so -save-temps --lto-newpm-passes=lower-atomic -shared
 ; RUN: llvm-dis %t.so.0.4.opt.bc -o - | FileCheck %s
 ; RUN: llvm-dis %t2.so.0.4.opt.bc -o - | FileCheck %s --check-prefix=ATOMIC
 
diff --git a/llvm/docs/Passes.rst b/llvm/docs/Passes.rst
index 46ca56df8f24c..a13bcc1c84788 100644
--- a/llvm/docs/Passes.rst
+++ b/llvm/docs/Passes.rst
@@ -728,8 +728,8 @@ wrapper functions that are registered as global constructors in
 ``llvm.global_ctors`` and which contain a call to ``__cxa_atexit`` to register
 their destructor functions.
 
-``loweratomic``: Lower atomic intrinsics to non-atomic form
------------------------------------------------------------
+``lower-atomic``: Lower atomic intrinsics to non-atomic form
+------------------------------------------------------------
 
 This pass lowers atomic intrinsics to non-atomic form for use in a known
 non-preemptible environment.
diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index e70bba931f820..b806b5309d42c 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -336,7 +336,7 @@ FUNCTION_PASS("lower-constant-intrinsics", LowerConstantIntrinsicsPass())
 FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
 FUNCTION_PASS("lower-guard-intrinsic", LowerGuardIntrinsicPass())
 FUNCTION_PASS("lower-widenable-condition", LowerWidenableConditionPass())
-FUNCTION_PASS("loweratomic", LowerAtomicPass())
+FUNCTION_PASS("lower-atomic", LowerAtomicPass())
 FUNCTION_PASS("lowerinvoke", LowerInvokePass())
 FUNCTION_PASS("lowerswitch", LowerSwitchPass())
 FUNCTION_PASS("make-guards-explicit", MakeGuardsExplicitPass())
diff --git a/llvm/lib/Transforms/Scalar/LowerAtomicPass.cpp b/llvm/lib/Transforms/Scalar/LowerAtomicPass.cpp
index 6aba913005d05..b42d3b2bc09ad 100644
--- a/llvm/lib/Transforms/Scalar/LowerAtomicPass.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerAtomicPass.cpp
@@ -20,7 +20,7 @@
 #include "llvm/Transforms/Utils/LowerAtomic.h"
 using namespace llvm;
 
-#define DEBUG_TYPE "loweratomic"
+#define DEBUG_TYPE "lower-atomic"
 
 static bool LowerFenceInst(FenceInst *FI) {
   FI->eraseFromParent();
diff --git a/llvm/lib/Transforms/Utils/LowerAtomic.cpp b/llvm/lib/Transforms/Utils/LowerAtomic.cpp
index b203970ef9c5a..dc84b4b7ab1b5 100644
--- a/llvm/lib/Transforms/Utils/LowerAtomic.cpp
+++ b/llvm/lib/Transforms/Utils/LowerAtomic.cpp
@@ -17,7 +17,7 @@
 
 using namespace llvm;
 
-#define DEBUG_TYPE "loweratomic"
+#define DEBUG_TYPE "lower-atomic"
 
 bool llvm::lowerAtomicCmpXchgInst(AtomicCmpXchgInst *CXI) {
   IRBuilder<> Builder(CXI);
diff --git a/llvm/test/Feature/optnone-opt.ll b/llvm/test/Feature/optnone-opt.ll
index fd713dab2995f..83ff946320f53 100644
--- a/llvm/test/Feature/optnone-opt.ll
+++ b/llvm/test/Feature/optnone-opt.ll
@@ -2,7 +2,7 @@
 ; RUN: opt -passes='default<O1>' -S -debug-pass-manager %s 2>&1 | FileCheck %s --check-prefix=NPM-O1
 ; RUN: opt -passes='default<O2>' -S -debug-pass-manager %s 2>&1 | FileCheck %s --check-prefix=NPM-O1 --check-prefix=NPM-O2O3
 ; RUN: opt -passes='default<O3>' -S -debug-pass-manager %s 2>&1 | FileCheck %s --check-prefix=NPM-O1 --check-prefix=NPM-O2O3
-; RUN: opt -passes='dce,gvn-hoist,loweratomic' -S -debug-pass-manager %s 2>&1 | FileCheck %s --check-prefix=NPM-MORE
+; RUN: opt -passes='dce,gvn-hoist,lower-atomic' -S -debug-pass-manager %s 2>&1 | FileCheck %s --check-prefix=NPM-MORE
 ; RUN: opt -passes='loop(indvars,licm,loop-deletion,loop-idiom,loop-instsimplify,loop-reduce,simple-loop-unswitch),loop-unroll' -S -debug-pass-manager %s 2>&1 | FileCheck %s --check-prefix=NPM-LOOP
 ; RUN: opt -passes='instsimplify,verify' -S -debug-pass-manager %s 2>&1 | FileCheck %s --check-prefix=NPM-REQUIRED
 
diff --git a/llvm/test/ThinLTO/X86/cache-config.ll b/llvm/test/ThinLTO/X86/cache-config.ll
index dfdb0aca0beb2..b261ead077b07 100644
--- a/llvm/test/ThinLTO/X86/cache-config.ll
+++ b/llvm/test/ThinLTO/X86/cache-config.ll
@@ -12,7 +12,7 @@
 ; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -code-model=large
 ; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -cg-opt-level=0
 ; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -O1
-; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -opt-pipeline=loweratomic
+; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -opt-pipeline=lower-atomic
 ; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -aa-pipeline=basic-aa
 ; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -override-triple=x86_64-unknown-linux-gnu
 ; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -default-triple=x86_64-unknown-linux-gnu
diff --git a/llvm/test/Transforms/LowerAtomic/atomic-load.ll b/llvm/test/Transforms/LowerAtomic/atomic-load.ll
index be9a8bad4692a..4ab8fbb86cb60 100644
--- a/llvm/test/Transforms/LowerAtomic/atomic-load.ll
+++ b/llvm/test/Transforms/LowerAtomic/atomic-load.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes=loweratomic -S | FileCheck %s
+; RUN: opt < %s -passes=lower-atomic -S | FileCheck %s
 
 define i8 @add() {
 ; CHECK-LABEL: @add(
diff --git a/llvm/test/Transforms/LowerAtomic/atomic-swap.ll b/llvm/test/Transforms/LowerAtomic/atomic-swap.ll
index b253812cd5fbb..00ac8129fd0a0 100644
--- a/llvm/test/Transforms/LowerAtomic/atomic-swap.ll
+++ b/llvm/test/Transforms/LowerAtomic/atomic-swap.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes=loweratomic -S | FileCheck %s
+; RUN: opt < %s -passes=lower-atomic -S | FileCheck %s
 
 define i8 @cmpswap() {
 ; CHECK-LABEL: @cmpswap(
diff --git a/llvm/test/Transforms/LowerAtomic/barrier.ll b/llvm/test/Transforms/LowerAtomic/barrier.ll
index b96928bce9376..71a85d05fefd5 100644
--- a/llvm/test/Transforms/LowerAtomic/barrier.ll
+++ b/llvm/test/Transforms/LowerAtomic/barrier.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes=loweratomic -S | FileCheck %s
+; RUN: opt < %s -passes=lower-atomic -S | FileCheck %s
 
 define void @barrier() {
 ; CHECK-LABEL: @barrier(
diff --git a/llvm/test/tools/llvm-lto2/X86/pipeline.ll b/llvm/test/tools/llvm-lto2/X86/pipeline.ll
index 9896cf4da2a40..93f30d0ee61bc 100644
--- a/llvm/test/tools/llvm-lto2/X86/pipeline.ll
+++ b/llvm/test/tools/llvm-lto2/X86/pipeline.ll
@@ -7,7 +7,7 @@
 
 ; Try a custom pipeline
 ; RUN: llvm-lto2 run %t1.bc -o %t.o -save-temps \
-; RUN:  -r %t1.bc,patatino,px -opt-pipeline loweratomic \
+; RUN:  -r %t1.bc,patatino,px -opt-pipeline lower-atomic \
 ; RUN:  -aa-pipeline basic-aa
 ; RUN: llvm-dis < %t.o.0.4.opt.bc | FileCheck %s --check-prefix=CUSTOM
 
@@ -36,7 +36,7 @@ define void @patatino() {
 
 ; RUN: not --crash llvm-lto2 run %t1.bc -o %t.o \
 ; RUN:  -r %t1.bc,patatino,px -aa-pipeline patatino \
-; RUN:  -opt-pipeline loweratomic 2>&1 | \
+; RUN:  -opt-pipeline lower-atomic 2>&1 | \
 ; RUN:  FileCheck %s --check-prefix=AAERR
 
 ; AAERR: LLVM ERROR: unable to parse AA pipeline description 'patatino': unknown alias analysis name 'patatino'

>From b7149178c6647939e4354ce1986b0ab919b6a753 Mon Sep 17 00:00:00 2001
From: PaperChalice <29250197+paperchalice at users.noreply.github.com>
Date: Mon, 4 Dec 2023 17:30:07 +0800
Subject: [PATCH 04/11] [Pass] Rename `lowerinvoke` -> `lower-invoke`

---
 llvm/docs/Passes.rst                                 | 4 ++--
 llvm/include/llvm/CodeGen/MachinePassRegistry.def    | 2 +-
 llvm/lib/Passes/PassRegistry.def                     | 2 +-
 llvm/lib/Transforms/Utils/LowerInvoke.cpp            | 2 +-
 llvm/test/Transforms/LowerInvoke/2003-12-10-Crash.ll | 2 +-
 llvm/test/Transforms/LowerInvoke/lowerinvoke.ll      | 4 ++--
 llvm/test/Transforms/Util/lowerinvoke-funclet.ll     | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/llvm/docs/Passes.rst b/llvm/docs/Passes.rst
index a13bcc1c84788..531278190c157 100644
--- a/llvm/docs/Passes.rst
+++ b/llvm/docs/Passes.rst
@@ -739,8 +739,8 @@ this would require knowledge of the entire call graph of the program including
 any libraries which may not be available in bitcode form); it simply lowers
 every atomic intrinsic.
 
-``lowerinvoke``: Lower invokes to calls, for unwindless code generators
------------------------------------------------------------------------
+``lower-invoke``: Lower invokes to calls, for unwindless code generators
+------------------------------------------------------------------------
 
 This transformation is designed for use by code generators which do not yet
 support stack unwinding.  This pass converts ``invoke`` instructions to
diff --git a/llvm/include/llvm/CodeGen/MachinePassRegistry.def b/llvm/include/llvm/CodeGen/MachinePassRegistry.def
index 40b84e910fa64..c1de4fd613c07 100644
--- a/llvm/include/llvm/CodeGen/MachinePassRegistry.def
+++ b/llvm/include/llvm/CodeGen/MachinePassRegistry.def
@@ -44,7 +44,7 @@ FUNCTION_PASS("expand-large-fp-convert", ExpandLargeFpConvertPass, ())
 FUNCTION_PASS("expand-reductions", ExpandReductionsPass, ())
 FUNCTION_PASS("expandvp", ExpandVectorPredicationPass, ())
 FUNCTION_PASS("lower-constant-intrinsics", LowerConstantIntrinsicsPass, ())
-FUNCTION_PASS("lowerinvoke", LowerInvokePass, ())
+FUNCTION_PASS("lower-invoke", LowerInvokePass, ())
 FUNCTION_PASS("mergeicmps", MergeICmpsPass, ())
 FUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass, ())
 FUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass, (true))
diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index b806b5309d42c..6a13bd7a88ff5 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -337,7 +337,7 @@ FUNCTION_PASS("lower-expect", LowerExpectIntrinsicPass())
 FUNCTION_PASS("lower-guard-intrinsic", LowerGuardIntrinsicPass())
 FUNCTION_PASS("lower-widenable-condition", LowerWidenableConditionPass())
 FUNCTION_PASS("lower-atomic", LowerAtomicPass())
-FUNCTION_PASS("lowerinvoke", LowerInvokePass())
+FUNCTION_PASS("lower-invoke", LowerInvokePass())
 FUNCTION_PASS("lowerswitch", LowerSwitchPass())
 FUNCTION_PASS("make-guards-explicit", MakeGuardsExplicitPass())
 FUNCTION_PASS("mem2reg", PromotePass())
diff --git a/llvm/lib/Transforms/Utils/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
index 6d788857c1ea2..22ff3c2e5848f 100644
--- a/llvm/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
@@ -22,7 +22,7 @@
 #include "llvm/Transforms/Utils.h"
 using namespace llvm;
 
-#define DEBUG_TYPE "lowerinvoke"
+#define DEBUG_TYPE "lower-invoke"
 
 STATISTIC(NumInvokes, "Number of invokes replaced");
 
diff --git a/llvm/test/Transforms/LowerInvoke/2003-12-10-Crash.ll b/llvm/test/Transforms/LowerInvoke/2003-12-10-Crash.ll
index bb0d2ce2099cd..d28107257e26d 100644
--- a/llvm/test/Transforms/LowerInvoke/2003-12-10-Crash.ll
+++ b/llvm/test/Transforms/LowerInvoke/2003-12-10-Crash.ll
@@ -1,6 +1,6 @@
 ; This testcase was reduced from Shootout-C++/reversefile.cpp by bugpoint
 
-; RUN: opt < %s -passes=lowerinvoke -disable-output
+; RUN: opt < %s -passes=lower-invoke -disable-output
 
 declare void @baz()
 
diff --git a/llvm/test/Transforms/LowerInvoke/lowerinvoke.ll b/llvm/test/Transforms/LowerInvoke/lowerinvoke.ll
index c245c9a995fcb..0ffc27ee40f94 100644
--- a/llvm/test/Transforms/LowerInvoke/lowerinvoke.ll
+++ b/llvm/test/Transforms/LowerInvoke/lowerinvoke.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -passes=lowerinvoke -S | FileCheck %s
-; RUN: opt < %s -passes='lowerinvoke' -S | FileCheck %s
+; RUN: opt < %s -passes=lower-invoke -S | FileCheck %s
+; RUN: opt < %s -passes='lower-invoke' -S | FileCheck %s
 
 declare i32 @external_func(i64 %arg)
 
diff --git a/llvm/test/Transforms/Util/lowerinvoke-funclet.ll b/llvm/test/Transforms/Util/lowerinvoke-funclet.ll
index 0d0f8304b3139..edb78be2c05bb 100644
--- a/llvm/test/Transforms/Util/lowerinvoke-funclet.ll
+++ b/llvm/test/Transforms/Util/lowerinvoke-funclet.ll
@@ -1,4 +1,4 @@
-; RUN: opt -passes=lowerinvoke -S < %s | FileCheck %s
+; RUN: opt -passes=lower-invoke -S < %s | FileCheck %s
 
 ; Test if invoke instructions that have a funclet operand bundle can be lowered.
 

>From bfd0e393a47729664ebe20521600cb7a3a7a3690 Mon Sep 17 00:00:00 2001
From: PaperChalice <29250197+paperchalice at users.noreply.github.com>
Date: Mon, 4 Dec 2023 17:35:28 +0800
Subject: [PATCH 05/11] [Pass] Rename `lowerswitch` -> `lower-switch`

---
 llvm/docs/Passes.rst                                        | 4 ++--
 llvm/lib/Passes/PassRegistry.def                            | 2 +-
 llvm/test/Transforms/FixIrreducible/switch.ll               | 2 +-
 llvm/test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll   | 2 +-
 llvm/test/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll  | 2 +-
 .../LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll          | 2 +-
 .../LowerSwitch/2014-06-10-SwitchContiguousOpt.ll           | 2 +-
 .../LowerSwitch/2014-06-11-SwitchDefaultUnreachableOpt.ll   | 2 +-
 llvm/test/Transforms/LowerSwitch/2014-06-23-PHIlowering.ll  | 2 +-
 .../LowerSwitch/condition-phi-unreachable-default.ll        | 4 ++--
 .../Transforms/LowerSwitch/delete-default-block-crash.ll    | 4 ++--
 .../LowerSwitch/do-not-handle-impossible-values.ll          | 2 +-
 llvm/test/Transforms/LowerSwitch/feature.ll                 | 2 +-
 .../LowerSwitch/fold-popular-case-to-unreachable-default.ll | 2 +-
 llvm/test/Transforms/LowerSwitch/phi-in-dead-block.ll       | 2 +-
 llvm/test/Transforms/LowerSwitch/pr59316.ll                 | 2 +-
 llvm/test/Transforms/StructurizeCFG/switch.ll               | 2 +-
 .../UnifyFunctionExitNodes/unreachable-blocks-status.ll     | 2 +-
 llvm/test/Transforms/UnifyLoopExits/basic.ll                | 2 +-
 llvm/test/Transforms/UnifyLoopExits/nested.ll               | 2 +-
 llvm/test/Transforms/UnifyLoopExits/restore-ssa.ll          | 2 +-
 llvm/test/Transforms/UnifyLoopExits/switch.ll               | 2 +-
 llvm/test/Transforms/Util/lowerswitch.ll                    | 6 +++---
 23 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/llvm/docs/Passes.rst b/llvm/docs/Passes.rst
index 531278190c157..0d0353ed6b611 100644
--- a/llvm/docs/Passes.rst
+++ b/llvm/docs/Passes.rst
@@ -748,8 +748,8 @@ support stack unwinding.  This pass converts ``invoke`` instructions to
 become dead code (which can be removed by running the ``-simplifycfg`` pass
 afterwards).
 
-``lowerswitch``: Lower ``SwitchInst``\ s to branches
-----------------------------------------------------
+``lower-switch``: Lower ``SwitchInst``\ s to branches
+-----------------------------------------------------
 
 Rewrites switch instructions with a sequence of branches, which allows targets
 to get away with not implementing the switch instruction until it is
diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index 6a13bd7a88ff5..17d7a1750af1c 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -338,7 +338,7 @@ FUNCTION_PASS("lower-guard-intrinsic", LowerGuardIntrinsicPass())
 FUNCTION_PASS("lower-widenable-condition", LowerWidenableConditionPass())
 FUNCTION_PASS("lower-atomic", LowerAtomicPass())
 FUNCTION_PASS("lower-invoke", LowerInvokePass())
-FUNCTION_PASS("lowerswitch", LowerSwitchPass())
+FUNCTION_PASS("lower-switch", LowerSwitchPass())
 FUNCTION_PASS("make-guards-explicit", MakeGuardsExplicitPass())
 FUNCTION_PASS("mem2reg", PromotePass())
 FUNCTION_PASS("memcpyopt", MemCpyOptPass())
diff --git a/llvm/test/Transforms/FixIrreducible/switch.ll b/llvm/test/Transforms/FixIrreducible/switch.ll
index 57b92c08ed311..27b9f9bf3b53b 100644
--- a/llvm/test/Transforms/FixIrreducible/switch.ll
+++ b/llvm/test/Transforms/FixIrreducible/switch.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes='lowerswitch,fix-irreducible' -S | FileCheck %s
+; RUN: opt < %s -passes='lower-switch,fix-irreducible' -S | FileCheck %s
 
 define void @loop_1(i32 %Value, i1 %PredEntry, i1 %PredD) {
 ; CHECK-LABEL: @loop_1(
diff --git a/llvm/test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll b/llvm/test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll
index fab8ecafb8908..f149f37a20830 100644
--- a/llvm/test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll
+++ b/llvm/test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes=lowerswitch
+; RUN: opt < %s -passes=lower-switch
 
 define void @child(i32 %ct.1) {
 entry:
diff --git a/llvm/test/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll b/llvm/test/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll
index f5889479c129b..fbf2198e005ee 100644
--- a/llvm/test/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll
+++ b/llvm/test/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes=lowerswitch
+; RUN: opt < %s -passes=lower-switch
 
 define void @test() {
 	switch i32 0, label %Next [
diff --git a/llvm/test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll b/llvm/test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll
index 069a5558eee87..dff375935f319 100644
--- a/llvm/test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll
+++ b/llvm/test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes=lowerswitch -disable-output
+; RUN: opt < %s -passes=lower-switch -disable-output
 
 define void @solve() {
 entry:
diff --git a/llvm/test/Transforms/LowerSwitch/2014-06-10-SwitchContiguousOpt.ll b/llvm/test/Transforms/LowerSwitch/2014-06-10-SwitchContiguousOpt.ll
index 94ebd13e71c23..c8006087a1fde 100644
--- a/llvm/test/Transforms/LowerSwitch/2014-06-10-SwitchContiguousOpt.ll
+++ b/llvm/test/Transforms/LowerSwitch/2014-06-10-SwitchContiguousOpt.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes=lowerswitch -S | FileCheck %s
+; RUN: opt < %s -passes=lower-switch -S | FileCheck %s
 ; CHECK-NOT: icmp eq i32 %0, 1
 
 define i32 @foo(i32 %a) #0 {
diff --git a/llvm/test/Transforms/LowerSwitch/2014-06-11-SwitchDefaultUnreachableOpt.ll b/llvm/test/Transforms/LowerSwitch/2014-06-11-SwitchDefaultUnreachableOpt.ll
index 5380010b1e7b5..118f0ff5c19df 100644
--- a/llvm/test/Transforms/LowerSwitch/2014-06-11-SwitchDefaultUnreachableOpt.ll
+++ b/llvm/test/Transforms/LowerSwitch/2014-06-11-SwitchDefaultUnreachableOpt.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes=lowerswitch -S | FileCheck %s
+; RUN: opt < %s -passes=lower-switch -S | FileCheck %s
 ;
 ; The switch is lowered with a single icmp.
 ; CHECK: icmp
diff --git a/llvm/test/Transforms/LowerSwitch/2014-06-23-PHIlowering.ll b/llvm/test/Transforms/LowerSwitch/2014-06-23-PHIlowering.ll
index 0c583526fc10b..80d9441eebdc7 100644
--- a/llvm/test/Transforms/LowerSwitch/2014-06-23-PHIlowering.ll
+++ b/llvm/test/Transforms/LowerSwitch/2014-06-23-PHIlowering.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes=lowerswitch -S | FileCheck %s
+; RUN: opt < %s -passes=lower-switch -S | FileCheck %s
 
 define i32 @test(i32 %arg) #0 {
 ; CHECK-LABEL: @test
diff --git a/llvm/test/Transforms/LowerSwitch/condition-phi-unreachable-default.ll b/llvm/test/Transforms/LowerSwitch/condition-phi-unreachable-default.ll
index 18f864ecf3e63..09cb5b0918c91 100644
--- a/llvm/test/Transforms/LowerSwitch/condition-phi-unreachable-default.ll
+++ b/llvm/test/Transforms/LowerSwitch/condition-phi-unreachable-default.ll
@@ -1,6 +1,6 @@
-; RUN: opt < %s -passes=lowerswitch -S | FileCheck %s
+; RUN: opt < %s -passes=lower-switch -S | FileCheck %s
 
-; This test verifies -lowerswitch does not crash when an removing an
+; This test verifies -lower-switch does not crash when an removing an
 ; unreachable default branch causes a PHI node used as the switch
 ; condition to be erased.
 
diff --git a/llvm/test/Transforms/LowerSwitch/delete-default-block-crash.ll b/llvm/test/Transforms/LowerSwitch/delete-default-block-crash.ll
index 59b55aafa6941..55f43efcea42a 100644
--- a/llvm/test/Transforms/LowerSwitch/delete-default-block-crash.ll
+++ b/llvm/test/Transforms/LowerSwitch/delete-default-block-crash.ll
@@ -1,6 +1,6 @@
-; RUN: opt < %s -passes=lowerswitch -disable-output
+; RUN: opt < %s -passes=lower-switch -disable-output
 
-; This test verify -lowerswitch does not crash after deleting the default block.
+; This test verify -lower-switch does not crash after deleting the default block.
 
 declare i32 @f(i32)
 
diff --git a/llvm/test/Transforms/LowerSwitch/do-not-handle-impossible-values.ll b/llvm/test/Transforms/LowerSwitch/do-not-handle-impossible-values.ll
index 771d46fd42823..64ef582989066 100644
--- a/llvm/test/Transforms/LowerSwitch/do-not-handle-impossible-values.ll
+++ b/llvm/test/Transforms/LowerSwitch/do-not-handle-impossible-values.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes=lowerswitch -S | FileCheck %s
+; RUN: opt < %s -passes=lower-switch -S | FileCheck %s
 
 ; Check that we do not generate redundant comparisons that would have results
 ; known at compile time due to limited range of the value being switch'ed over.
diff --git a/llvm/test/Transforms/LowerSwitch/feature.ll b/llvm/test/Transforms/LowerSwitch/feature.ll
index 8e39c53181701..5574c4d897e77 100644
--- a/llvm/test/Transforms/LowerSwitch/feature.ll
+++ b/llvm/test/Transforms/LowerSwitch/feature.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes=lowerswitch -S | FileCheck %s
+; RUN: opt < %s -passes=lower-switch -S | FileCheck %s
 
 ; We have switch on input.
 ; On output we should got binary comparison tree. Check that all is fine.
diff --git a/llvm/test/Transforms/LowerSwitch/fold-popular-case-to-unreachable-default.ll b/llvm/test/Transforms/LowerSwitch/fold-popular-case-to-unreachable-default.ll
index 9d7527eea28a3..9d9d93c085178 100644
--- a/llvm/test/Transforms/LowerSwitch/fold-popular-case-to-unreachable-default.ll
+++ b/llvm/test/Transforms/LowerSwitch/fold-popular-case-to-unreachable-default.ll
@@ -1,4 +1,4 @@
-; RUN: opt %s -passes=lowerswitch -S | FileCheck %s
+; RUN: opt %s -passes=lower-switch -S | FileCheck %s
 
 define void @foo(i32 %x, ptr %p) {
 ; Cases 2 and 4 are removed and become the new default case.
diff --git a/llvm/test/Transforms/LowerSwitch/phi-in-dead-block.ll b/llvm/test/Transforms/LowerSwitch/phi-in-dead-block.ll
index ff94ff80ea5b0..952f586293cd5 100644
--- a/llvm/test/Transforms/LowerSwitch/phi-in-dead-block.ll
+++ b/llvm/test/Transforms/LowerSwitch/phi-in-dead-block.ll
@@ -1,4 +1,4 @@
-; RUN: opt -S -passes=lowerswitch %s | FileCheck %s
+; RUN: opt -S -passes=lower-switch %s | FileCheck %s
 
 ; CHECK-LABEL: @phi_in_dead_block(
 ; CHECK-NOT: switch
diff --git a/llvm/test/Transforms/LowerSwitch/pr59316.ll b/llvm/test/Transforms/LowerSwitch/pr59316.ll
index 0616ace672965..002325441031c 100644
--- a/llvm/test/Transforms/LowerSwitch/pr59316.ll
+++ b/llvm/test/Transforms/LowerSwitch/pr59316.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes=lowerswitch -S | FileCheck %s
+; RUN: opt < %s -passes=lower-switch -S | FileCheck %s
 
 define i64 @f(i1 %bool, i128 %i128) {
 ; CHECK-LABEL: @f(
diff --git a/llvm/test/Transforms/StructurizeCFG/switch.ll b/llvm/test/Transforms/StructurizeCFG/switch.ll
index 153b6d1914e67..91818850a3630 100644
--- a/llvm/test/Transforms/StructurizeCFG/switch.ll
+++ b/llvm/test/Transforms/StructurizeCFG/switch.ll
@@ -1,4 +1,4 @@
-; RUN: opt -S -passes='lowerswitch,structurizecfg' %s -o - | FileCheck %s
+; RUN: opt -S -passes='lower-switch,structurizecfg' %s -o - | FileCheck %s
 
 ; The structurizecfg pass cannot handle switch instructions, so we need to
 ; make sure the lower switch pass is always run before structurizecfg.
diff --git a/llvm/test/Transforms/UnifyFunctionExitNodes/unreachable-blocks-status.ll b/llvm/test/Transforms/UnifyFunctionExitNodes/unreachable-blocks-status.ll
index dbbb5ae91a01d..a6832c79dad43 100644
--- a/llvm/test/Transforms/UnifyFunctionExitNodes/unreachable-blocks-status.ll
+++ b/llvm/test/Transforms/UnifyFunctionExitNodes/unreachable-blocks-status.ll
@@ -1,4 +1,4 @@
-; RUN: opt -passes='break-crit-edges,lowerswitch,mergereturn' -S < %s | FileCheck %s
+; RUN: opt -passes='break-crit-edges,lower-switch,mergereturn' -S < %s | FileCheck %s
 
 ; The pass did previously not report the correct Modified status in the case
 ; where a function had at most one return block, and an unified unreachable
diff --git a/llvm/test/Transforms/UnifyLoopExits/basic.ll b/llvm/test/Transforms/UnifyLoopExits/basic.ll
index 942ca6f773fbc..ccd15d4e6b943 100644
--- a/llvm/test/Transforms/UnifyLoopExits/basic.ll
+++ b/llvm/test/Transforms/UnifyLoopExits/basic.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes='lowerswitch,unify-loop-exits' -S | FileCheck %s
+; RUN: opt < %s -passes='lower-switch,unify-loop-exits' -S | FileCheck %s
 
 define void @loop_1(i1 %PredEntry, i1 %PredB, i1 %PredC, i1 %PredD) {
 ; CHECK-LABEL: @loop_1(
diff --git a/llvm/test/Transforms/UnifyLoopExits/nested.ll b/llvm/test/Transforms/UnifyLoopExits/nested.ll
index 9973aa305cdf1..b02e353d18639 100644
--- a/llvm/test/Transforms/UnifyLoopExits/nested.ll
+++ b/llvm/test/Transforms/UnifyLoopExits/nested.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes='lowerswitch,unify-loop-exits' -S | FileCheck %s
+; RUN: opt < %s -passes='lower-switch,unify-loop-exits' -S | FileCheck %s
 
 define void @nested(i1 %PredB3, i1 %PredB4, i1 %PredA4, i1 %PredA3, i32 %X, i32 %Y, i32 %Z) {
 ; CHECK-LABEL: @nested(
diff --git a/llvm/test/Transforms/UnifyLoopExits/restore-ssa.ll b/llvm/test/Transforms/UnifyLoopExits/restore-ssa.ll
index 16db74aba4674..33dbc1be89ec5 100644
--- a/llvm/test/Transforms/UnifyLoopExits/restore-ssa.ll
+++ b/llvm/test/Transforms/UnifyLoopExits/restore-ssa.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes='lowerswitch,unify-loop-exits' -S | FileCheck %s
+; RUN: opt < %s -passes='lower-switch,unify-loop-exits' -S | FileCheck %s
 
 ; Loop consists of A and B:
 ; - A is the header
diff --git a/llvm/test/Transforms/UnifyLoopExits/switch.ll b/llvm/test/Transforms/UnifyLoopExits/switch.ll
index 1fbf758c45f33..887a6f5d08e9b 100644
--- a/llvm/test/Transforms/UnifyLoopExits/switch.ll
+++ b/llvm/test/Transforms/UnifyLoopExits/switch.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -passes='lowerswitch,unify-loop-exits' -S | FileCheck %s
+; RUN: opt < %s -passes='lower-switch,unify-loop-exits' -S | FileCheck %s
 
 define void @loop_1(i32 %Value, i1 %PredEntry, i1 %PredD) {
 ; CHECK-LABEL: @loop_1(
diff --git a/llvm/test/Transforms/Util/lowerswitch.ll b/llvm/test/Transforms/Util/lowerswitch.ll
index 73343fbcb962a..b5fb214cfcadf 100644
--- a/llvm/test/Transforms/Util/lowerswitch.ll
+++ b/llvm/test/Transforms/Util/lowerswitch.ll
@@ -1,4 +1,4 @@
-; RUN: opt -passes=lowerswitch -S < %s | FileCheck %s
+; RUN: opt -passes=lower-switch -S < %s | FileCheck %s
 
 ; Test that we don't crash and have a different basic block for each incoming edge.
 define void @test0(i32 %mode) {
@@ -31,7 +31,7 @@ BB3:
   br label %BB2
 }
 
-; Test switch cases that are merged into a single case during lowerswitch
+; Test switch cases that are merged into a single case during lower-switch
 ; (take 84 and 85 below) - check that the number of incoming phi values match
 ; the number of branches.
 define void @test1(i32 %mode) {
@@ -198,7 +198,7 @@ define void @test2(i32 %mode, i1 %c1, i1 %c2, i1 %c3, i1 %c4, i1 %c5, i1 %c6) {
 }
 
 ; Test that the PHI node in for.cond should have one entry for each predecessor
-; of its parent basic block after lowerswitch merged several cases into a new
+; of its parent basic block after lower-switch merged several cases into a new
 ; default block.
 define void @test3(i32 %mode, i1 %c1, i1 %c2) {
 ; CHECK-LABEL: @test3

>From b4b0a7ede9bb0bff70881d752549553b7be01312 Mon Sep 17 00:00:00 2001
From: PaperChalice <29250197+paperchalice at users.noreply.github.com>
Date: Mon, 4 Dec 2023 17:38:23 +0800
Subject: [PATCH 06/11] [Pass] Rename `flattencfg` -> `flatten-cfg`

---
 llvm/lib/Passes/PassRegistry.def              | 2 +-
 llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp | 2 +-
 llvm/lib/Transforms/Utils/FlattenCFG.cpp      | 2 +-
 llvm/test/Transforms/Util/flattencfg.ll       | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index 17d7a1750af1c..7d5a5bb732d12 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -305,7 +305,7 @@ FUNCTION_PASS("dwarf-eh-prepare", DwarfEHPreparePass(TM))
 FUNCTION_PASS("expand-large-div-rem", ExpandLargeDivRemPass(TM))
 FUNCTION_PASS("expand-large-fp-convert", ExpandLargeFpConvertPass(TM))
 FUNCTION_PASS("fix-irreducible", FixIrreduciblePass())
-FUNCTION_PASS("flattencfg", FlattenCFGPass())
+FUNCTION_PASS("flatten-cfg", FlattenCFGPass())
 FUNCTION_PASS("float2int", Float2IntPass())
 FUNCTION_PASS("guard-widening", GuardWideningPass())
 FUNCTION_PASS("gvn-hoist", GVNHoistPass())
diff --git a/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp b/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp
index ad2041cd4253f..213d0f389c2e4 100644
--- a/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp
+++ b/llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp
@@ -21,7 +21,7 @@
 
 using namespace llvm;
 
-#define DEBUG_TYPE "flattencfg"
+#define DEBUG_TYPE "flatten-cfg"
 
 namespace {
 struct FlattenCFGLegacyPass : public FunctionPass {
diff --git a/llvm/lib/Transforms/Utils/FlattenCFG.cpp b/llvm/lib/Transforms/Utils/FlattenCFG.cpp
index 1925b91c4da7e..db6ee39baece7 100644
--- a/llvm/lib/Transforms/Utils/FlattenCFG.cpp
+++ b/llvm/lib/Transforms/Utils/FlattenCFG.cpp
@@ -28,7 +28,7 @@
 
 using namespace llvm;
 
-#define DEBUG_TYPE "flattencfg"
+#define DEBUG_TYPE "flatten-cfg"
 
 namespace {
 
diff --git a/llvm/test/Transforms/Util/flattencfg.ll b/llvm/test/Transforms/Util/flattencfg.ll
index 4a4d4279f360d..d6e34bda1cc60 100644
--- a/llvm/test/Transforms/Util/flattencfg.ll
+++ b/llvm/test/Transforms/Util/flattencfg.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
-; RUN: opt -passes=flattencfg -S < %s | FileCheck %s
+; RUN: opt -passes=flatten-cfg -S < %s | FileCheck %s
 
 
 ; This test checks whether the pass completes without a crash.

>From 2388bab7cb54437b7615dbca64c63364f26ed406 Mon Sep 17 00:00:00 2001
From: PaperChalice <29250197+paperchalice at users.noreply.github.com>
Date: Mon, 4 Dec 2023 17:46:36 +0800
Subject: [PATCH 07/11] [Pass] Rename `instcount` -> `inst-count`

---
 llvm/docs/Passes.rst             | 4 ++--
 llvm/lib/Analysis/InstCount.cpp  | 2 +-
 llvm/lib/Passes/PassRegistry.def | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/llvm/docs/Passes.rst b/llvm/docs/Passes.rst
index 0d0353ed6b611..2c996741c0561 100644
--- a/llvm/docs/Passes.rst
+++ b/llvm/docs/Passes.rst
@@ -134,8 +134,8 @@ do not have their address taken, and keeps track of whether functions read or
 write memory (are "pure").  For this simple (but very common) case, we can
 provide pretty accurate and useful information.
 
-``instcount``: Counts the various types of ``Instruction``\ s
--------------------------------------------------------------
+``inst-count``: Counts the various types of ``Instruction``\ s
+--------------------------------------------------------------
 
 This pass collects the count of all instructions and reports them.
 
diff --git a/llvm/lib/Analysis/InstCount.cpp b/llvm/lib/Analysis/InstCount.cpp
index d427d3eeaa9e1..761a01ed2205b 100644
--- a/llvm/lib/Analysis/InstCount.cpp
+++ b/llvm/lib/Analysis/InstCount.cpp
@@ -20,7 +20,7 @@
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 
-#define DEBUG_TYPE "instcount"
+#define DEBUG_TYPE "inst-count"
 
 STATISTIC(TotalInsts, "Number of instructions (of all types)");
 STATISTIC(TotalBlocks, "Number of basic blocks");
diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index 7d5a5bb732d12..48f2d262d8cdb 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -314,7 +314,7 @@ FUNCTION_PASS("helloworld", HelloWorldPass())
 FUNCTION_PASS("infer-address-spaces", InferAddressSpacesPass())
 FUNCTION_PASS("infer-alignment", InferAlignmentPass())
 FUNCTION_PASS("inject-tli-mappings", InjectTLIMappings())
-FUNCTION_PASS("instcount", InstCountPass())
+FUNCTION_PASS("inst-count", InstCountPass())
 FUNCTION_PASS("instnamer", InstructionNamerPass())
 FUNCTION_PASS("instsimplify", InstSimplifyPass())
 FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())

>From 4301826507a8c75b851daf682ca701891360a573 Mon Sep 17 00:00:00 2001
From: PaperChalice <29250197+paperchalice at users.noreply.github.com>
Date: Mon, 4 Dec 2023 17:50:14 +0800
Subject: [PATCH 08/11] [Pass] Rename `instnamer` -> `inst-namer`

---
 llvm/docs/Bugpoint.rst                              | 2 +-
 llvm/docs/Passes.rst                                | 4 ++--
 llvm/docs/TestingGuide.rst                          | 2 +-
 llvm/lib/CodeGen/MIRVRegNamerUtils.h                | 2 +-
 llvm/lib/Passes/PassRegistry.def                    | 2 +-
 llvm/test/CodeGen/AMDGPU/extra-sroa-after-unroll.ll | 6 +++---
 llvm/test/Transforms/InstNamer/basic.ll             | 2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/llvm/docs/Bugpoint.rst b/llvm/docs/Bugpoint.rst
index ab6bf7004c287..9de0d57e9c0ef 100644
--- a/llvm/docs/Bugpoint.rst
+++ b/llvm/docs/Bugpoint.rst
@@ -159,7 +159,7 @@ non-obvious ways.  Here are some hints and tips:
 
 * ``bugpoint`` can produce IR which contains long names. Run ``opt
   -passes=metarenamer`` over the IR to rename everything using easy-to-read,
-  metasyntactic names. Alternatively, run ``opt -passes=strip,instnamer`` to
+  metasyntactic names. Alternatively, run ``opt -passes=strip,inst-namer`` to
   rename everything with very short (often purely numeric) names.
 
 What to do when bugpoint isn't enough
diff --git a/llvm/docs/Passes.rst b/llvm/docs/Passes.rst
index 2c996741c0561..1ddc9a251aefd 100644
--- a/llvm/docs/Passes.rst
+++ b/llvm/docs/Passes.rst
@@ -1014,8 +1014,8 @@ external.  This is only for use by :doc:`bugpoint <Bugpoint>`.
 This pass is used by bugpoint to extract all blocks from the module into their
 own functions.
 
-``instnamer``: Assign names to anonymous instructions
------------------------------------------------------
+``inst-namer``: Assign names to anonymous instructions
+------------------------------------------------------
 
 This is a little utility pass that gives instructions names, this is mostly
 useful when diffing the effect of an optimization because deleting an unnamed
diff --git a/llvm/docs/TestingGuide.rst b/llvm/docs/TestingGuide.rst
index a692e301fa2c4..d583af55c9fc1 100644
--- a/llvm/docs/TestingGuide.rst
+++ b/llvm/docs/TestingGuide.rst
@@ -356,7 +356,7 @@ Best practices for regression tests
   prefer ``opt -S -passes=instcombine`` over ``opt -S -O3``.
 - Avoid unnamed instructions/blocks (such as ``%0`` or ``1:``), because they may
   require renumbering on future test modifications. These can be removed by
-  running the test through ``opt -S -passes=instnamer``.
+  running the test through ``opt -S -passes=inst-namer``.
 - Try to give values (including variables, blocks and functions) meaningful
   names, and avoid retaining complex names generated by the optimization
   pipeline (such as ``%foo.0.0.0.0.0.0``).
diff --git a/llvm/lib/CodeGen/MIRVRegNamerUtils.h b/llvm/lib/CodeGen/MIRVRegNamerUtils.h
index a059bc5333c65..6b7a20f26444e 100644
--- a/llvm/lib/CodeGen/MIRVRegNamerUtils.h
+++ b/llvm/lib/CodeGen/MIRVRegNamerUtils.h
@@ -10,7 +10,7 @@
 // The purpose of these utilities is to abstract out parts of the MIRCanon pass
 // that are responsible for renaming virtual registers with the purpose of
 // sharing code with a MIRVRegNamer pass that could be the analog of the
-// opt -instnamer pass.
+// opt -passes=inst-namer pass.
 //
 //===----------------------------------------------------------------------===//
 
diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index 48f2d262d8cdb..1ff0493f1d3cd 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -315,7 +315,7 @@ FUNCTION_PASS("infer-address-spaces", InferAddressSpacesPass())
 FUNCTION_PASS("infer-alignment", InferAlignmentPass())
 FUNCTION_PASS("inject-tli-mappings", InjectTLIMappings())
 FUNCTION_PASS("inst-count", InstCountPass())
-FUNCTION_PASS("instnamer", InstructionNamerPass())
+FUNCTION_PASS("inst-namer", InstructionNamerPass())
 FUNCTION_PASS("instsimplify", InstSimplifyPass())
 FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass())
 FUNCTION_PASS("irce", IRCEPass())
diff --git a/llvm/test/CodeGen/AMDGPU/extra-sroa-after-unroll.ll b/llvm/test/CodeGen/AMDGPU/extra-sroa-after-unroll.ll
index efdfd86107d29..4ff95c2937d1e 100644
--- a/llvm/test/CodeGen/AMDGPU/extra-sroa-after-unroll.ll
+++ b/llvm/test/CodeGen/AMDGPU/extra-sroa-after-unroll.ll
@@ -1,6 +1,6 @@
-; RUN: opt -passes='default<O1>,instnamer' -mtriple=amdgcn-- -S -o - %s | FileCheck -check-prefixes=GCN,O1 %s
-; RUN: opt -passes='default<O2>,instnamer' -mtriple=amdgcn-- -S -o - %s | FileCheck -check-prefixes=GCN,O2 %s
-; RUN: opt -passes='default<O3>,instnamer' -mtriple=amdgcn-- -S -o - %s | FileCheck -check-prefixes=GCN,O3 %s
+; RUN: opt -passes='default<O1>,inst-namer' -mtriple=amdgcn-- -S -o - %s | FileCheck -check-prefixes=GCN,O1 %s
+; RUN: opt -passes='default<O2>,inst-namer' -mtriple=amdgcn-- -S -o - %s | FileCheck -check-prefixes=GCN,O2 %s
+; RUN: opt -passes='default<O3>,inst-namer' -mtriple=amdgcn-- -S -o - %s | FileCheck -check-prefixes=GCN,O3 %s
 target datalayout = "A5"
 
 ; GCN-LABEL: t0
diff --git a/llvm/test/Transforms/InstNamer/basic.ll b/llvm/test/Transforms/InstNamer/basic.ll
index 3d35dd8486770..1122589772f55 100644
--- a/llvm/test/Transforms/InstNamer/basic.ll
+++ b/llvm/test/Transforms/InstNamer/basic.ll
@@ -1,4 +1,4 @@
-; RUN: opt -S -passes=instnamer < %s | FileCheck %s
+; RUN: opt -S -passes=inst-namer < %s | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"

>From 7686f74ef1d54873d992601e784d738af9d7727b Mon Sep 17 00:00:00 2001
From: PaperChalice <29250197+paperchalice at users.noreply.github.com>
Date: Mon, 4 Dec 2023 17:57:46 +0800
Subject: [PATCH 09/11] [Pass] Rename `postdomtree` -> `post-domtree` The
 legacy pass could be removed.

---
 llvm/docs/Passes.rst                                      | 4 ++--
 llvm/lib/Analysis/PostDominators.cpp                      | 2 +-
 llvm/lib/Passes/PassRegistry.def                          | 4 ++--
 llvm/lib/Transforms/Scalar/ADCE.cpp                       | 2 +-
 llvm/test/Analysis/PostDominators/infinite-loop.ll        | 2 +-
 llvm/test/Analysis/PostDominators/infinite-loop2.ll       | 2 +-
 llvm/test/Analysis/PostDominators/infinite-loop3.ll       | 2 +-
 llvm/test/Analysis/PostDominators/pr1098.ll               | 2 +-
 llvm/test/Analysis/PostDominators/pr24415.ll              | 2 +-
 llvm/test/Analysis/PostDominators/pr6047_a.ll             | 2 +-
 llvm/test/Analysis/PostDominators/pr6047_b.ll             | 2 +-
 llvm/test/Analysis/PostDominators/pr6047_c.ll             | 2 +-
 llvm/test/Analysis/PostDominators/pr6047_d.ll             | 2 +-
 llvm/test/Transforms/InstCombine/infinite-loop-postdom.ll | 2 +-
 llvm/test/Transforms/LICM/pr37323.ll                      | 2 +-
 llvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll     | 4 ++--
 llvm/test/Transforms/SCCP/ipsccp-preserve-pdt.ll          | 4 ++--
 17 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/llvm/docs/Passes.rst b/llvm/docs/Passes.rst
index 1ddc9a251aefd..91ceea16c71db 100644
--- a/llvm/docs/Passes.rst
+++ b/llvm/docs/Passes.rst
@@ -202,8 +202,8 @@ This pass decodes the debug info metadata in a module and prints in a
 For example, run this pass from ``opt`` along with the ``-analyze`` option, and
 it'll print to standard output.
 
-``postdomtree``: Post-Dominator Tree Construction
--------------------------------------------------
+``post-domtree``: Post-Dominator Tree Construction
+--------------------------------------------------
 
 This pass is a simple post-dominator construction algorithm for finding
 post-dominators.
diff --git a/llvm/lib/Analysis/PostDominators.cpp b/llvm/lib/Analysis/PostDominators.cpp
index f01d51504d7cd..749ba0c5630a8 100644
--- a/llvm/lib/Analysis/PostDominators.cpp
+++ b/llvm/lib/Analysis/PostDominators.cpp
@@ -20,7 +20,7 @@
 
 using namespace llvm;
 
-#define DEBUG_TYPE "postdomtree"
+#define DEBUG_TYPE "post-domtree"
 
 #ifdef EXPENSIVE_CHECKS
 static constexpr bool ExpensiveChecksEnabled = true;
diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index 1ff0493f1d3cd..668ec7bfc42a6 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -242,7 +242,7 @@ FUNCTION_ANALYSIS("no-op-function", NoOpFunctionAnalysis())
 FUNCTION_ANALYSIS("opt-remark-emit", OptimizationRemarkEmitterAnalysis())
 FUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
 FUNCTION_ANALYSIS("phi-values", PhiValuesAnalysis())
-FUNCTION_ANALYSIS("postdomtree", PostDominatorTreeAnalysis())
+FUNCTION_ANALYSIS("post-domtree", PostDominatorTreeAnalysis())
 FUNCTION_ANALYSIS("regions", RegionInfoAnalysis())
 FUNCTION_ANALYSIS("scalar-evolution", ScalarEvolutionAnalysis())
 FUNCTION_ANALYSIS("should-not-run-function-passes",
@@ -382,7 +382,7 @@ FUNCTION_PASS("print<lazy-value-info>", LazyValueInfoPrinterPass(dbgs()))
 FUNCTION_PASS("print<loops>", LoopPrinterPass(dbgs()))
 FUNCTION_PASS("print<memoryssa-walker>", MemorySSAWalkerPrinterPass(dbgs()))
 FUNCTION_PASS("print<phi-values>", PhiValuesPrinterPass(dbgs()))
-FUNCTION_PASS("print<postdomtree>", PostDominatorTreePrinterPass(dbgs()))
+FUNCTION_PASS("print<post-domtree>", PostDominatorTreePrinterPass(dbgs()))
 FUNCTION_PASS("print<regions>", RegionInfoPrinterPass(dbgs()))
 FUNCTION_PASS("print<scalar-evolution>", ScalarEvolutionPrinterPass(dbgs()))
 FUNCTION_PASS("print<stack-safety-local>", StackSafetyPrinterPass(dbgs()))
diff --git a/llvm/lib/Transforms/Scalar/ADCE.cpp b/llvm/lib/Transforms/Scalar/ADCE.cpp
index 9af275a9f4e20..c5a78d198d51a 100644
--- a/llvm/lib/Transforms/Scalar/ADCE.cpp
+++ b/llvm/lib/Transforms/Scalar/ADCE.cpp
@@ -298,7 +298,7 @@ void AggressiveDeadCodeElimination::initialize() {
 
   // Mark blocks live if there is no path from the block to a
   // return of the function.
-  // We do this by seeing which of the postdomtree root children exit the
+  // We do this by seeing which of the post-domtree root children exit the
   // program, and for all others, mark the subtree live.
   for (const auto &PDTChild : children<DomTreeNode *>(PDT.getRootNode())) {
     auto *BB = PDTChild->getBlock();
diff --git a/llvm/test/Analysis/PostDominators/infinite-loop.ll b/llvm/test/Analysis/PostDominators/infinite-loop.ll
index 7a52ba9ebe851..c7f00474cb72e 100644
--- a/llvm/test/Analysis/PostDominators/infinite-loop.ll
+++ b/llvm/test/Analysis/PostDominators/infinite-loop.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='print<post-domtree>' 2>&1 | FileCheck %s
 
 @a = external global i32, align 4
 
diff --git a/llvm/test/Analysis/PostDominators/infinite-loop2.ll b/llvm/test/Analysis/PostDominators/infinite-loop2.ll
index fb1de1e23e78a..291252bab3ebe 100644
--- a/llvm/test/Analysis/PostDominators/infinite-loop2.ll
+++ b/llvm/test/Analysis/PostDominators/infinite-loop2.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='print<post-domtree>' 2>&1 | FileCheck %s
 
 @a = external global i32, align 4
 
diff --git a/llvm/test/Analysis/PostDominators/infinite-loop3.ll b/llvm/test/Analysis/PostDominators/infinite-loop3.ll
index e0f90541ae65c..a656516f1088a 100644
--- a/llvm/test/Analysis/PostDominators/infinite-loop3.ll
+++ b/llvm/test/Analysis/PostDominators/infinite-loop3.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='print<post-domtree>' 2>&1 | FileCheck %s
 
 @a = external global i32, align 4
 
diff --git a/llvm/test/Analysis/PostDominators/pr1098.ll b/llvm/test/Analysis/PostDominators/pr1098.ll
index 5ae5b1bb648ec..0d16e3a1fb7c5 100644
--- a/llvm/test/Analysis/PostDominators/pr1098.ll
+++ b/llvm/test/Analysis/PostDominators/pr1098.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='print<post-domtree>' 2>&1 | FileCheck %s
 ; PR932
 
 define void @foo(i1 %x) {
diff --git a/llvm/test/Analysis/PostDominators/pr24415.ll b/llvm/test/Analysis/PostDominators/pr24415.ll
index 5a0151ae079a5..32c9cf0566d69 100644
--- a/llvm/test/Analysis/PostDominators/pr24415.ll
+++ b/llvm/test/Analysis/PostDominators/pr24415.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='print<post-domtree>' 2>&1 | FileCheck %s
 
 ; Function Attrs: nounwind ssp uwtable
 define void @foo() {
diff --git a/llvm/test/Analysis/PostDominators/pr6047_a.ll b/llvm/test/Analysis/PostDominators/pr6047_a.ll
index d72934ea35b89..517d2588f234c 100644
--- a/llvm/test/Analysis/PostDominators/pr6047_a.ll
+++ b/llvm/test/Analysis/PostDominators/pr6047_a.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='print<post-domtree>' 2>&1 | FileCheck %s
 define internal void @f() {
 entry:
   br i1 undef, label %bb35, label %bb3.i
diff --git a/llvm/test/Analysis/PostDominators/pr6047_b.ll b/llvm/test/Analysis/PostDominators/pr6047_b.ll
index 4cd756a14857b..fea7e032d6453 100644
--- a/llvm/test/Analysis/PostDominators/pr6047_b.ll
+++ b/llvm/test/Analysis/PostDominators/pr6047_b.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='print<post-domtree>' 2>&1 | FileCheck %s
 define internal void @f() {
 entry:
   br i1 undef, label %a, label %bb3.i
diff --git a/llvm/test/Analysis/PostDominators/pr6047_c.ll b/llvm/test/Analysis/PostDominators/pr6047_c.ll
index b95ae6b1d7128..22513a6fdb707 100644
--- a/llvm/test/Analysis/PostDominators/pr6047_c.ll
+++ b/llvm/test/Analysis/PostDominators/pr6047_c.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='print<post-domtree>' 2>&1 | FileCheck %s
 define internal void @f() {
 entry:
   br i1 undef, label %bb35, label %bb3.i
diff --git a/llvm/test/Analysis/PostDominators/pr6047_d.ll b/llvm/test/Analysis/PostDominators/pr6047_d.ll
index 50bd15e67ddca..76a379f01a39f 100644
--- a/llvm/test/Analysis/PostDominators/pr6047_d.ll
+++ b/llvm/test/Analysis/PostDominators/pr6047_d.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck %s
+; RUN: opt < %s -passes='print<post-domtree>' 2>&1 | FileCheck %s
 define internal void @f() {
 entry:
   br i1 1, label %a, label %b
diff --git a/llvm/test/Transforms/InstCombine/infinite-loop-postdom.ll b/llvm/test/Transforms/InstCombine/infinite-loop-postdom.ll
index 95f9bb59a596b..4edb18a0e5d70 100644
--- a/llvm/test/Transforms/InstCombine/infinite-loop-postdom.ll
+++ b/llvm/test/Transforms/InstCombine/infinite-loop-postdom.ll
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -disable-output -passes=instcombine -verify-dom-info
-; RUN: opt < %s -passes='print<postdomtree>' 2>&1 | FileCheck --check-prefixes=CHECK-POSTDOM %s
+; RUN: opt < %s -passes='print<post-domtree>' 2>&1 | FileCheck --check-prefixes=CHECK-POSTDOM %s
 
 ; Demonstrate that Predicate Canonicalization (InstCombine) does not invalidate PostDomTree
 ; if the basic block is post-dom unreachable.
diff --git a/llvm/test/Transforms/LICM/pr37323.ll b/llvm/test/Transforms/LICM/pr37323.ll
index 7e50a52b50d41..d1a74c35bd8a6 100644
--- a/llvm/test/Transforms/LICM/pr37323.ll
+++ b/llvm/test/Transforms/LICM/pr37323.ll
@@ -1,4 +1,4 @@
-;RUN: opt -verify-dom-info -passes='loop-simplify,require<postdomtree>,require<opt-remark-emit>,loop-mssa(licm),function(adce)' -S -o - %s | FileCheck %s
+;RUN: opt -verify-dom-info -passes='loop-simplify,require<post-domtree>,require<opt-remark-emit>,loop-mssa(licm),function(adce)' -S -o - %s | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
 
diff --git a/llvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll b/llvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll
index 9ceb8c5606cb1..328283e3a99d1 100644
--- a/llvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll
+++ b/llvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll
@@ -3,10 +3,10 @@
 ; IPSCCP can simplify, so we can test the case where IPSCCP makes changes.
 
 ; RUN: opt -disable-verify -debug-pass-manager \
-; RUN: -passes='function(require<domtree>,require<postdomtree>),ipsccp,function(require<domtree>,require<postdomtree>)' -S  %s 2>&1 \
+; RUN: -passes='function(require<domtree>,require<post-domtree>),ipsccp,function(require<domtree>,require<post-domtree>)' -S  %s 2>&1 \
 ; RUN:     | FileCheck -check-prefixes='IR,NEW-PM' %s
 
-; RUN: opt -passes='function(require<postdomtree>),ipsccp,function(verify<domtree>)' -S  %s | FileCheck -check-prefixes='IR' %s
+; RUN: opt -passes='function(require<post-domtree>),ipsccp,function(verify<domtree>)' -S  %s | FileCheck -check-prefixes='IR' %s
 
 ; NEW-PM: Running analysis: DominatorTreeAnalysis on f1
 ; NEW-PM: Running analysis: PostDominatorTreeAnalysis on f1
diff --git a/llvm/test/Transforms/SCCP/ipsccp-preserve-pdt.ll b/llvm/test/Transforms/SCCP/ipsccp-preserve-pdt.ll
index d605611ee0de6..a660529f1fefe 100644
--- a/llvm/test/Transforms/SCCP/ipsccp-preserve-pdt.ll
+++ b/llvm/test/Transforms/SCCP/ipsccp-preserve-pdt.ll
@@ -1,8 +1,8 @@
-; RUN: opt -passes="ipsccp<func-spec>,print<postdomtree>" -force-specialization -funcspec-max-iters=2 -funcspec-max-clones=1 -funcspec-for-literal-constant=true -S < %s 2>&1 | FileCheck %s
+; RUN: opt -passes="ipsccp<func-spec>,print<post-domtree>" -force-specialization -funcspec-max-iters=2 -funcspec-max-clones=1 -funcspec-for-literal-constant=true -S < %s 2>&1 | FileCheck %s
 
 ; REQUIRES: asserts
 
-; This test case is trying to validate that the postdomtree is preserved
+; This test case is trying to validate that the post-domtree is preserved
 ; correctly by the ipsccp pass. A tricky bug was introduced in commit
 ; 1b1232047e83b69561 when PDT would be feched using getCachedAnalysis in order
 ; to setup a DomTreeUpdater (to update the PDT during transformation in order

>From 86444642776c7c186ebe0055b18c2ac99ced7ee6 Mon Sep 17 00:00:00 2001
From: PaperChalice <29250197+paperchalice at users.noreply.github.com>
Date: Mon, 4 Dec 2023 17:59:47 +0800
Subject: [PATCH 10/11] [Pass] Rename `targetir` -> `target-ir`

---
 llvm/include/llvm/CodeGen/MachinePassRegistry.def          | 2 +-
 llvm/lib/Passes/PassRegistry.def                           | 2 +-
 llvm/test/Other/new-pass-manager.ll                        | 2 +-
 llvm/test/Transforms/IndVarSimplify/X86/iv-widen.ll        | 2 +-
 llvm/test/Transforms/IndVarSimplify/backedge-on-min-max.ll | 2 +-
 llvm/test/Transforms/IndVarSimplify/sharpen-range.ll       | 2 +-
 llvm/test/Transforms/LICM/argmemonly-call.ll               | 2 +-
 llvm/test/Transforms/LICM/assume.ll                        | 2 +-
 llvm/test/Transforms/LICM/basictest.ll                     | 2 +-
 llvm/test/Transforms/LICM/call-hoisting.ll                 | 2 +-
 llvm/test/Transforms/LICM/crash.ll                         | 2 +-
 llvm/test/Transforms/LICM/dbg-value-sink.ll                | 4 ++--
 llvm/test/Transforms/LICM/debug-value.ll                   | 2 +-
 llvm/test/Transforms/LICM/extra-copies.ll                  | 2 +-
 llvm/test/Transforms/LICM/fence.ll                         | 2 +-
 llvm/test/Transforms/LICM/funclet.ll                       | 2 +-
 llvm/test/Transforms/LICM/guards.ll                        | 2 +-
 llvm/test/Transforms/LICM/hoist-round.ll                   | 2 +-
 llvm/test/Transforms/LICM/invariant.start.ll               | 2 +-
 llvm/test/Transforms/LICM/lcssa-ssa-promoter.ll            | 2 +-
 llvm/test/Transforms/LICM/no-preheader-test.ll             | 2 +-
 llvm/test/Transforms/LICM/opt-remarks-conditional-load.ll  | 2 +-
 llvm/test/Transforms/LICM/opt-remarks-intervening-store.ll | 2 +-
 llvm/test/Transforms/LICM/opt-remarks.ll                   | 2 +-
 llvm/test/Transforms/LICM/preheader-safe.ll                | 2 +-
 llvm/test/Transforms/LICM/promote-order.ll                 | 2 +-
 llvm/test/Transforms/LICM/read-only-calls.ll               | 2 +-
 llvm/test/Transforms/LICM/scalar-promote-memmodel.ll       | 2 +-
 llvm/test/Transforms/LICM/scalar-promote-unwind.ll         | 2 +-
 llvm/test/Transforms/LICM/scalar-promote.ll                | 2 +-
 llvm/test/Transforms/LICM/speculate.ll                     | 2 +-
 llvm/test/Transforms/LICM/store-hoisting.ll                | 2 +-
 llvm/test/Transforms/LICM/volatile-alias.ll                | 2 +-
 llvm/test/Transforms/LoopIdiom/nontemporal_store.ll        | 2 +-
 llvm/test/Transforms/LoopRotate/RISCV/invalid-cost.ll      | 2 +-
 llvm/test/Transforms/LoopRotate/basic.ll                   | 4 ++--
 llvm/test/Transforms/LoopRotate/call-prepare-for-lto.ll    | 4 ++--
 llvm/test/Transforms/LoopRotate/noalias.ll                 | 4 ++--
 llvm/test/Transforms/LoopStrengthReduce/ivchain.ll         | 2 +-
 39 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/llvm/include/llvm/CodeGen/MachinePassRegistry.def b/llvm/include/llvm/CodeGen/MachinePassRegistry.def
index c1de4fd613c07..e1da51c5ab839 100644
--- a/llvm/include/llvm/CodeGen/MachinePassRegistry.def
+++ b/llvm/include/llvm/CodeGen/MachinePassRegistry.def
@@ -29,7 +29,7 @@ MODULE_PASS("pre-isel-intrinsic-lowering", PreISelIntrinsicLoweringPass, ())
 #define FUNCTION_ANALYSIS(NAME, PASS_NAME, CONSTRUCTOR)
 #endif
 FUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis, (PIC))
-FUNCTION_ANALYSIS("targetir", TargetIRAnalysis,
+FUNCTION_ANALYSIS("target-ir", TargetIRAnalysis,
                   (std::move(TM.getTargetIRAnalysis())))
 #undef FUNCTION_ANALYSIS
 
diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index 668ec7bfc42a6..f6b19036c18b8 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -250,7 +250,7 @@ FUNCTION_ANALYSIS("should-not-run-function-passes",
 FUNCTION_ANALYSIS("should-run-extra-vector-passes",
                   ShouldRunExtraVectorPasses())
 FUNCTION_ANALYSIS("stack-safety-local", StackSafetyAnalysis())
-FUNCTION_ANALYSIS("targetir",
+FUNCTION_ANALYSIS("target-ir",
                   TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
 FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
 FUNCTION_ANALYSIS("uniformity", UniformityInfoAnalysis())
diff --git a/llvm/test/Other/new-pass-manager.ll b/llvm/test/Other/new-pass-manager.ll
index 627b8b9a397eb..863f2e76e8304 100644
--- a/llvm/test/Other/new-pass-manager.ll
+++ b/llvm/test/Other/new-pass-manager.ll
@@ -211,7 +211,7 @@
 ; CHECK-TLI-NOT: Running analysis: TargetLibraryAnalysis
 
 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s 2>&1 \
-; RUN:     -passes='require<targetir>,invalidate<all>,require<targetir>' \
+; RUN:     -passes='require<target-ir>,invalidate<all>,require<target-ir>' \
 ; RUN:     | FileCheck %s --check-prefix=CHECK-TIRA
 ; CHECK-TIRA: Running pass: RequireAnalysisPass
 ; CHECK-TIRA: Running analysis: TargetIRAnalysis
diff --git a/llvm/test/Transforms/IndVarSimplify/X86/iv-widen.ll b/llvm/test/Transforms/IndVarSimplify/X86/iv-widen.ll
index 9eebb712b8937..d05755bea0ddd 100644
--- a/llvm/test/Transforms/IndVarSimplify/X86/iv-widen.ll
+++ b/llvm/test/Transforms/IndVarSimplify/X86/iv-widen.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -passes=indvars -S | FileCheck %s
-; RUN: opt < %s -S -passes='lcssa,loop-simplify,require<targetir>,require<scalar-evolution>,require<domtree>,loop(indvars)' | FileCheck %s
+; RUN: opt < %s -S -passes='lcssa,loop-simplify,require<target-ir>,require<scalar-evolution>,require<domtree>,loop(indvars)' | FileCheck %s
 
 ; Provide legal integer types.
 target datalayout = "n8:16:32:64"
diff --git a/llvm/test/Transforms/IndVarSimplify/backedge-on-min-max.ll b/llvm/test/Transforms/IndVarSimplify/backedge-on-min-max.ll
index 4b52f1c984b2f..1b4996e0edc87 100644
--- a/llvm/test/Transforms/IndVarSimplify/backedge-on-min-max.ll
+++ b/llvm/test/Transforms/IndVarSimplify/backedge-on-min-max.ll
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -passes=indvars -S | FileCheck %s
-; RUN: opt -passes=lcssa,loop-simplify -S < %s | opt -S -passes='require<targetir>,require<scalar-evolution>,require<domtree>,loop(indvars)'
+; RUN: opt -passes=lcssa,loop-simplify -S < %s | opt -S -passes='require<target-ir>,require<scalar-evolution>,require<domtree>,loop(indvars)'
 
 ;; --- signed ---
 
diff --git a/llvm/test/Transforms/IndVarSimplify/sharpen-range.ll b/llvm/test/Transforms/IndVarSimplify/sharpen-range.ll
index f07e8b07251de..4dd4e9831c966 100644
--- a/llvm/test/Transforms/IndVarSimplify/sharpen-range.ll
+++ b/llvm/test/Transforms/IndVarSimplify/sharpen-range.ll
@@ -1,5 +1,5 @@
 ;; RUN: opt -S < %s -passes=indvars | FileCheck %s
-; RUN: opt -passes=lcssa,loop-simplify -S < %s | opt -S -passes='require<targetir>,require<scalar-evolution>,require<domtree>,loop(indvars)'
+; RUN: opt -passes=lcssa,loop-simplify -S < %s | opt -S -passes='require<target-ir>,require<scalar-evolution>,require<domtree>,loop(indvars)'
 
 ;; Check if llvm can narrow !range metadata based on loop entry
 ;; predicates.
diff --git a/llvm/test/Transforms/LICM/argmemonly-call.ll b/llvm/test/Transforms/LICM/argmemonly-call.ll
index 89f762790bd8b..f990c955f56e3 100644
--- a/llvm/test/Transforms/LICM/argmemonly-call.ll
+++ b/llvm/test/Transforms/LICM/argmemonly-call.ll
@@ -1,4 +1,4 @@
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
 
 declare i32 @foo() readonly argmemonly nounwind
 declare i32 @foo2() readonly nounwind
diff --git a/llvm/test/Transforms/LICM/assume.ll b/llvm/test/Transforms/LICM/assume.ll
index f1afa2007f8e2..bfb0359dbdff0 100644
--- a/llvm/test/Transforms/LICM/assume.ll
+++ b/llvm/test/Transforms/LICM/assume.ll
@@ -1,5 +1,5 @@
 ; RUN: opt -passes=licm < %s -S | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
 
 define void @f_0(i1 %p) nounwind ssp {
 ; CHECK-LABEL: @f_0(
diff --git a/llvm/test/Transforms/LICM/basictest.ll b/llvm/test/Transforms/LICM/basictest.ll
index 4152b07df5be5..4a54ce3f9610a 100644
--- a/llvm/test/Transforms/LICM/basictest.ll
+++ b/llvm/test/Transforms/LICM/basictest.ll
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -passes=licm | llvm-dis
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s | llvm-dis
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s | llvm-dis
 
 define void @testfunc(i32 %i) {
 ; <label>:0
diff --git a/llvm/test/Transforms/LICM/call-hoisting.ll b/llvm/test/Transforms/LICM/call-hoisting.ll
index cffe680cbe7df..e6d2e42e34e81 100644
--- a/llvm/test/Transforms/LICM/call-hoisting.ll
+++ b/llvm/test/Transforms/LICM/call-hoisting.ll
@@ -1,5 +1,5 @@
 ; RUN: opt -S -passes=licm %s | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
 
 declare i32 @load(ptr %p) argmemonly readonly nounwind
 
diff --git a/llvm/test/Transforms/LICM/crash.ll b/llvm/test/Transforms/LICM/crash.ll
index aa9e11e851bac..2cb44daf8e24f 100644
--- a/llvm/test/Transforms/LICM/crash.ll
+++ b/llvm/test/Transforms/LICM/crash.ll
@@ -1,5 +1,5 @@
 ; RUN: opt -passes=licm -disable-output < %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -disable-output < %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -disable-output < %s
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 target triple = "x86_64-apple-darwin10.0.0"
diff --git a/llvm/test/Transforms/LICM/dbg-value-sink.ll b/llvm/test/Transforms/LICM/dbg-value-sink.ll
index 3970ca15192cc..e0bd4d57a67fe 100644
--- a/llvm/test/Transforms/LICM/dbg-value-sink.ll
+++ b/llvm/test/Transforms/LICM/dbg-value-sink.ll
@@ -1,8 +1,8 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes
 ; RUN: opt < %s -passes='loop-mssa(licm)' -S | FileCheck %s
 ; RUN: opt < %s -passes='loop-mssa(licm)' -S --try-experimental-debuginfo-iterators | FileCheck %s
-; RUN: opt -aa-pipeline=tbaa,basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
-; RUN: opt -aa-pipeline=tbaa,basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s --try-experimental-debuginfo-iterators| FileCheck %s
+; RUN: opt -aa-pipeline=tbaa,basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
+; RUN: opt -aa-pipeline=tbaa,basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s --try-experimental-debuginfo-iterators| FileCheck %s
 ;
 ; Test that when we sink the store into the "Out" block, it lands in front of
 ; the dbg.value that we've left there.
diff --git a/llvm/test/Transforms/LICM/debug-value.ll b/llvm/test/Transforms/LICM/debug-value.ll
index e1121d2129799..b15fafcf97556 100644
--- a/llvm/test/Transforms/LICM/debug-value.ll
+++ b/llvm/test/Transforms/LICM/debug-value.ll
@@ -1,5 +1,5 @@
 ; RUN: opt -passes=licm < %s -S | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
 
 ; RUN: opt -passes=licm < %s -S --try-experimental-debuginfo-iterators | FileCheck %s
 
diff --git a/llvm/test/Transforms/LICM/extra-copies.ll b/llvm/test/Transforms/LICM/extra-copies.ll
index defd2690a775a..33ad89f4b21e9 100644
--- a/llvm/test/Transforms/LICM/extra-copies.ll
+++ b/llvm/test/Transforms/LICM/extra-copies.ll
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -passes=licm -S | FileCheck %s
-; RUN: opt -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
+; RUN: opt -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
 ; PR19835
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
diff --git a/llvm/test/Transforms/LICM/fence.ll b/llvm/test/Transforms/LICM/fence.ll
index 299411aec95b7..0dd4d010f7aa4 100644
--- a/llvm/test/Transforms/LICM/fence.ll
+++ b/llvm/test/Transforms/LICM/fence.ll
@@ -1,5 +1,5 @@
 ; RUN: opt -passes=licm < %s -S | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
 
 define void @test1(i64 %n) {
 ; CHECK-LABEL: @test1
diff --git a/llvm/test/Transforms/LICM/funclet.ll b/llvm/test/Transforms/LICM/funclet.ll
index 140bc57093f1b..cacb0c90d3702 100644
--- a/llvm/test/Transforms/LICM/funclet.ll
+++ b/llvm/test/Transforms/LICM/funclet.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -passes=licm -S | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
 
 target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
 target triple = "i386-pc-windows-msvc18.0.0"
diff --git a/llvm/test/Transforms/LICM/guards.ll b/llvm/test/Transforms/LICM/guards.ll
index fcfe299d656e6..361d938ce19b8 100644
--- a/llvm/test/Transforms/LICM/guards.ll
+++ b/llvm/test/Transforms/LICM/guards.ll
@@ -1,7 +1,7 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; REQUIRES: asserts
 ; RUN: opt -passes=licm -ipt-expensive-asserts=true < %s -S | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -ipt-expensive-asserts=true < %s -S | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -ipt-expensive-asserts=true < %s -S | FileCheck %s
 
 ; Hoist guard and load.
 define void @test1(i1 %cond, ptr %ptr) {
diff --git a/llvm/test/Transforms/LICM/hoist-round.ll b/llvm/test/Transforms/LICM/hoist-round.ll
index 971e9e90a55f3..cc67e7360a88f 100644
--- a/llvm/test/Transforms/LICM/hoist-round.ll
+++ b/llvm/test/Transforms/LICM/hoist-round.ll
@@ -1,4 +1,4 @@
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
 ; RUN: opt -S -passes=licm -verify-memoryssa < %s | FileCheck %s
 
 target datalayout = "E-m:e-p:32:32-i8:8:8-i16:16:16-i64:32:32-f64:32:32-v64:32:32-v128:32:32-a0:0:32-n32"
diff --git a/llvm/test/Transforms/LICM/invariant.start.ll b/llvm/test/Transforms/LICM/invariant.start.ll
index 1ba646b8858ad..c9c16423e2637 100644
--- a/llvm/test/Transforms/LICM/invariant.start.ll
+++ b/llvm/test/Transforms/LICM/invariant.start.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt -passes=licm < %s -S | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
 
 define void @test1(i1 %cond, ptr %ptr) {
 ; CHECK-LABEL: @test1(
diff --git a/llvm/test/Transforms/LICM/lcssa-ssa-promoter.ll b/llvm/test/Transforms/LICM/lcssa-ssa-promoter.ll
index 5bc677a609bef..a68fb0d00af1b 100644
--- a/llvm/test/Transforms/LICM/lcssa-ssa-promoter.ll
+++ b/llvm/test/Transforms/LICM/lcssa-ssa-promoter.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt -S -passes=licm < %s | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s| FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s| FileCheck %s
 ;
 ; Manually validate LCSSA form is preserved even after SSAUpdater is used to
 ; promote things in the loop bodies.
diff --git a/llvm/test/Transforms/LICM/no-preheader-test.ll b/llvm/test/Transforms/LICM/no-preheader-test.ll
index 091dbd31d3682..53dcfc75cd803 100644
--- a/llvm/test/Transforms/LICM/no-preheader-test.ll
+++ b/llvm/test/Transforms/LICM/no-preheader-test.ll
@@ -1,6 +1,6 @@
 ; Test that LICM works when there is not a loop-preheader
 ; RUN: opt < %s -passes=licm | llvm-dis
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s | llvm-dis
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s | llvm-dis
 
 define void @testfunc(i32 %i.s, i1 %ifcond) {
 	br i1 %ifcond, label %Then, label %Else
diff --git a/llvm/test/Transforms/LICM/opt-remarks-conditional-load.ll b/llvm/test/Transforms/LICM/opt-remarks-conditional-load.ll
index 9d48f91337f50..686ec6bbf11bc 100644
--- a/llvm/test/Transforms/LICM/opt-remarks-conditional-load.ll
+++ b/llvm/test/Transforms/LICM/opt-remarks-conditional-load.ll
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -passes=licm -pass-remarks-missed=licm -o /dev/null 2>&1 | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' %s -o /dev/null -pass-remarks-missed=licm 2>&1 | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' %s -o /dev/null -pass-remarks-missed=licm 2>&1 | FileCheck %s
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
 ; With the load from %p conditional, we can't optmize this and the remark
diff --git a/llvm/test/Transforms/LICM/opt-remarks-intervening-store.ll b/llvm/test/Transforms/LICM/opt-remarks-intervening-store.ll
index 3092c82467538..7487f65e29671 100644
--- a/llvm/test/Transforms/LICM/opt-remarks-intervening-store.ll
+++ b/llvm/test/Transforms/LICM/opt-remarks-intervening-store.ll
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -passes=licm -pass-remarks-missed=licm -o /dev/null 2>&1 | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' %s -o /dev/null -pass-remarks-missed=licm 2>&1 | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' %s -o /dev/null -pass-remarks-missed=licm 2>&1 | FileCheck %s
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
 ; Without the noalias on %p, we can't optmize this and the remark should tell
diff --git a/llvm/test/Transforms/LICM/opt-remarks.ll b/llvm/test/Transforms/LICM/opt-remarks.ll
index 153e685d4685e..b70db6f4e33e2 100644
--- a/llvm/test/Transforms/LICM/opt-remarks.ll
+++ b/llvm/test/Transforms/LICM/opt-remarks.ll
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -passes=licm -pass-remarks=licm -o /dev/null 2>&1 | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' %s -o /dev/null -pass-remarks=licm 2>&1 | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' %s -o /dev/null -pass-remarks=licm 2>&1 | FileCheck %s
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
 define void @hoist(ptr %array, ptr noalias %p) {
diff --git a/llvm/test/Transforms/LICM/preheader-safe.ll b/llvm/test/Transforms/LICM/preheader-safe.ll
index 0fd05e5aacc9d..a96e847c51d9f 100644
--- a/llvm/test/Transforms/LICM/preheader-safe.ll
+++ b/llvm/test/Transforms/LICM/preheader-safe.ll
@@ -1,5 +1,5 @@
 ; RUN: opt -S -passes=licm < %s | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
 
 declare void @use_nothrow(i64 %a) nounwind
 declare void @use(i64 %a)
diff --git a/llvm/test/Transforms/LICM/promote-order.ll b/llvm/test/Transforms/LICM/promote-order.ll
index 6cb129e0a72a1..e42b42564dec6 100644
--- a/llvm/test/Transforms/LICM/promote-order.ll
+++ b/llvm/test/Transforms/LICM/promote-order.ll
@@ -1,4 +1,4 @@
-; RUN: opt -aa-pipeline=tbaa,basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
+; RUN: opt -aa-pipeline=tbaa,basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
 
 ; LICM should keep the stores in their original order when it sinks/promotes them.
 ; rdar://12045203
diff --git a/llvm/test/Transforms/LICM/read-only-calls.ll b/llvm/test/Transforms/LICM/read-only-calls.ll
index 6214e45160425..87899045f1655 100644
--- a/llvm/test/Transforms/LICM/read-only-calls.ll
+++ b/llvm/test/Transforms/LICM/read-only-calls.ll
@@ -1,4 +1,4 @@
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
 
 ; We should be able to hoist loads in presence of read only calls and stores
 ; that do not alias.
diff --git a/llvm/test/Transforms/LICM/scalar-promote-memmodel.ll b/llvm/test/Transforms/LICM/scalar-promote-memmodel.ll
index 762cf8fd63bf7..78a1c2b4adb1f 100644
--- a/llvm/test/Transforms/LICM/scalar-promote-memmodel.ll
+++ b/llvm/test/Transforms/LICM/scalar-promote-memmodel.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -passes=licm -S | FileCheck %s
-; RUN: opt -aa-pipeline=tbaa,basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
+; RUN: opt -aa-pipeline=tbaa,basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
 
 ; Make sure we don't hoist a conditionally-executed store out of the loop;
 ; it would violate the concurrency memory model
diff --git a/llvm/test/Transforms/LICM/scalar-promote-unwind.ll b/llvm/test/Transforms/LICM/scalar-promote-unwind.ll
index ac79aec5ffc2f..82ffd42d77e62 100644
--- a/llvm/test/Transforms/LICM/scalar-promote-unwind.ll
+++ b/llvm/test/Transforms/LICM/scalar-promote-unwind.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -passes=licm -S | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
diff --git a/llvm/test/Transforms/LICM/scalar-promote.ll b/llvm/test/Transforms/LICM/scalar-promote.ll
index 0ce85081a69b4..bd3960e846b42 100644
--- a/llvm/test/Transforms/LICM/scalar-promote.ll
+++ b/llvm/test/Transforms/LICM/scalar-promote.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes
 ; RUN: opt < %s -passes=licm -S | FileCheck %s
-; RUN: opt -aa-pipeline=tbaa,basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
+; RUN: opt -aa-pipeline=tbaa,basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
 
 @X = global i32 7   ; <ptr> [#uses=4]
diff --git a/llvm/test/Transforms/LICM/speculate.ll b/llvm/test/Transforms/LICM/speculate.ll
index 7f753b520dd3d..03cb55580a41d 100644
--- a/llvm/test/Transforms/LICM/speculate.ll
+++ b/llvm/test/Transforms/LICM/speculate.ll
@@ -1,5 +1,5 @@
 ; RUN: opt -S -passes=licm < %s | FileCheck %s
-; RUN: opt -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
+; RUN: opt -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S %s | FileCheck %s
 
 ; UDiv is safe to speculate if the denominator is known non-zero.
 
diff --git a/llvm/test/Transforms/LICM/store-hoisting.ll b/llvm/test/Transforms/LICM/store-hoisting.ll
index 3b36f299eaef5..d4f62d1c16f06 100644
--- a/llvm/test/Transforms/LICM/store-hoisting.ll
+++ b/llvm/test/Transforms/LICM/store-hoisting.ll
@@ -1,4 +1,4 @@
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' < %s -S | FileCheck %s
 
 define void @test(ptr %loc) {
 ; CHECK-LABEL: @test
diff --git a/llvm/test/Transforms/LICM/volatile-alias.ll b/llvm/test/Transforms/LICM/volatile-alias.ll
index 2c9123edeee12..410f3becc5bac 100644
--- a/llvm/test/Transforms/LICM/volatile-alias.ll
+++ b/llvm/test/Transforms/LICM/volatile-alias.ll
@@ -1,4 +1,4 @@
-; RUN: opt -passes='sroa,loop(loop-rotate)' %s | opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S | FileCheck %s
+; RUN: opt -passes='sroa,loop(loop-rotate)' %s | opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop-mssa(licm)' -S | FileCheck %s
 ; RUN: opt -passes='sroa,loop(loop-rotate),loop-mssa(licm)' -verify-memoryssa -S < %s | FileCheck %s
 ; The objects *p and *q are aliased to each other, but even though *q is
 ; volatile, *p can be considered invariant in the loop. Check if it is moved
diff --git a/llvm/test/Transforms/LoopIdiom/nontemporal_store.ll b/llvm/test/Transforms/LoopIdiom/nontemporal_store.ll
index c143587535533..08d241911bfdd 100644
--- a/llvm/test/Transforms/LoopIdiom/nontemporal_store.ll
+++ b/llvm/test/Transforms/LoopIdiom/nontemporal_store.ll
@@ -1,5 +1,5 @@
 ; RUN: opt -passes=loop-idiom < %s -S | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,require<opt-remark-emit>,loop(loop-idiom)' < %s -S | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop(loop-idiom)' < %s -S | FileCheck %s
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
diff --git a/llvm/test/Transforms/LoopRotate/RISCV/invalid-cost.ll b/llvm/test/Transforms/LoopRotate/RISCV/invalid-cost.ll
index 5f04bb15c1a26..46504596d74f5 100644
--- a/llvm/test/Transforms/LoopRotate/RISCV/invalid-cost.ll
+++ b/llvm/test/Transforms/LoopRotate/RISCV/invalid-cost.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt -S -passes=loop-rotate -verify-memoryssa < %s | FileCheck %s
-; RUN: opt -S -passes='require<targetir>,require<assumptions>,loop(loop-rotate)' < %s | FileCheck %s
+; RUN: opt -S -passes='require<target-ir>,require<assumptions>,loop(loop-rotate)' < %s | FileCheck %s
 
 ; Demonstrate handling of invalid costs in LoopRotate.  This test uses
 ; scalable vectors on RISCV w/o +V to create a situation where a construct
diff --git a/llvm/test/Transforms/LoopRotate/basic.ll b/llvm/test/Transforms/LoopRotate/basic.ll
index aa9f510c82630..b3c35f1edd3ea 100644
--- a/llvm/test/Transforms/LoopRotate/basic.ll
+++ b/llvm/test/Transforms/LoopRotate/basic.ll
@@ -1,6 +1,6 @@
 ; RUN: opt -S -passes=loop-rotate -verify-memoryssa < %s | FileCheck %s
-; RUN: opt -S -passes='require<targetir>,require<assumptions>,loop(loop-rotate)' < %s | FileCheck %s
-; RUN: opt -S -passes='require<targetir>,require<assumptions>,loop-mssa(loop-rotate)' -verify-memoryssa  < %s | FileCheck %s
+; RUN: opt -S -passes='require<target-ir>,require<assumptions>,loop(loop-rotate)' < %s | FileCheck %s
+; RUN: opt -S -passes='require<target-ir>,require<assumptions>,loop-mssa(loop-rotate)' -verify-memoryssa  < %s | FileCheck %s
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 target triple = "x86_64-apple-darwin10.0.0"
diff --git a/llvm/test/Transforms/LoopRotate/call-prepare-for-lto.ll b/llvm/test/Transforms/LoopRotate/call-prepare-for-lto.ll
index e4be918aed609..a7c957a41f79f 100644
--- a/llvm/test/Transforms/LoopRotate/call-prepare-for-lto.ll
+++ b/llvm/test/Transforms/LoopRotate/call-prepare-for-lto.ll
@@ -1,7 +1,7 @@
 ; RUN: opt -S -passes=loop-rotate < %s | FileCheck --check-prefix=FULL %s
 ; RUN: opt -S -passes=loop-rotate -rotation-prepare-for-lto < %s | FileCheck --check-prefix=PREPARE %s
-; RUN: opt -S -passes='require<targetir>,require<assumptions>,loop(loop-rotate)' < %s | FileCheck --check-prefix=FULL %s
-; RUN: opt -S -passes='require<targetir>,require<assumptions>,loop(loop-rotate)' -rotation-prepare-for-lto < %s | FileCheck --check-prefix=PREPARE %s
+; RUN: opt -S -passes='require<target-ir>,require<assumptions>,loop(loop-rotate)' < %s | FileCheck --check-prefix=FULL %s
+; RUN: opt -S -passes='require<target-ir>,require<assumptions>,loop(loop-rotate)' -rotation-prepare-for-lto < %s | FileCheck --check-prefix=PREPARE %s
 
 ; Test case to make sure loop-rotate avoids rotating during the prepare-for-lto
 ; stage, when the header contains a call which may be inlined during the LTO stage.
diff --git a/llvm/test/Transforms/LoopRotate/noalias.ll b/llvm/test/Transforms/LoopRotate/noalias.ll
index da72a5f8b57a3..f709bba1cb4b1 100644
--- a/llvm/test/Transforms/LoopRotate/noalias.ll
+++ b/llvm/test/Transforms/LoopRotate/noalias.ll
@@ -1,6 +1,6 @@
 ; RUN: opt -S -passes=loop-rotate -verify-memoryssa < %s | FileCheck %s
-; RUN: opt -S -passes='require<targetir>,require<assumptions>,loop(loop-rotate)' < %s | FileCheck %s
-; RUN: opt -S -passes='require<targetir>,require<assumptions>,loop(loop-rotate)' -verify-memoryssa  < %s | FileCheck %s
+; RUN: opt -S -passes='require<target-ir>,require<assumptions>,loop(loop-rotate)' < %s | FileCheck %s
+; RUN: opt -S -passes='require<target-ir>,require<assumptions>,loop(loop-rotate)' -verify-memoryssa  < %s | FileCheck %s
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
diff --git a/llvm/test/Transforms/LoopStrengthReduce/ivchain.ll b/llvm/test/Transforms/LoopStrengthReduce/ivchain.ll
index 49a06f0aee371..0c1dce52d0876 100644
--- a/llvm/test/Transforms/LoopStrengthReduce/ivchain.ll
+++ b/llvm/test/Transforms/LoopStrengthReduce/ivchain.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
 ; RUN: opt < %s -loop-reduce -S | FileCheck %s
-; RUN: opt -passes='require<scalar-evolution>,require<targetir>,loop(loop-reduce)' < %s -S | FileCheck %s
+; RUN: opt -passes='require<scalar-evolution>,require<target-ir>,loop(loop-reduce)' < %s -S | FileCheck %s
 ;
 ; PR11782: bad cast to AddRecExpr.
 ; A sign extend feeds an IVUser and cannot be hoisted into the AddRec.

>From 16958120bc9a7fc3264f7d85d74668f847fdc23e Mon Sep 17 00:00:00 2001
From: PaperChalice <29250197+paperchalice at users.noreply.github.com>
Date: Mon, 4 Dec 2023 18:05:23 +0800
Subject: [PATCH 11/11] [Pass] Rename `targetlibinfo` -> `target-lib-info`

---
 llvm/lib/Passes/PassRegistry.def    | 2 +-
 llvm/test/Other/new-pass-manager.ll | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Passes/PassRegistry.def b/llvm/lib/Passes/PassRegistry.def
index f6b19036c18b8..e291fb682daca 100644
--- a/llvm/lib/Passes/PassRegistry.def
+++ b/llvm/lib/Passes/PassRegistry.def
@@ -252,7 +252,7 @@ FUNCTION_ANALYSIS("should-run-extra-vector-passes",
 FUNCTION_ANALYSIS("stack-safety-local", StackSafetyAnalysis())
 FUNCTION_ANALYSIS("target-ir",
                   TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
-FUNCTION_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
+FUNCTION_ANALYSIS("target-lib-info", TargetLibraryAnalysis())
 FUNCTION_ANALYSIS("uniformity", UniformityInfoAnalysis())
 FUNCTION_ANALYSIS("verify", VerifierAnalysis())
 
diff --git a/llvm/test/Other/new-pass-manager.ll b/llvm/test/Other/new-pass-manager.ll
index 863f2e76e8304..904307659ad1f 100644
--- a/llvm/test/Other/new-pass-manager.ll
+++ b/llvm/test/Other/new-pass-manager.ll
@@ -201,7 +201,7 @@
 ; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis
 
 ; RUN: opt -disable-output -disable-verify -verify-analysis-invalidation=0 -debug-pass-manager %s 2>&1 \
-; RUN:     -passes='require<targetlibinfo>,invalidate<all>,require<targetlibinfo>' \
+; RUN:     -passes='require<target-lib-info>,invalidate<all>,require<target-lib-info>' \
 ; RUN:     | FileCheck %s --check-prefix=CHECK-TLI
 ; CHECK-TLI: Running pass: RequireAnalysisPass
 ; CHECK-TLI: Running analysis: TargetLibraryAnalysis



More information about the llvm-commits mailing list