@@ -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
14771447PreservedAnalyses 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 )
0 commit comments