Skip to content

Commit 2dcf436

Browse files
authored
AMDGPU: Remove legacy pass manager version of AMDGPUAttributor (#145262)
1 parent 48155f9 commit 2dcf436

File tree

4 files changed

+0
-46
lines changed

4 files changed

+0
-46
lines changed

llvm/lib/Target/AMDGPU/AMDGPU.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ void initializeAMDGPUAlwaysInlinePass(PassRegistry&);
9898

9999
void initializeAMDGPUAsmPrinterPass(PassRegistry &);
100100

101-
Pass *createAMDGPUAttributorLegacyPass();
102-
void initializeAMDGPUAttributorLegacyPass(PassRegistry &);
103-
104101
// DPP/Iterative option enables the atomic optimizer with given strategy
105102
// whereas None disables the atomic optimizer.
106103
enum class ScanOptions { DPP, Iterative, None };

llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,36 +1442,6 @@ static bool runImpl(Module &M, AnalysisGetter &AG, TargetMachine &TM,
14421442

14431443
return Changed;
14441444
}
1445-
1446-
class AMDGPUAttributorLegacy : public ModulePass {
1447-
public:
1448-
AMDGPUAttributorLegacy() : ModulePass(ID) {}
1449-
1450-
/// doInitialization - Virtual method overridden by subclasses to do
1451-
/// any necessary initialization before any pass is run.
1452-
bool doInitialization(Module &) override {
1453-
auto *TPC = getAnalysisIfAvailable<TargetPassConfig>();
1454-
if (!TPC)
1455-
report_fatal_error("TargetMachine is required");
1456-
1457-
TM = &TPC->getTM<TargetMachine>();
1458-
return false;
1459-
}
1460-
1461-
bool runOnModule(Module &M) override {
1462-
AnalysisGetter AG(this);
1463-
return runImpl(M, AG, *TM, /*Options=*/{},
1464-
/*LTOPhase=*/ThinOrFullLTOPhase::None);
1465-
}
1466-
1467-
void getAnalysisUsage(AnalysisUsage &AU) const override {
1468-
AU.addRequired<CycleInfoWrapperPass>();
1469-
}
1470-
1471-
StringRef getPassName() const override { return "AMDGPU Attributor"; }
1472-
TargetMachine *TM;
1473-
static char ID;
1474-
};
14751445
} // namespace
14761446

14771447
PreservedAnalyses llvm::AMDGPUAttributorPass::run(Module &M,
@@ -1485,14 +1455,3 @@ PreservedAnalyses llvm::AMDGPUAttributorPass::run(Module &M,
14851455
return runImpl(M, AG, TM, Options, LTOPhase) ? PreservedAnalyses::none()
14861456
: PreservedAnalyses::all();
14871457
}
1488-
1489-
char AMDGPUAttributorLegacy::ID = 0;
1490-
1491-
Pass *llvm::createAMDGPUAttributorLegacyPass() {
1492-
return new AMDGPUAttributorLegacy();
1493-
}
1494-
INITIALIZE_PASS_BEGIN(AMDGPUAttributorLegacy, DEBUG_TYPE, "AMDGPU Attributor",
1495-
false, false)
1496-
INITIALIZE_PASS_DEPENDENCY(CycleInfoWrapperPass);
1497-
INITIALIZE_PASS_END(AMDGPUAttributorLegacy, DEBUG_TYPE, "AMDGPU Attributor",
1498-
false, false)

llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUTarget() {
517517
initializeAMDGPUCtorDtorLoweringLegacyPass(*PR);
518518
initializeAMDGPUAlwaysInlinePass(*PR);
519519
initializeAMDGPUSwLowerLDSLegacyPass(*PR);
520-
initializeAMDGPUAttributorLegacyPass(*PR);
521520
initializeAMDGPUAnnotateUniformValuesLegacyPass(*PR);
522521
initializeAMDGPUArgumentUsageInfoPass(*PR);
523522
initializeAMDGPUAtomicOptimizerPass(*PR);

llvm/test/CodeGen/AMDGPU/propagate-flat-work-group-size.ll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-globals
2-
; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -amdgpu-attributor %s | FileCheck %s
32
; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-attributor %s | FileCheck %s
43

54
; Check propagation of amdgpu-flat-work-group-size attribute.

0 commit comments

Comments
 (0)