[llvm] 217e857 - [ArgPromotion] Remove legacy PM support
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 00:42:26 PDT 2022
Author: Nikita Popov
Date: 2022-06-27T09:42:17+02:00
New Revision: 217e85761cd1978931e29546e15716614e3b2fcc
URL: https://github.com/llvm/llvm-project/commit/217e85761cd1978931e29546e15716614e3b2fcc
DIFF: https://github.com/llvm/llvm-project/commit/217e85761cd1978931e29546e15716614e3b2fcc.diff
LOG: [ArgPromotion] Remove legacy PM support
Support for the legacy pass manager in ArgPromotion causes
complications in D125485. As the legacy pass manager for middle-end
optimizations is unsupported, drop ArgPromotion from the legacy
pipeline, rather than introducing additional complexity to deal
with it.
Differential Revision: https://reviews.llvm.org/D128536
Added:
Modified:
llvm/bindings/go/llvm/transforms_ipo.go
llvm/bindings/ocaml/transforms/ipo/ipo_ocaml.c
llvm/bindings/ocaml/transforms/ipo/llvm_ipo.ml
llvm/bindings/ocaml/transforms/ipo/llvm_ipo.mli
llvm/include/llvm-c/Transforms/IPO.h
llvm/include/llvm/InitializePasses.h
llvm/include/llvm/LinkAllPasses.h
llvm/include/llvm/Transforms/IPO.h
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/lib/Transforms/IPO/IPO.cpp
llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
llvm/test/Analysis/TypeBasedAliasAnalysis/argument-promotion.ll
llvm/test/Bindings/OCaml/ipo.ml
llvm/test/CodeGen/PowerPC/arg_promotion.ll
llvm/test/CodeGen/X86/GC/argpromotion.ll
llvm/test/Transforms/ArgumentPromotion/2008-09-07-CGUpdate.ll
llvm/test/Transforms/ArgumentPromotion/X86/attributes.ll
llvm/test/Transforms/ArgumentPromotion/X86/min-legal-vector-width.ll
llvm/test/Transforms/ArgumentPromotion/X86/thiscall.ll
llvm/test/Transforms/ArgumentPromotion/align.ll
llvm/test/Transforms/ArgumentPromotion/basictest.ll
llvm/test/Transforms/ArgumentPromotion/bitcasts.ll
llvm/test/Transforms/ArgumentPromotion/crash.ll
llvm/test/Transforms/ArgumentPromotion/load-after-non-willreturn-call.ll
llvm/test/Transforms/ArgumentPromotion/metadata.ll
llvm/test/Transforms/ArgumentPromotion/opaque-ptr.ll
llvm/test/Transforms/ArgumentPromotion/pr32917.ll
llvm/test/Transforms/ArgumentPromotion/pr42028-recursion.ll
llvm/test/Transforms/ArgumentPromotion/profile.ll
llvm/test/Transforms/ArgumentPromotion/volatile-atomic.ll
llvm/test/Transforms/CodeExtractor/LoopExtractor_crash.ll
llvm/test/Transforms/Inline/2009-01-13-RecursiveInlineCrash.ll
llvm/test/Transforms/Inline/crash.ll
Removed:
################################################################################
diff --git a/llvm/bindings/go/llvm/transforms_ipo.go b/llvm/bindings/go/llvm/transforms_ipo.go
index 8a158f208bef..3f9ae5df6caf 100644
--- a/llvm/bindings/go/llvm/transforms_ipo.go
+++ b/llvm/bindings/go/llvm/transforms_ipo.go
@@ -25,7 +25,6 @@ func boolToUnsigned(b bool) C.unsigned {
return 0
}
-func (pm PassManager) AddArgumentPromotionPass() { C.LLVMAddArgumentPromotionPass(pm.C) }
func (pm PassManager) AddConstantMergePass() { C.LLVMAddConstantMergePass(pm.C) }
func (pm PassManager) AddDeadArgEliminationPass() { C.LLVMAddDeadArgEliminationPass(pm.C) }
func (pm PassManager) AddFunctionAttrsPass() { C.LLVMAddFunctionAttrsPass(pm.C) }
diff --git a/llvm/bindings/ocaml/transforms/ipo/ipo_ocaml.c b/llvm/bindings/ocaml/transforms/ipo/ipo_ocaml.c
index e18b97a1509b..aeebf8a76551 100644
--- a/llvm/bindings/ocaml/transforms/ipo/ipo_ocaml.c
+++ b/llvm/bindings/ocaml/transforms/ipo/ipo_ocaml.c
@@ -19,12 +19,6 @@
#include "caml/mlvalues.h"
#include "caml/misc.h"
-/* [`Module] Llvm.PassManager.t -> unit */
-value llvm_add_argument_promotion(LLVMPassManagerRef PM) {
- LLVMAddArgumentPromotionPass(PM);
- return Val_unit;
-}
-
/* [`Module] Llvm.PassManager.t -> unit */
value llvm_add_constant_merge(LLVMPassManagerRef PM) {
LLVMAddConstantMergePass(PM);
diff --git a/llvm/bindings/ocaml/transforms/ipo/llvm_ipo.ml b/llvm/bindings/ocaml/transforms/ipo/llvm_ipo.ml
index d5d959288d33..7b2f37992000 100644
--- a/llvm/bindings/ocaml/transforms/ipo/llvm_ipo.ml
+++ b/llvm/bindings/ocaml/transforms/ipo/llvm_ipo.ml
@@ -6,9 +6,6 @@
*
*===----------------------------------------------------------------------===*)
-external add_argument_promotion
- : [ `Module ] Llvm.PassManager.t -> unit
- = "llvm_add_argument_promotion"
external add_constant_merge
: [ `Module ] Llvm.PassManager.t -> unit
= "llvm_add_constant_merge"
diff --git a/llvm/bindings/ocaml/transforms/ipo/llvm_ipo.mli b/llvm/bindings/ocaml/transforms/ipo/llvm_ipo.mli
index a581924c6d54..31b8ed03f5d7 100644
--- a/llvm/bindings/ocaml/transforms/ipo/llvm_ipo.mli
+++ b/llvm/bindings/ocaml/transforms/ipo/llvm_ipo.mli
@@ -11,11 +11,6 @@
This interface provides an OCaml API for LLVM interprocedural optimizations, the
classes in the [LLVMIPO] library. *)
-(** See the [llvm::createAddArgumentPromotionPass] function. *)
-external add_argument_promotion
- : [ `Module ] Llvm.PassManager.t -> unit
- = "llvm_add_argument_promotion"
-
(** See the [llvm::createConstantMergePass] function. *)
external add_constant_merge
: [ `Module ] Llvm.PassManager.t -> unit
diff --git a/llvm/include/llvm-c/Transforms/IPO.h b/llvm/include/llvm-c/Transforms/IPO.h
index 3f2cadf32366..c806156281bd 100644
--- a/llvm/include/llvm-c/Transforms/IPO.h
+++ b/llvm/include/llvm-c/Transforms/IPO.h
@@ -27,9 +27,6 @@ LLVM_C_EXTERN_C_BEGIN
* @{
*/
-/** See llvm::createArgumentPromotionPass function. */
-void LLVMAddArgumentPromotionPass(LLVMPassManagerRef PM);
-
/** See llvm::createConstantMergePass function. */
void LLVMAddConstantMergePass(LLVMPassManagerRef PM);
diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h
index ece2f20bd4b8..77f2c6330788 100644
--- a/llvm/include/llvm/InitializePasses.h
+++ b/llvm/include/llvm/InitializePasses.h
@@ -71,7 +71,6 @@ void initializeAssumeBuilderPassLegacyPassPass(PassRegistry &);
void initializeAnnotation2MetadataLegacyPass(PassRegistry &);
void initializeAnnotationRemarksLegacyPass(PassRegistry &);
void initializeOpenMPOptCGSCCLegacyPassPass(PassRegistry &);
-void initializeArgPromotionPass(PassRegistry&);
void initializeAssumptionCacheTrackerPass(PassRegistry&);
void initializeAtomicExpandPass(PassRegistry&);
void initializeAttributorLegacyPassPass(PassRegistry&);
diff --git a/llvm/include/llvm/LinkAllPasses.h b/llvm/include/llvm/LinkAllPasses.h
index ce392b5cf69b..af5926dcb38b 100644
--- a/llvm/include/llvm/LinkAllPasses.h
+++ b/llvm/include/llvm/LinkAllPasses.h
@@ -75,7 +75,6 @@ namespace {
(void) llvm::createAggressiveInstCombinerPass();
(void) llvm::createBitTrackingDCEPass();
(void)llvm::createOpenMPOptCGSCCLegacyPass();
- (void) llvm::createArgumentPromotionPass();
(void) llvm::createAlignmentFromAssumptionsPass();
(void) llvm::createBasicAAWrapperPass();
(void) llvm::createSCEVAAWrapperPass();
diff --git a/llvm/include/llvm/Transforms/IPO.h b/llvm/include/llvm/Transforms/IPO.h
index 67b9a93c47b2..6b7d4f4821f0 100644
--- a/llvm/include/llvm/Transforms/IPO.h
+++ b/llvm/include/llvm/Transforms/IPO.h
@@ -151,13 +151,6 @@ ModulePass *createDeadArgEliminationPass();
/// bugpoint.
ModulePass *createDeadArgHackingPass();
-//===----------------------------------------------------------------------===//
-/// createArgumentPromotionPass - This pass promotes "by reference" arguments to
-/// be passed by value if the number of elements passed is smaller or
-/// equal to maxElements (maxElements == 0 means always promote).
-///
-Pass *createArgumentPromotionPass(unsigned maxElements = 3);
-
//===----------------------------------------------------------------------===//
/// createOpenMPOptLegacyPass - OpenMP specific optimizations.
Pass *createOpenMPOptCGSCCLegacyPass();
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
index 913c7146b954..9470d6641b36 100644
--- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -970,113 +970,3 @@ PreservedAnalyses ArgumentPromotionPass::run(LazyCallGraph::SCC &C,
PA.preserveSet<AllAnalysesOn<Function>>();
return PA;
}
-
-namespace {
-
-/// ArgPromotion - The 'by reference' to 'by value' argument promotion pass.
-struct ArgPromotion : public CallGraphSCCPass {
- // Pass identification, replacement for typeid
- static char ID;
-
- explicit ArgPromotion(unsigned MaxElements = 3)
- : CallGraphSCCPass(ID), MaxElements(MaxElements) {
- initializeArgPromotionPass(*PassRegistry::getPassRegistry());
- }
-
- void getAnalysisUsage(AnalysisUsage &AU) const override {
- AU.addRequired<AssumptionCacheTracker>();
- AU.addRequired<TargetLibraryInfoWrapperPass>();
- AU.addRequired<TargetTransformInfoWrapperPass>();
- getAAResultsAnalysisUsage(AU);
- CallGraphSCCPass::getAnalysisUsage(AU);
- }
-
- bool runOnSCC(CallGraphSCC &SCC) override;
-
-private:
- using llvm::Pass::doInitialization;
-
- bool doInitialization(CallGraph &CG) override;
-
- /// The maximum number of elements to expand, or 0 for unlimited.
- unsigned MaxElements;
-};
-
-} // end anonymous namespace
-
-char ArgPromotion::ID = 0;
-
-INITIALIZE_PASS_BEGIN(ArgPromotion, "argpromotion",
- "Promote 'by reference' arguments to scalars", false,
- false)
-INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
-INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass)
-INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
-INITIALIZE_PASS_DEPENDENCY(TargetTransformInfoWrapperPass)
-INITIALIZE_PASS_END(ArgPromotion, "argpromotion",
- "Promote 'by reference' arguments to scalars", false, false)
-
-Pass *llvm::createArgumentPromotionPass(unsigned MaxElements) {
- return new ArgPromotion(MaxElements);
-}
-
-bool ArgPromotion::runOnSCC(CallGraphSCC &SCC) {
- if (skipSCC(SCC))
- return false;
-
- // Get the callgraph information that we need to update to reflect our
- // changes.
- CallGraph &CG = getAnalysis<CallGraphWrapperPass>().getCallGraph();
-
- LegacyAARGetter AARGetter(*this);
-
- bool Changed = false, LocalChange;
-
- // Iterate until we stop promoting from this SCC.
- do {
- LocalChange = false;
- // Attempt to promote arguments from all functions in this SCC.
- bool IsRecursive = SCC.size() > 1;
- for (CallGraphNode *OldNode : SCC) {
- Function *OldF = OldNode->getFunction();
- if (!OldF)
- continue;
-
- auto ReplaceCallSite = [&](CallBase &OldCS, CallBase &NewCS) {
- Function *Caller = OldCS.getParent()->getParent();
- CallGraphNode *NewCalleeNode =
- CG.getOrInsertFunction(NewCS.getCalledFunction());
- CallGraphNode *CallerNode = CG[Caller];
- CallerNode->replaceCallEdge(cast<CallBase>(OldCS),
- cast<CallBase>(NewCS), NewCalleeNode);
- };
-
- const TargetTransformInfo &TTI =
- getAnalysis<TargetTransformInfoWrapperPass>().getTTI(*OldF);
- if (Function *NewF =
- promoteArguments(OldF, AARGetter, MaxElements, {ReplaceCallSite},
- TTI, IsRecursive)) {
- LocalChange = true;
-
- // Update the call graph for the newly promoted function.
- CallGraphNode *NewNode = CG.getOrInsertFunction(NewF);
- NewNode->stealCalledFunctionsFrom(OldNode);
- if (OldNode->getNumReferences() == 0)
- delete CG.removeFunctionFromModule(OldNode);
- else
- OldF->setLinkage(Function::ExternalLinkage);
-
- // And update the SCC we're iterating as well.
- SCC.ReplaceNode(OldNode, NewNode);
- }
- }
- // Remember that we changed something.
- Changed |= LocalChange;
- } while (LocalChange);
-
- return Changed;
-}
-
-bool ArgPromotion::doInitialization(CallGraph &CG) {
- return CallGraphSCCPass::doInitialization(CG);
-}
diff --git a/llvm/lib/Transforms/IPO/IPO.cpp b/llvm/lib/Transforms/IPO/IPO.cpp
index de1c1d379502..ec2b80012ed6 100644
--- a/llvm/lib/Transforms/IPO/IPO.cpp
+++ b/llvm/lib/Transforms/IPO/IPO.cpp
@@ -24,7 +24,6 @@ using namespace llvm;
void llvm::initializeIPO(PassRegistry &Registry) {
initializeOpenMPOptCGSCCLegacyPassPass(Registry);
- initializeArgPromotionPass(Registry);
initializeAnnotation2MetadataLegacyPass(Registry);
initializeCalledValuePropagationLegacyPassPass(Registry);
initializeConstantMergeLegacyPassPass(Registry);
@@ -70,10 +69,6 @@ void LLVMInitializeIPO(LLVMPassRegistryRef R) {
initializeIPO(*unwrap(R));
}
-void LLVMAddArgumentPromotionPass(LLVMPassManagerRef PM) {
- unwrap(PM)->add(createArgumentPromotionPass());
-}
-
void LLVMAddCalledValuePropagationPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createCalledValuePropagationPass());
}
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
index e895d417f582..ae787be40c55 100644
--- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -732,8 +732,6 @@ void PassManagerBuilder::populateModulePassManager(
MPM.add(createOpenMPOptCGSCCLegacyPass());
MPM.add(createPostOrderFunctionAttrsLegacyPass());
- if (OptLevel > 2)
- MPM.add(createArgumentPromotionPass()); // Scalarize uninlined fn args
addExtensionsToPM(EP_CGSCCOptimizerLate, MPM);
addFunctionSimplificationPasses(MPM);
@@ -1003,10 +1001,6 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) {
PM.add(createGlobalOptimizerPass());
PM.add(createGlobalDCEPass()); // Remove dead functions.
- // If we didn't decide to inline a function, check to see if we can
- // transform it to pass arguments by value instead of by reference.
- PM.add(createArgumentPromotionPass());
-
// The IPO passes may leave cruft around. Clean up after them.
PM.add(createInstructionCombiningPass());
addExtensionsToPM(EP_Peephole, PM);
diff --git a/llvm/test/Analysis/TypeBasedAliasAnalysis/argument-promotion.ll b/llvm/test/Analysis/TypeBasedAliasAnalysis/argument-promotion.ll
index f0d07bff3829..bc7db248350e 100644
--- a/llvm/test/Analysis/TypeBasedAliasAnalysis/argument-promotion.ll
+++ b/llvm/test/Analysis/TypeBasedAliasAnalysis/argument-promotion.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -tbaa -basic-aa -argpromotion -mem2reg -S | FileCheck %s
+; RUN: opt < %s -passes=argpromotion,mem2reg -S | FileCheck %s
target datalayout = "E-p:64:64:64"
diff --git a/llvm/test/Bindings/OCaml/ipo.ml b/llvm/test/Bindings/OCaml/ipo.ml
index fe50bbafebba..55a3a1c61afc 100644
--- a/llvm/test/Bindings/OCaml/ipo.ml
+++ b/llvm/test/Bindings/OCaml/ipo.ml
@@ -47,7 +47,6 @@ let test_transforms () =
end;
ignore (PassManager.create ()
- ++ add_argument_promotion
++ add_constant_merge
++ add_dead_arg_elimination
++ add_function_attrs
diff --git a/llvm/test/CodeGen/PowerPC/arg_promotion.ll b/llvm/test/CodeGen/PowerPC/arg_promotion.ll
index e52d2e47201f..2e020ec45d2a 100644
--- a/llvm/test/CodeGen/PowerPC/arg_promotion.ll
+++ b/llvm/test/CodeGen/PowerPC/arg_promotion.ll
@@ -1,5 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -argpromotion -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
; RUN: opt -S -passes=argpromotion -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
; Test to check that we do not promote arguments when the
diff --git a/llvm/test/CodeGen/X86/GC/argpromotion.ll b/llvm/test/CodeGen/X86/GC/argpromotion.ll
index 9f4874f5669b..f9fed1587c64 100644
--- a/llvm/test/CodeGen/X86/GC/argpromotion.ll
+++ b/llvm/test/CodeGen/X86/GC/argpromotion.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -argpromotion
+; RUN: opt < %s -passes=argpromotion
declare void @llvm.gcroot(ptr, ptr)
diff --git a/llvm/test/Transforms/ArgumentPromotion/2008-09-07-CGUpdate.ll b/llvm/test/Transforms/ArgumentPromotion/2008-09-07-CGUpdate.ll
index 639457ac64ae..13b1a8e47f09 100644
--- a/llvm/test/Transforms/ArgumentPromotion/2008-09-07-CGUpdate.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/2008-09-07-CGUpdate.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
-; RUN: opt < %s -inline -argpromotion -disable-output
+; RUN: opt < %s -passes=inline,argpromotion -disable-output
define internal fastcc i32 @hash(i32* %ts, i32 %mod) nounwind {
entry:
diff --git a/llvm/test/Transforms/ArgumentPromotion/X86/attributes.ll b/llvm/test/Transforms/ArgumentPromotion/X86/attributes.ll
index c849ad807113..9b6f622029eb 100644
--- a/llvm/test/Transforms/ArgumentPromotion/X86/attributes.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/X86/attributes.ll
@@ -1,5 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
-; RUN: opt -S -argpromotion < %s | FileCheck %s
; RUN: opt -S -passes=argpromotion < %s | FileCheck %s
; Test that we only promote arguments when the caller/callee have compatible
; function attrubtes.
diff --git a/llvm/test/Transforms/ArgumentPromotion/X86/min-legal-vector-width.ll b/llvm/test/Transforms/ArgumentPromotion/X86/min-legal-vector-width.ll
index 60aaf0d19068..5c22f78d0388 100644
--- a/llvm/test/Transforms/ArgumentPromotion/X86/min-legal-vector-width.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/X86/min-legal-vector-width.ll
@@ -1,5 +1,4 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
-; RUN: opt -S -argpromotion < %s | FileCheck %s
; RUN: opt -S -passes=argpromotion < %s | FileCheck %s
; Test that we only promote arguments when the caller/callee have compatible
; function attrubtes.
diff --git a/llvm/test/Transforms/ArgumentPromotion/X86/thiscall.ll b/llvm/test/Transforms/ArgumentPromotion/X86/thiscall.ll
index 0643397be099..aa70f07ea444 100644
--- a/llvm/test/Transforms/ArgumentPromotion/X86/thiscall.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/X86/thiscall.ll
@@ -4,8 +4,8 @@
; we don't do that anymore. It also verifies that the combination of
; globalopt and argpromotion is able to optimize the call safely.
;
-; RUN: opt -S -argpromotion %s | FileCheck %s --check-prefix=ARGPROMOTION
-; RUN: opt -S -globalopt -argpromotion %s | FileCheck %s --check-prefix=GLOBALOPT_ARGPROMOTION
+; RUN: opt -S -passes=argpromotion %s | FileCheck %s --check-prefix=ARGPROMOTION
+; RUN: opt -S -passes=globalopt,argpromotion %s | FileCheck %s --check-prefix=GLOBALOPT_ARGPROMOTION
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i386-pc-windows-msvc19.11.0"
diff --git a/llvm/test/Transforms/ArgumentPromotion/align.ll b/llvm/test/Transforms/ArgumentPromotion/align.ll
index 64ba1dda95ec..ae9f7d12ea12 100644
--- a/llvm/test/Transforms/ArgumentPromotion/align.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/align.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
-; RUN: opt -S -argpromotion < %s | FileCheck %s
+; RUN: opt -S -passes=argpromotion < %s | FileCheck %s
define internal i32 @callee_must_exec(i32* %p) {
; CHECK-LABEL: define {{[^@]+}}@callee_must_exec
diff --git a/llvm/test/Transforms/ArgumentPromotion/basictest.ll b/llvm/test/Transforms/ArgumentPromotion/basictest.ll
index 1c3710b83691..64b06f2893d0 100644
--- a/llvm/test/Transforms/ArgumentPromotion/basictest.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/basictest.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
-; RUN: opt < %s -basic-aa -argpromotion -mem2reg -S | FileCheck %s
+; RUN: opt < %s -passes=argpromotion,mem2reg -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"
define internal i32 @test(i32* %X, i32* %Y) {
diff --git a/llvm/test/Transforms/ArgumentPromotion/bitcasts.ll b/llvm/test/Transforms/ArgumentPromotion/bitcasts.ll
index 5bc99dbed975..a1ad0168ca72 100644
--- a/llvm/test/Transforms/ArgumentPromotion/bitcasts.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/bitcasts.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
-; RUN: opt -S -argpromotion < %s | FileCheck %s
+; RUN: opt -S -passes=argpromotion < %s | FileCheck %s
; Test argument promotion involving bitcasts.
diff --git a/llvm/test/Transforms/ArgumentPromotion/crash.ll b/llvm/test/Transforms/ArgumentPromotion/crash.ll
index d10fab463d69..3b3b09bc9e3a 100644
--- a/llvm/test/Transforms/ArgumentPromotion/crash.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/crash.ll
@@ -1,6 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
-; RUN: opt -S < %s -inline -argpromotion | FileCheck %s --check-prefixes=ARGPROMOTION,ALL_OLDPM --allow-unused-prefixes
-; RUN: opt -S < %s -passes=inline,argpromotion | FileCheck %s --check-prefixes=ARGPROMOTION,ALL_NEWPM --allow-unused-prefixes
+; RUN: opt -S < %s -passes=inline,argpromotion | FileCheck %s --check-prefix=ARGPROMOTION
%S = type { %S* }
@@ -55,10 +54,6 @@ bb:
}
define internal i1 @barney(i8* %arg) {
-; ALL_OLDPM-LABEL: define {{[^@]+}}@barney() {
-; ALL_OLDPM-NEXT: bb:
-; ALL_OLDPM-NEXT: ret i1 undef
-;
bb:
ret i1 undef
}
diff --git a/llvm/test/Transforms/ArgumentPromotion/load-after-non-willreturn-call.ll b/llvm/test/Transforms/ArgumentPromotion/load-after-non-willreturn-call.ll
index 6af4a358e0d5..dacbd75be598 100644
--- a/llvm/test/Transforms/ArgumentPromotion/load-after-non-willreturn-call.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/load-after-non-willreturn-call.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
-; RUN: opt -S -argpromotion < %s | FileCheck %s
+; RUN: opt -S -passes=argpromotion < %s | FileCheck %s
declare void @may_not_return()
diff --git a/llvm/test/Transforms/ArgumentPromotion/metadata.ll b/llvm/test/Transforms/ArgumentPromotion/metadata.ll
index c98049b0fa9f..3549bcb8f32d 100644
--- a/llvm/test/Transforms/ArgumentPromotion/metadata.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/metadata.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
-; RUN: opt < %s -argpromotion -S | FileCheck %s
+; RUN: opt < %s -passes=argpromotion -S | FileCheck %s
declare void @use.i32(i32)
declare void @use.p32(i32*)
diff --git a/llvm/test/Transforms/ArgumentPromotion/opaque-ptr.ll b/llvm/test/Transforms/ArgumentPromotion/opaque-ptr.ll
index 70cdf0c36000..59699675577c 100644
--- a/llvm/test/Transforms/ArgumentPromotion/opaque-ptr.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/opaque-ptr.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
-; RUN: opt -S -argpromotion -opaque-pointers < %s | FileCheck %s
+; RUN: opt -S -passes=argpromotion < %s | FileCheck %s
define internal i32 @callee_basic(ptr %p) {
; CHECK-LABEL: define {{[^@]+}}@callee_basic
diff --git a/llvm/test/Transforms/ArgumentPromotion/pr32917.ll b/llvm/test/Transforms/ArgumentPromotion/pr32917.ll
index d880175d9424..01d6293a6f31 100644
--- a/llvm/test/Transforms/ArgumentPromotion/pr32917.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/pr32917.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
-; RUN: opt < %s -argpromotion -S | FileCheck %s
+; RUN: opt < %s -passes=argpromotion -S | FileCheck %s
; PR 32917
@b = common local_unnamed_addr global i32 0, align 4
diff --git a/llvm/test/Transforms/ArgumentPromotion/pr42028-recursion.ll b/llvm/test/Transforms/ArgumentPromotion/pr42028-recursion.ll
index e37ad1819a9f..6e5c1a0e03de 100644
--- a/llvm/test/Transforms/ArgumentPromotion/pr42028-recursion.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/pr42028-recursion.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
-; RUN: opt -S < %s -argpromotion | FileCheck %s
+; RUN: opt -S < %s -passes=argpromotion | FileCheck %s
; This shouldn't get infinitely promoted.
diff --git a/llvm/test/Transforms/ArgumentPromotion/profile.ll b/llvm/test/Transforms/ArgumentPromotion/profile.ll
index 04fd580fe074..6fdc65b5354d 100644
--- a/llvm/test/Transforms/ArgumentPromotion/profile.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/profile.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes
-; RUN: opt -argpromotion -mem2reg -S < %s | FileCheck %s
+; RUN: opt -passes=argpromotion,mem2reg -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"
; Checks if !prof metadata is corret in deadargelim.
diff --git a/llvm/test/Transforms/ArgumentPromotion/volatile-atomic.ll b/llvm/test/Transforms/ArgumentPromotion/volatile-atomic.ll
index a8a86294c6a6..2af581f07088 100644
--- a/llvm/test/Transforms/ArgumentPromotion/volatile-atomic.ll
+++ b/llvm/test/Transforms/ArgumentPromotion/volatile-atomic.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -argpromotion < %s | FileCheck %s
+; RUN: opt -S -passes=argpromotion < %s | FileCheck %s
; Make sure volatile and atomic loads are not promoted.
diff --git a/llvm/test/Transforms/CodeExtractor/LoopExtractor_crash.ll b/llvm/test/Transforms/CodeExtractor/LoopExtractor_crash.ll
index ce69a57e2a51..6bd2b9791fff 100644
--- a/llvm/test/Transforms/CodeExtractor/LoopExtractor_crash.ll
+++ b/llvm/test/Transforms/CodeExtractor/LoopExtractor_crash.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -inline -loop-simplify -loop-extract -S | FileCheck %s
-; RUN: opt < %s -argpromotion -loop-simplify -loop-extract -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(inline,loop-simplify),loop-extract' -S | FileCheck %s
+; RUN: opt < %s -passes='cgscc(argpromotion,loop-simplify),loop-extract' -S | FileCheck %s
; This test used to trigger an assert (PR8929).
diff --git a/llvm/test/Transforms/Inline/2009-01-13-RecursiveInlineCrash.ll b/llvm/test/Transforms/Inline/2009-01-13-RecursiveInlineCrash.ll
index 8d8f20feb739..cb7b67ca98f9 100644
--- a/llvm/test/Transforms/Inline/2009-01-13-RecursiveInlineCrash.ll
+++ b/llvm/test/Transforms/Inline/2009-01-13-RecursiveInlineCrash.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -inline -argpromotion -disable-output
+; RUN: opt < %s -passes=inline,argpromotion -disable-output
; ModuleID = '<stdin>'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin9.6"
diff --git a/llvm/test/Transforms/Inline/crash.ll b/llvm/test/Transforms/Inline/crash.ll
index ec1c867bd056..f8cab83f371b 100644
--- a/llvm/test/Transforms/Inline/crash.ll
+++ b/llvm/test/Transforms/Inline/crash.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -inline -argpromotion -instcombine -disable-output
+; RUN: opt < %s -passes=inline,argpromotion,instcombine -disable-output
; This test was failing because the inliner would inline @list_DeleteElement
; into @list_DeleteDuplicates and then into @inf_GetBackwardPartnerLits,
More information about the llvm-commits
mailing list