diff --git a/llvm/lib/Target/AMDGPU/AMDGPU.h b/llvm/lib/Target/AMDGPU/AMDGPU.h index 68a3caf595449..71dd99c0d7a53 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPU.h +++ b/llvm/lib/Target/AMDGPU/AMDGPU.h @@ -98,9 +98,6 @@ void initializeAMDGPUAlwaysInlinePass(PassRegistry&); void initializeAMDGPUAsmPrinterPass(PassRegistry &); -Pass *createAMDGPUAttributorLegacyPass(); -void initializeAMDGPUAttributorLegacyPass(PassRegistry &); - // DPP/Iterative option enables the atomic optimizer with given strategy // whereas None disables the atomic optimizer. enum class ScanOptions { DPP, Iterative, None }; diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp index f4d3a014f9921..fef22c81c9391 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp @@ -1442,36 +1442,6 @@ static bool runImpl(Module &M, AnalysisGetter &AG, TargetMachine &TM, return Changed; } - -class AMDGPUAttributorLegacy : public ModulePass { -public: - AMDGPUAttributorLegacy() : ModulePass(ID) {} - - /// doInitialization - Virtual method overridden by subclasses to do - /// any necessary initialization before any pass is run. - bool doInitialization(Module &) override { - auto *TPC = getAnalysisIfAvailable(); - if (!TPC) - report_fatal_error("TargetMachine is required"); - - TM = &TPC->getTM(); - return false; - } - - bool runOnModule(Module &M) override { - AnalysisGetter AG(this); - return runImpl(M, AG, *TM, /*Options=*/{}, - /*LTOPhase=*/ThinOrFullLTOPhase::None); - } - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.addRequired(); - } - - StringRef getPassName() const override { return "AMDGPU Attributor"; } - TargetMachine *TM; - static char ID; -}; } // namespace PreservedAnalyses llvm::AMDGPUAttributorPass::run(Module &M, @@ -1485,14 +1455,3 @@ PreservedAnalyses llvm::AMDGPUAttributorPass::run(Module &M, return runImpl(M, AG, TM, Options, LTOPhase) ? PreservedAnalyses::none() : PreservedAnalyses::all(); } - -char AMDGPUAttributorLegacy::ID = 0; - -Pass *llvm::createAMDGPUAttributorLegacyPass() { - return new AMDGPUAttributorLegacy(); -} -INITIALIZE_PASS_BEGIN(AMDGPUAttributorLegacy, DEBUG_TYPE, "AMDGPU Attributor", - false, false) -INITIALIZE_PASS_DEPENDENCY(CycleInfoWrapperPass); -INITIALIZE_PASS_END(AMDGPUAttributorLegacy, DEBUG_TYPE, "AMDGPU Attributor", - false, false) diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp index 88613cf5eb4cd..d2e4825cf3c81 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp @@ -517,7 +517,6 @@ extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUTarget() { initializeAMDGPUCtorDtorLoweringLegacyPass(*PR); initializeAMDGPUAlwaysInlinePass(*PR); initializeAMDGPUSwLowerLDSLegacyPass(*PR); - initializeAMDGPUAttributorLegacyPass(*PR); initializeAMDGPUAnnotateUniformValuesLegacyPass(*PR); initializeAMDGPUArgumentUsageInfoPass(*PR); initializeAMDGPUAtomicOptimizerPass(*PR); diff --git a/llvm/test/CodeGen/AMDGPU/propagate-flat-work-group-size.ll b/llvm/test/CodeGen/AMDGPU/propagate-flat-work-group-size.ll index d1e1073530df3..13605a1f72305 100644 --- a/llvm/test/CodeGen/AMDGPU/propagate-flat-work-group-size.ll +++ b/llvm/test/CodeGen/AMDGPU/propagate-flat-work-group-size.ll @@ -1,5 +1,4 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-globals -; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -amdgpu-attributor %s | FileCheck %s ; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-attributor %s | FileCheck %s ; Check propagation of amdgpu-flat-work-group-size attribute.