diff --git a/llvm/bindings/python/llvm/core.py b/llvm/bindings/python/llvm/core.py --- a/llvm/bindings/python/llvm/core.py +++ b/llvm/bindings/python/llvm/core.py @@ -458,9 +458,6 @@ library.LLVMInitializeScalarOpts.argtypes = [PassRegistry] library.LLVMInitializeScalarOpts.restype = None - library.LLVMInitializeObjCARCOpts.argtypes = [PassRegistry] - library.LLVMInitializeObjCARCOpts.restype = None - library.LLVMInitializeVectorization.argtypes = [PassRegistry] library.LLVMInitializeVectorization.restype = None @@ -626,7 +623,6 @@ lib.LLVMInitializeCore(p) lib.LLVMInitializeTransformUtils(p) lib.LLVMInitializeScalarOpts(p) - lib.LLVMInitializeObjCARCOpts(p) lib.LLVMInitializeVectorization(p) lib.LLVMInitializeInstCombine(p) lib.LLVMInitializeIPO(p) diff --git a/llvm/include/llvm-c/Initialization.h b/llvm/include/llvm-c/Initialization.h --- a/llvm/include/llvm-c/Initialization.h +++ b/llvm/include/llvm-c/Initialization.h @@ -33,7 +33,6 @@ void LLVMInitializeCore(LLVMPassRegistryRef R); void LLVMInitializeTransformUtils(LLVMPassRegistryRef R); void LLVMInitializeScalarOpts(LLVMPassRegistryRef R); -void LLVMInitializeObjCARCOpts(LLVMPassRegistryRef R); void LLVMInitializeVectorization(LLVMPassRegistryRef R); void LLVMInitializeInstCombine(LLVMPassRegistryRef R); void LLVMInitializeAggressiveInstCombiner(LLVMPassRegistryRef R); diff --git a/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h b/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h --- a/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h +++ b/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h @@ -76,23 +76,6 @@ ObjCARCAAResult run(Function &F, FunctionAnalysisManager &AM); }; -/// Legacy wrapper pass to provide the ObjCARCAAResult object. -class ObjCARCAAWrapperPass : public ImmutablePass { - std::unique_ptr Result; - -public: - static char ID; - - ObjCARCAAWrapperPass(); - - ObjCARCAAResult &getResult() { return *Result; } - const ObjCARCAAResult &getResult() const { return *Result; } - - bool doInitialization(Module &M) override; - bool doFinalization(Module &M) override; - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - } // namespace objcarc } // namespace llvm diff --git a/llvm/include/llvm/Analysis/Passes.h b/llvm/include/llvm/Analysis/Passes.h --- a/llvm/include/llvm/Analysis/Passes.h +++ b/llvm/include/llvm/Analysis/Passes.h @@ -19,13 +19,6 @@ class ImmutablePass; class ModulePass; - //===--------------------------------------------------------------------===// - // - // createObjCARCAAWrapperPass - This pass implements ObjC-ARC-based - // alias analysis. - // - ImmutablePass *createObjCARCAAWrapperPass(); - //===--------------------------------------------------------------------===// // /// createLazyValueInfoPass - This creates an instance of the LazyValueInfo diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h --- a/llvm/include/llvm/InitializePasses.h +++ b/llvm/include/llvm/InitializePasses.h @@ -27,9 +27,6 @@ /// Initialize all passes linked into the ScalarOpts library. void initializeScalarOpts(PassRegistry&); -/// Initialize all passes linked into the ObjCARCOpts library. -void initializeObjCARCOpts(PassRegistry&); - /// Initialize all passes linked into the Vectorize library. void initializeVectorization(PassRegistry&); @@ -317,11 +314,7 @@ void initializeMustBeExecutedContextPrinterPass(PassRegistry&); void initializeNaryReassociateLegacyPassPass(PassRegistry&); void initializeNewGVNLegacyPassPass(PassRegistry&); -void initializeObjCARCAAWrapperPassPass(PassRegistry&); -void initializeObjCARCAPElimPass(PassRegistry&); void initializeObjCARCContractLegacyPassPass(PassRegistry &); -void initializeObjCARCExpandPass(PassRegistry&); -void initializeObjCARCOptLegacyPassPass(PassRegistry &); void initializeOptimizationRemarkEmitterWrapperPassPass(PassRegistry&); void initializeOptimizePHIsPass(PassRegistry&); void initializePEIPass(PassRegistry&); diff --git a/llvm/include/llvm/LinkAllPasses.h b/llvm/include/llvm/LinkAllPasses.h --- a/llvm/include/llvm/LinkAllPasses.h +++ b/llvm/include/llvm/LinkAllPasses.h @@ -138,11 +138,7 @@ (void) llvm::createLowerInvokePass(); (void) llvm::createLowerSwitchPass(); (void) llvm::createNaryReassociatePass(); - (void) llvm::createObjCARCAAWrapperPass(); - (void) llvm::createObjCARCAPElimPass(); - (void) llvm::createObjCARCExpandPass(); (void) llvm::createObjCARCContractPass(); - (void) llvm::createObjCARCOptPass(); (void) llvm::createPromoteMemoryToRegisterPass(); (void) llvm::createDemoteRegisterToMemoryPass(); (void)llvm::createPostDomOnlyPrinterWrapperPassPass(); diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp --- a/llvm/lib/Analysis/AliasAnalysis.cpp +++ b/llvm/lib/Analysis/AliasAnalysis.cpp @@ -822,7 +822,6 @@ INITIALIZE_PASS_DEPENDENCY(CFLSteensAAWrapperPass) INITIALIZE_PASS_DEPENDENCY(ExternalAAWrapperPass) INITIALIZE_PASS_DEPENDENCY(GlobalsAAWrapperPass) -INITIALIZE_PASS_DEPENDENCY(ObjCARCAAWrapperPass) INITIALIZE_PASS_DEPENDENCY(SCEVAAWrapperPass) INITIALIZE_PASS_DEPENDENCY(ScopedNoAliasAAWrapperPass) INITIALIZE_PASS_DEPENDENCY(TypeBasedAAWrapperPass) @@ -863,9 +862,6 @@ AAR->addAAResult(WrapperPass->getResult()); if (auto *WrapperPass = getAnalysisIfAvailable()) AAR->addAAResult(WrapperPass->getResult()); - if (auto *WrapperPass = - getAnalysisIfAvailable()) - AAR->addAAResult(WrapperPass->getResult()); if (auto *WrapperPass = getAnalysisIfAvailable()) AAR->addAAResult(WrapperPass->getResult()); if (auto *WrapperPass = getAnalysisIfAvailable()) @@ -896,7 +892,6 @@ // the legacy pass manager. AU.addUsedIfAvailable(); AU.addUsedIfAvailable(); - AU.addUsedIfAvailable(); AU.addUsedIfAvailable(); AU.addUsedIfAvailable(); AU.addUsedIfAvailable(); @@ -925,9 +920,6 @@ AAR.addAAResult(WrapperPass->getResult()); if (auto *WrapperPass = P.getAnalysisIfAvailable()) AAR.addAAResult(WrapperPass->getResult()); - if (auto *WrapperPass = - P.getAnalysisIfAvailable()) - AAR.addAAResult(WrapperPass->getResult()); if (auto *WrapperPass = P.getAnalysisIfAvailable()) AAR.addAAResult(WrapperPass->getResult()); if (auto *WrapperPass = P.getAnalysisIfAvailable()) @@ -1021,7 +1013,6 @@ AU.addRequired(); AU.addUsedIfAvailable(); AU.addUsedIfAvailable(); - AU.addUsedIfAvailable(); AU.addUsedIfAvailable(); AU.addUsedIfAvailable(); AU.addUsedIfAvailable(); diff --git a/llvm/lib/Analysis/Analysis.cpp b/llvm/lib/Analysis/Analysis.cpp --- a/llvm/lib/Analysis/Analysis.cpp +++ b/llvm/lib/Analysis/Analysis.cpp @@ -68,7 +68,6 @@ initializeModuleSummaryIndexWrapperPassPass(Registry); initializeMustExecutePrinterPass(Registry); initializeMustBeExecutedContextPrinterPass(Registry); - initializeObjCARCAAWrapperPassPass(Registry); initializeOptimizationRemarkEmitterWrapperPassPass(Registry); initializePhiValuesWrapperPassPass(Registry); initializePostDominatorTreeWrapperPassPass(Registry); diff --git a/llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp b/llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp --- a/llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp +++ b/llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp @@ -137,29 +137,3 @@ ObjCARCAAResult ObjCARCAA::run(Function &F, FunctionAnalysisManager &AM) { return ObjCARCAAResult(F.getParent()->getDataLayout()); } - -char ObjCARCAAWrapperPass::ID = 0; -INITIALIZE_PASS(ObjCARCAAWrapperPass, "objc-arc-aa", - "ObjC-ARC-Based Alias Analysis", false, true) - -ImmutablePass *llvm::createObjCARCAAWrapperPass() { - return new ObjCARCAAWrapperPass(); -} - -ObjCARCAAWrapperPass::ObjCARCAAWrapperPass() : ImmutablePass(ID) { - initializeObjCARCAAWrapperPassPass(*PassRegistry::getPassRegistry()); -} - -bool ObjCARCAAWrapperPass::doInitialization(Module &M) { - Result.reset(new ObjCARCAAResult(M.getDataLayout())); - return false; -} - -bool ObjCARCAAWrapperPass::doFinalization(Module &M) { - Result.reset(); - return false; -} - -void ObjCARCAAWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesAll(); -} diff --git a/llvm/lib/CodeGen/CMakeLists.txt b/llvm/lib/CodeGen/CMakeLists.txt --- a/llvm/lib/CodeGen/CMakeLists.txt +++ b/llvm/lib/CodeGen/CMakeLists.txt @@ -255,6 +255,7 @@ BitWriter Core MC + ObjCARC ProfileData Scalar Support diff --git a/llvm/lib/CodeGen/CodeGen.cpp b/llvm/lib/CodeGen/CodeGen.cpp --- a/llvm/lib/CodeGen/CodeGen.cpp +++ b/llvm/lib/CodeGen/CodeGen.cpp @@ -89,6 +89,7 @@ initializeMachineSchedulerPass(Registry); initializeMachineSinkingPass(Registry); initializeMachineVerifierPassPass(Registry); + initializeObjCARCContractLegacyPassPass(Registry); initializeOptimizePHIsPass(Registry); initializePEIPass(Registry); initializePHIEliminationPass(Registry); diff --git a/llvm/lib/Transforms/ObjCARC/ObjCARC.cpp b/llvm/lib/Transforms/ObjCARC/ObjCARC.cpp --- a/llvm/lib/Transforms/ObjCARC/ObjCARC.cpp +++ b/llvm/lib/Transforms/ObjCARC/ObjCARC.cpp @@ -13,34 +13,14 @@ //===----------------------------------------------------------------------===// #include "ObjCARC.h" -#include "llvm-c/Initialization.h" #include "llvm/Analysis/ObjCARCUtil.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Instructions.h" -#include "llvm/InitializePasses.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" -namespace llvm { - class PassRegistry; -} - using namespace llvm; using namespace llvm::objcarc; -/// initializeObjCARCOptsPasses - Initialize all passes linked into the -/// ObjCARCOpts library. -void llvm::initializeObjCARCOpts(PassRegistry &Registry) { - initializeObjCARCAAWrapperPassPass(Registry); - initializeObjCARCAPElimPass(Registry); - initializeObjCARCExpandPass(Registry); - initializeObjCARCContractLegacyPassPass(Registry); - initializeObjCARCOptLegacyPassPass(Registry); -} - -void LLVMInitializeObjCARCOpts(LLVMPassRegistryRef R) { - initializeObjCARCOpts(*unwrap(R)); -} - CallInst *objcarc::createCallInstWithColors( FunctionCallee Func, ArrayRef Args, const Twine &NameStr, Instruction *InsertBefore, diff --git a/llvm/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp b/llvm/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp --- a/llvm/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp +++ b/llvm/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp @@ -29,8 +29,6 @@ #include "llvm/IR/Constants.h" #include "llvm/IR/InstrTypes.h" #include "llvm/IR/PassManager.h" -#include "llvm/InitializePasses.h" -#include "llvm/Pass.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Transforms/ObjCARC.h" @@ -147,35 +145,8 @@ return Changed; } -/// Autorelease pool elimination. -class ObjCARCAPElim : public ModulePass { - void getAnalysisUsage(AnalysisUsage &AU) const override; - bool runOnModule(Module &M) override; - -public: - static char ID; - ObjCARCAPElim() : ModulePass(ID) { - initializeObjCARCAPElimPass(*PassRegistry::getPassRegistry()); - } -}; } // namespace -char ObjCARCAPElim::ID = 0; -INITIALIZE_PASS(ObjCARCAPElim, "objc-arc-apelim", - "ObjC ARC autorelease pool elimination", false, false) - -Pass *llvm::createObjCARCAPElimPass() { return new ObjCARCAPElim(); } - -void ObjCARCAPElim::getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesCFG(); -} - -bool ObjCARCAPElim::runOnModule(Module &M) { - if (skipModule(M)) - return false; - return runImpl(M); -} - PreservedAnalyses ObjCARCAPElimPass::run(Module &M, ModuleAnalysisManager &AM) { if (!runImpl(M)) return PreservedAnalyses::all(); diff --git a/llvm/lib/Transforms/ObjCARC/ObjCARCExpand.cpp b/llvm/lib/Transforms/ObjCARC/ObjCARCExpand.cpp --- a/llvm/lib/Transforms/ObjCARC/ObjCARCExpand.cpp +++ b/llvm/lib/Transforms/ObjCARC/ObjCARCExpand.cpp @@ -29,9 +29,6 @@ #include "llvm/IR/Instructions.h" #include "llvm/IR/PassManager.h" #include "llvm/IR/Value.h" -#include "llvm/InitializePasses.h" -#include "llvm/Pass.h" -#include "llvm/PassRegistry.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" @@ -89,31 +86,8 @@ return Changed; } -/// Early ARC transformations. -class ObjCARCExpand : public FunctionPass { - void getAnalysisUsage(AnalysisUsage &AU) const override; - bool runOnFunction(Function &F) override; - -public: - static char ID; - ObjCARCExpand() : FunctionPass(ID) { - initializeObjCARCExpandPass(*PassRegistry::getPassRegistry()); - } -}; } // namespace -char ObjCARCExpand::ID = 0; -INITIALIZE_PASS(ObjCARCExpand, "objc-arc-expand", "ObjC ARC expansion", false, - false) - -Pass *llvm::createObjCARCExpandPass() { return new ObjCARCExpand(); } - -void ObjCARCExpand::getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesCFG(); -} - -bool ObjCARCExpand::runOnFunction(Function &F) { return runImpl(F); } - PreservedAnalyses ObjCARCExpandPass::run(Function &F, FunctionAnalysisManager &AM) { if (!runImpl(F)) diff --git a/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp b/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp --- a/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp +++ b/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp @@ -58,8 +58,6 @@ #include "llvm/IR/Type.h" #include "llvm/IR/User.h" #include "llvm/IR/Value.h" -#include "llvm/InitializePasses.h" -#include "llvm/Pass.h" #include "llvm/Support/Casting.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" @@ -579,44 +577,8 @@ void releaseMemory(); bool hasCFGChanged() const { return CFGChanged; } }; - -/// The main ARC optimization pass. -class ObjCARCOptLegacyPass : public FunctionPass { -public: - ObjCARCOptLegacyPass() : FunctionPass(ID) { - initializeObjCARCOptLegacyPassPass(*PassRegistry::getPassRegistry()); - } - void getAnalysisUsage(AnalysisUsage &AU) const override; - bool doInitialization(Module &M) override { - OCAO.init(M); - return false; - } - bool runOnFunction(Function &F) override { - return OCAO.run(F, getAnalysis().getAAResults()); - } - void releaseMemory() override { OCAO.releaseMemory(); } - static char ID; - -private: - ObjCARCOpt OCAO; -}; } // end anonymous namespace -char ObjCARCOptLegacyPass::ID = 0; - -INITIALIZE_PASS_BEGIN(ObjCARCOptLegacyPass, "objc-arc", "ObjC ARC optimization", - false, false) -INITIALIZE_PASS_DEPENDENCY(ObjCARCAAWrapperPass) -INITIALIZE_PASS_END(ObjCARCOptLegacyPass, "objc-arc", "ObjC ARC optimization", - false, false) - -Pass *llvm::createObjCARCOptPass() { return new ObjCARCOptLegacyPass(); } - -void ObjCARCOptLegacyPass::getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired(); - AU.addRequired(); -} - /// Turn objc_retainAutoreleasedReturnValue into objc_retain if the operand is /// not a return value. bool diff --git a/llvm/test/Transforms/ObjCARC/allocas.ll b/llvm/test/Transforms/ObjCARC/allocas.ll --- a/llvm/test/Transforms/ObjCARC/allocas.ll +++ b/llvm/test/Transforms/ObjCARC/allocas.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck %s declare i8* @llvm.objc.retain(i8*) declare i8* @llvm.objc.retainAutoreleasedReturnValue(i8*) diff --git a/llvm/test/Transforms/ObjCARC/apelim.ll b/llvm/test/Transforms/ObjCARC/apelim.ll --- a/llvm/test/Transforms/ObjCARC/apelim.ll +++ b/llvm/test/Transforms/ObjCARC/apelim.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc-apelim < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc-apelim < %s | FileCheck %s ; RUN: opt -S -passes=objc-arc-apelim < %s | FileCheck %s ; rdar://10227311 diff --git a/llvm/test/Transforms/ObjCARC/basic.ll b/llvm/test/Transforms/ObjCARC/basic.ll --- a/llvm/test/Transforms/ObjCARC/basic.ll +++ b/llvm/test/Transforms/ObjCARC/basic.ll @@ -1,4 +1,3 @@ -; RUN: opt -basic-aa -objc-arc -S < %s | FileCheck %s ; RUN: opt -aa-pipeline=basic-aa -passes=objc-arc -S < %s | FileCheck %s target datalayout = "e-p:64:64:64" diff --git a/llvm/test/Transforms/ObjCARC/cfg-hazards.ll b/llvm/test/Transforms/ObjCARC/cfg-hazards.ll --- a/llvm/test/Transforms/ObjCARC/cfg-hazards.ll +++ b/llvm/test/Transforms/ObjCARC/cfg-hazards.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc < %s | FileCheck %s ; rdar://9503416 ; Detect loop boundaries and don't move retains and releases diff --git a/llvm/test/Transforms/ObjCARC/clang-arc-use-barrier.ll b/llvm/test/Transforms/ObjCARC/clang-arc-use-barrier.ll --- a/llvm/test/Transforms/ObjCARC/clang-arc-use-barrier.ll +++ b/llvm/test/Transforms/ObjCARC/clang-arc-use-barrier.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc -S %s | FileCheck %s +; RUN: opt -passes=objc-arc -S %s | FileCheck %s %0 = type opaque diff --git a/llvm/test/Transforms/ObjCARC/code-motion.ll b/llvm/test/Transforms/ObjCARC/code-motion.ll --- a/llvm/test/Transforms/ObjCARC/code-motion.ll +++ b/llvm/test/Transforms/ObjCARC/code-motion.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck %s declare void @alterRefCount() declare void @use(i8*) diff --git a/llvm/test/Transforms/ObjCARC/comdat-ipo.ll b/llvm/test/Transforms/ObjCARC/comdat-ipo.ll --- a/llvm/test/Transforms/ObjCARC/comdat-ipo.ll +++ b/llvm/test/Transforms/ObjCARC/comdat-ipo.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc-apelim < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc-apelim < %s | FileCheck %s ; See PR26774 diff --git a/llvm/test/Transforms/ObjCARC/contract-attached-call-no-marker.ll b/llvm/test/Transforms/ObjCARC/contract-attached-call-no-marker.ll --- a/llvm/test/Transforms/ObjCARC/contract-attached-call-no-marker.ll +++ b/llvm/test/Transforms/ObjCARC/contract-attached-call-no-marker.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc-contract -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s ; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s ; CHECK-LABEL: define void @test0() { diff --git a/llvm/test/Transforms/ObjCARC/contract-catchswitch.ll b/llvm/test/Transforms/ObjCARC/contract-catchswitch.ll --- a/llvm/test/Transforms/ObjCARC/contract-catchswitch.ll +++ b/llvm/test/Transforms/ObjCARC/contract-catchswitch.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc-contract < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc-contract < %s | FileCheck %s target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32" target triple = "i686--windows-msvc19.11.0" diff --git a/llvm/test/Transforms/ObjCARC/contract-end-of-use-list.ll b/llvm/test/Transforms/ObjCARC/contract-end-of-use-list.ll --- a/llvm/test/Transforms/ObjCARC/contract-end-of-use-list.ll +++ b/llvm/test/Transforms/ObjCARC/contract-end-of-use-list.ll @@ -1,4 +1,4 @@ -; RUN: opt -S < %s -objc-arc-expand -objc-arc-contract | FileCheck %s +; RUN: opt -S < %s -passes=objc-arc-expand -passes=objc-arc-contract | FileCheck %s ; Don't crash. Reproducer for a use_iterator bug from r203364. ; rdar://problem/16333235 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/Transforms/ObjCARC/contract-marker-funclet.ll b/llvm/test/Transforms/ObjCARC/contract-marker-funclet.ll --- a/llvm/test/Transforms/ObjCARC/contract-marker-funclet.ll +++ b/llvm/test/Transforms/ObjCARC/contract-marker-funclet.ll @@ -1,4 +1,4 @@ -; RUN: opt -mtriple=i686-unknown-windows-msvc -objc-arc-contract -S -o - %s | FileCheck %s +; RUN: opt -mtriple=i686-unknown-windows-msvc -passes=objc-arc-contract -S -o - %s | FileCheck %s ; Generated (and lightly modified and cleaned up) from the following source: ; id f(); diff --git a/llvm/test/Transforms/ObjCARC/contract-marker.ll b/llvm/test/Transforms/ObjCARC/contract-marker.ll --- a/llvm/test/Transforms/ObjCARC/contract-marker.ll +++ b/llvm/test/Transforms/ObjCARC/contract-marker.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc-contract < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc-contract < %s | FileCheck %s ; CHECK-LABEL: define void @foo() { ; CHECK: %call = tail call i32* @qux() diff --git a/llvm/test/Transforms/ObjCARC/contract-replace-arg-use.ll b/llvm/test/Transforms/ObjCARC/contract-replace-arg-use.ll --- a/llvm/test/Transforms/ObjCARC/contract-replace-arg-use.ll +++ b/llvm/test/Transforms/ObjCARC/contract-replace-arg-use.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc-contract -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s declare i8* @llvm.objc.autoreleaseReturnValue(i8*) declare i8* @foo1() diff --git a/llvm/test/Transforms/ObjCARC/contract-rv-attr.ll b/llvm/test/Transforms/ObjCARC/contract-rv-attr.ll --- a/llvm/test/Transforms/ObjCARC/contract-rv-attr.ll +++ b/llvm/test/Transforms/ObjCARC/contract-rv-attr.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc-contract -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s ; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s ; CHECK-LABEL: define void @test0() { diff --git a/llvm/test/Transforms/ObjCARC/contract-storestrong-funclet.ll b/llvm/test/Transforms/ObjCARC/contract-storestrong-funclet.ll --- a/llvm/test/Transforms/ObjCARC/contract-storestrong-funclet.ll +++ b/llvm/test/Transforms/ObjCARC/contract-storestrong-funclet.ll @@ -1,4 +1,4 @@ -; RUN: opt -mtriple=i686-unknown-windows-msvc -objc-arc-contract -S -o - %s | FileCheck %s +; RUN: opt -mtriple=i686-unknown-windows-msvc -passes=objc-arc-contract -S -o - %s | FileCheck %s declare void @f() declare i32 @__CxxFrameHandler3(...) diff --git a/llvm/test/Transforms/ObjCARC/contract-storestrong-ivar.ll b/llvm/test/Transforms/ObjCARC/contract-storestrong-ivar.ll --- a/llvm/test/Transforms/ObjCARC/contract-storestrong-ivar.ll +++ b/llvm/test/Transforms/ObjCARC/contract-storestrong-ivar.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc-contract -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s ; CHECK: tail call void @llvm.objc.storeStrong(i8** diff --git a/llvm/test/Transforms/ObjCARC/contract-storestrong.ll b/llvm/test/Transforms/ObjCARC/contract-storestrong.ll --- a/llvm/test/Transforms/ObjCARC/contract-storestrong.ll +++ b/llvm/test/Transforms/ObjCARC/contract-storestrong.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc-contract -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s target datalayout = "e-p:64:64:64" diff --git a/llvm/test/Transforms/ObjCARC/contract-testcases.ll b/llvm/test/Transforms/ObjCARC/contract-testcases.ll --- a/llvm/test/Transforms/ObjCARC/contract-testcases.ll +++ b/llvm/test/Transforms/ObjCARC/contract-testcases.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc-contract -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s ; rdar://9511608 %0 = type opaque diff --git a/llvm/test/Transforms/ObjCARC/contract.ll b/llvm/test/Transforms/ObjCARC/contract.ll --- a/llvm/test/Transforms/ObjCARC/contract.ll +++ b/llvm/test/Transforms/ObjCARC/contract.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc-contract -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s ; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s target datalayout = "e-p:64:64:64" diff --git a/llvm/test/Transforms/ObjCARC/empty-block.ll b/llvm/test/Transforms/ObjCARC/empty-block.ll --- a/llvm/test/Transforms/ObjCARC/empty-block.ll +++ b/llvm/test/Transforms/ObjCARC/empty-block.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc < %s | FileCheck %s ; rdar://10210274 %0 = type opaque diff --git a/llvm/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll b/llvm/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll --- a/llvm/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll +++ b/llvm/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck %s ; rdar://11744105 ; bugzilla://14584 diff --git a/llvm/test/Transforms/ObjCARC/escape.ll b/llvm/test/Transforms/ObjCARC/escape.ll --- a/llvm/test/Transforms/ObjCARC/escape.ll +++ b/llvm/test/Transforms/ObjCARC/escape.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck %s ; rdar://11229925 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" diff --git a/llvm/test/Transforms/ObjCARC/expand.ll b/llvm/test/Transforms/ObjCARC/expand.ll --- a/llvm/test/Transforms/ObjCARC/expand.ll +++ b/llvm/test/Transforms/ObjCARC/expand.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc-expand -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc-expand -S < %s | FileCheck %s ; RUN: opt -passes=objc-arc-expand -S < %s | FileCheck %s target datalayout = "e-p:64:64:64" diff --git a/llvm/test/Transforms/ObjCARC/funclet.ll b/llvm/test/Transforms/ObjCARC/funclet.ll --- a/llvm/test/Transforms/ObjCARC/funclet.ll +++ b/llvm/test/Transforms/ObjCARC/funclet.ll @@ -1,4 +1,4 @@ -; RUN: opt -mtriple x86_64-unknown-windows-msvc -objc-arc -S -o - %s | FileCheck %s +; RUN: opt -mtriple x86_64-unknown-windows-msvc -passes=objc-arc -S -o - %s | FileCheck %s ; bool g(); ; id h(); diff --git a/llvm/test/Transforms/ObjCARC/gvn.ll b/llvm/test/Transforms/ObjCARC/gvn.ll --- a/llvm/test/Transforms/ObjCARC/gvn.ll +++ b/llvm/test/Transforms/ObjCARC/gvn.ll @@ -1,4 +1,3 @@ -; RUN: opt -S -basic-aa -objc-arc-aa -gvn < %s | FileCheck %s ; RUN: opt -S -aa-pipeline=basic-aa,objc-arc-aa -passes=gvn < %s | FileCheck %s @x = common global i8* null, align 8 diff --git a/llvm/test/Transforms/ObjCARC/inert-global.ll b/llvm/test/Transforms/ObjCARC/inert-global.ll --- a/llvm/test/Transforms/ObjCARC/inert-global.ll +++ b/llvm/test/Transforms/ObjCARC/inert-global.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck %s %0 = type opaque %struct.__NSConstantString_tag = type { i32*, i32, i8*, i64 } diff --git a/llvm/test/Transforms/ObjCARC/inlined-autorelease-return-value.ll b/llvm/test/Transforms/ObjCARC/inlined-autorelease-return-value.ll --- a/llvm/test/Transforms/ObjCARC/inlined-autorelease-return-value.ll +++ b/llvm/test/Transforms/ObjCARC/inlined-autorelease-return-value.ll @@ -1,4 +1,4 @@ -; RUN: opt -basic-aa -objc-arc -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck %s target datalayout = "e-p:64:64:64" diff --git a/llvm/test/Transforms/ObjCARC/intrinsic-use-isolated.ll b/llvm/test/Transforms/ObjCARC/intrinsic-use-isolated.ll --- a/llvm/test/Transforms/ObjCARC/intrinsic-use-isolated.ll +++ b/llvm/test/Transforms/ObjCARC/intrinsic-use-isolated.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc-contract -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s ; This file makes sure that clang.arc.used is removed even if no other ARC ; interesting calls are in the module. diff --git a/llvm/test/Transforms/ObjCARC/intrinsic-use.ll b/llvm/test/Transforms/ObjCARC/intrinsic-use.ll --- a/llvm/test/Transforms/ObjCARC/intrinsic-use.ll +++ b/llvm/test/Transforms/ObjCARC/intrinsic-use.ll @@ -1,4 +1,4 @@ -; RUN: opt -basic-aa -objc-arc -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck %s target datalayout = "e-p:64:64:64" diff --git a/llvm/test/Transforms/ObjCARC/invoke-2.ll b/llvm/test/Transforms/ObjCARC/invoke-2.ll --- a/llvm/test/Transforms/ObjCARC/invoke-2.ll +++ b/llvm/test/Transforms/ObjCARC/invoke-2.ll @@ -1,4 +1,4 @@ -; RUN: opt -mtriple x86_64-unknown-windows-msvc -objc-arc -o - %s | llvm-dis -o - - | FileCheck %s +; RUN: opt -mtriple x86_64-unknown-windows-msvc -passes=objc-arc -o - %s | llvm-dis -o - - | FileCheck %s target triple = "x86_64-unknown-windows-msvc" diff --git a/llvm/test/Transforms/ObjCARC/invoke.ll b/llvm/test/Transforms/ObjCARC/invoke.ll --- a/llvm/test/Transforms/ObjCARC/invoke.ll +++ b/llvm/test/Transforms/ObjCARC/invoke.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc < %s | FileCheck %s declare i8* @llvm.objc.retain(i8*) declare void @llvm.objc.release(i8*) diff --git a/llvm/test/Transforms/ObjCARC/move-and-form-retain-autorelease.ll b/llvm/test/Transforms/ObjCARC/move-and-form-retain-autorelease.ll --- a/llvm/test/Transforms/ObjCARC/move-and-form-retain-autorelease.ll +++ b/llvm/test/Transforms/ObjCARC/move-and-form-retain-autorelease.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc-contract < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc-contract < %s | FileCheck %s ; The optimizer should be able to move the autorelease past a control triangle ; and various scary looking things and fold it into an objc_retainAutorelease. diff --git a/llvm/test/Transforms/ObjCARC/move-and-merge-autorelease.ll b/llvm/test/Transforms/ObjCARC/move-and-merge-autorelease.ll --- a/llvm/test/Transforms/ObjCARC/move-and-merge-autorelease.ll +++ b/llvm/test/Transforms/ObjCARC/move-and-merge-autorelease.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc -objc-arc-contract < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc -passes=objc-arc-contract < %s | FileCheck %s ; The optimizer should be able to move the autorelease past two phi nodes ; and fold it with the release in bb65. diff --git a/llvm/test/Transforms/ObjCARC/nested.ll b/llvm/test/Transforms/ObjCARC/nested.ll --- a/llvm/test/Transforms/ObjCARC/nested.ll +++ b/llvm/test/Transforms/ObjCARC/nested.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck %s %struct.__objcFastEnumerationState = type { i64, i8**, i64*, [5 x i64] } diff --git a/llvm/test/Transforms/ObjCARC/opt-catchswitch.ll b/llvm/test/Transforms/ObjCARC/opt-catchswitch.ll --- a/llvm/test/Transforms/ObjCARC/opt-catchswitch.ll +++ b/llvm/test/Transforms/ObjCARC/opt-catchswitch.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc < %s | FileCheck %s target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32" target triple = "i686--windows-msvc" diff --git a/llvm/test/Transforms/ObjCARC/opt-max-ptr-states.ll b/llvm/test/Transforms/ObjCARC/opt-max-ptr-states.ll --- a/llvm/test/Transforms/ObjCARC/opt-max-ptr-states.ll +++ b/llvm/test/Transforms/ObjCARC/opt-max-ptr-states.ll @@ -1,5 +1,5 @@ -; RUN: opt -objc-arc -S < %s | FileCheck -check-prefix=ENABLE -check-prefix=CHECK %s -; RUN: opt -objc-arc -arc-opt-max-ptr-states=1 -S < %s | FileCheck -check-prefix=DISABLE -check-prefix=CHECK %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck -check-prefix=ENABLE -check-prefix=CHECK %s +; RUN: opt -passes=objc-arc -arc-opt-max-ptr-states=1 -S < %s | FileCheck -check-prefix=DISABLE -check-prefix=CHECK %s @g0 = common global i8* null, align 8 diff --git a/llvm/test/Transforms/ObjCARC/path-overflow.ll b/llvm/test/Transforms/ObjCARC/path-overflow.ll --- a/llvm/test/Transforms/ObjCARC/path-overflow.ll +++ b/llvm/test/Transforms/ObjCARC/path-overflow.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc -S < %s +; RUN: opt -passes=objc-arc -S < %s ; rdar://12277446 ; rdar://12480535 ; rdar://14590914 diff --git a/llvm/test/Transforms/ObjCARC/pointer-types.ll b/llvm/test/Transforms/ObjCARC/pointer-types.ll --- a/llvm/test/Transforms/ObjCARC/pointer-types.ll +++ b/llvm/test/Transforms/ObjCARC/pointer-types.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck %s ; Don't hoist @llvm.objc.release past a use of its pointer, even ; if the use has function type, because clang uses function types diff --git a/llvm/test/Transforms/ObjCARC/post-inlining.ll b/llvm/test/Transforms/ObjCARC/post-inlining.ll --- a/llvm/test/Transforms/ObjCARC/post-inlining.ll +++ b/llvm/test/Transforms/ObjCARC/post-inlining.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc < %s | FileCheck %s declare void @use_pointer(i8*) declare i8* @returner() diff --git a/llvm/test/Transforms/ObjCARC/pr12270.ll b/llvm/test/Transforms/ObjCARC/pr12270.ll --- a/llvm/test/Transforms/ObjCARC/pr12270.ll +++ b/llvm/test/Transforms/ObjCARC/pr12270.ll @@ -1,4 +1,4 @@ -; RUN: opt -disable-output -objc-arc-contract < %s +; RUN: opt -disable-output -passes=objc-arc-contract < %s ; test that we don't crash on unreachable code %2 = type opaque diff --git a/llvm/test/Transforms/ObjCARC/retain-block-side-effects.ll b/llvm/test/Transforms/ObjCARC/retain-block-side-effects.ll --- a/llvm/test/Transforms/ObjCARC/retain-block-side-effects.ll +++ b/llvm/test/Transforms/ObjCARC/retain-block-side-effects.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc-aa -basic-aa -gvn < %s | FileCheck %s +; RUN: opt -S -aa-pipeline=objc-arc-aa,basic-aa -passes=gvn < %s | FileCheck %s ; rdar://10050579 ; objc_retainBlock stores into %repeater so the load from after the diff --git a/llvm/test/Transforms/ObjCARC/retain-not-declared.ll b/llvm/test/Transforms/ObjCARC/retain-not-declared.ll --- a/llvm/test/Transforms/ObjCARC/retain-not-declared.ll +++ b/llvm/test/Transforms/ObjCARC/retain-not-declared.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc -objc-arc-contract < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc,objc-arc-contract < %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" declare i8* @llvm.objc.unretainedObject(i8*) diff --git a/llvm/test/Transforms/ObjCARC/rle-s2l.ll b/llvm/test/Transforms/ObjCARC/rle-s2l.ll --- a/llvm/test/Transforms/ObjCARC/rle-s2l.ll +++ b/llvm/test/Transforms/ObjCARC/rle-s2l.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -basic-aa -objc-arc < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc < %s | FileCheck %s declare i8* @llvm.objc.loadWeak(i8**) declare i8* @llvm.objc.loadWeakRetained(i8**) diff --git a/llvm/test/Transforms/ObjCARC/rv.ll b/llvm/test/Transforms/ObjCARC/rv.ll --- a/llvm/test/Transforms/ObjCARC/rv.ll +++ b/llvm/test/Transforms/ObjCARC/rv.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck %s target datalayout = "e-p:64:64:64" diff --git a/llvm/test/Transforms/ObjCARC/split-backedge.ll b/llvm/test/Transforms/ObjCARC/split-backedge.ll --- a/llvm/test/Transforms/ObjCARC/split-backedge.ll +++ b/llvm/test/Transforms/ObjCARC/split-backedge.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -objc-arc < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc < %s | FileCheck %s ; Handle a retain+release pair entirely contained within a split loop backedge. ; rdar://11256239 diff --git a/llvm/test/Transforms/ObjCARC/tail-call-invariant-enforcement.ll b/llvm/test/Transforms/ObjCARC/tail-call-invariant-enforcement.ll --- a/llvm/test/Transforms/ObjCARC/tail-call-invariant-enforcement.ll +++ b/llvm/test/Transforms/ObjCARC/tail-call-invariant-enforcement.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck %s declare void @llvm.objc.release(i8* %x) declare i8* @llvm.objc.retain(i8* %x) diff --git a/llvm/test/Transforms/ObjCARC/unsafe-claim-rv.ll b/llvm/test/Transforms/ObjCARC/unsafe-claim-rv.ll --- a/llvm/test/Transforms/ObjCARC/unsafe-claim-rv.ll +++ b/llvm/test/Transforms/ObjCARC/unsafe-claim-rv.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck %s ; Generated by compiling: ; diff --git a/llvm/test/Transforms/ObjCARC/weak-contract.ll b/llvm/test/Transforms/ObjCARC/weak-contract.ll --- a/llvm/test/Transforms/ObjCARC/weak-contract.ll +++ b/llvm/test/Transforms/ObjCARC/weak-contract.ll @@ -1,4 +1,4 @@ -; RUN: opt -objc-arc-contract -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s declare i8* @llvm.objc.initWeak(i8**, i8*) diff --git a/llvm/test/Transforms/ObjCARC/weak-copies.ll b/llvm/test/Transforms/ObjCARC/weak-copies.ll --- a/llvm/test/Transforms/ObjCARC/weak-copies.ll +++ b/llvm/test/Transforms/ObjCARC/weak-copies.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -basic-aa -objc-arc < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc < %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-darwin11.0.0" diff --git a/llvm/test/Transforms/ObjCARC/weak-dce.ll b/llvm/test/Transforms/ObjCARC/weak-dce.ll --- a/llvm/test/Transforms/ObjCARC/weak-dce.ll +++ b/llvm/test/Transforms/ObjCARC/weak-dce.ll @@ -1,4 +1,4 @@ -; RUN: opt -S -basic-aa -objc-arc < %s | FileCheck %s +; RUN: opt -S -passes=objc-arc < %s | FileCheck %s ; rdar://11434915 ; Delete the weak calls and replace them with just the net retain. diff --git a/llvm/test/Transforms/ObjCARC/weak.ll b/llvm/test/Transforms/ObjCARC/weak.ll --- a/llvm/test/Transforms/ObjCARC/weak.ll +++ b/llvm/test/Transforms/ObjCARC/weak.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -objc-arc -S < %s | FileCheck %s +; RUN: opt -passes=objc-arc -S < %s | FileCheck %s declare i8* @llvm.objc.initWeak(i8**, i8*) declare i8* @llvm.objc.storeWeak(i8**, i8*) diff --git a/llvm/tools/bugpoint/bugpoint.cpp b/llvm/tools/bugpoint/bugpoint.cpp --- a/llvm/tools/bugpoint/bugpoint.cpp +++ b/llvm/tools/bugpoint/bugpoint.cpp @@ -143,7 +143,6 @@ PassRegistry &Registry = *PassRegistry::getPassRegistry(); initializeCore(Registry); initializeScalarOpts(Registry); - initializeObjCARCOpts(Registry); initializeVectorization(Registry); initializeIPO(Registry); initializeAnalysis(Registry); diff --git a/llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp b/llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp --- a/llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp +++ b/llvm/tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp @@ -192,7 +192,6 @@ PassRegistry &Registry = *PassRegistry::getPassRegistry(); initializeCore(Registry); initializeScalarOpts(Registry); - initializeObjCARCOpts(Registry); initializeVectorization(Registry); initializeIPO(Registry); initializeAnalysis(Registry); diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -494,7 +494,6 @@ PassRegistry &Registry = *PassRegistry::getPassRegistry(); initializeCore(Registry); initializeScalarOpts(Registry); - initializeObjCARCOpts(Registry); initializeVectorization(Registry); initializeIPO(Registry); initializeAnalysis(Registry); diff --git a/llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn --- a/llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn +++ b/llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn @@ -13,6 +13,7 @@ "//llvm/lib/ProfileData", "//llvm/lib/Support", "//llvm/lib/Target", + "//llvm/lib/Transforms/ObjCARC", "//llvm/lib/Transforms/Scalar", "//llvm/lib/Transforms/Utils", ]