diff options
author | Nick Anderson <nickleus27@gmail.com> | 2024-01-04 22:47:56 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-05 13:47:56 +0700 |
commit | e0c554ad87d18dcbfcb9b6485d0da800ae1338d1 (patch) | |
tree | d7fe8ec30c017801f4cd9cb4ac60a8ac36dfcab3 /llvm/lib/CodeGen/BasicBlockSections.cpp | |
parent | 668165002543fd3a88413a5c2601774395bfd10e (diff) | |
download | llvm-e0c554ad87d18dcbfcb9b6485d0da800ae1338d1.zip llvm-e0c554ad87d18dcbfcb9b6485d0da800ae1338d1.tar.gz llvm-e0c554ad87d18dcbfcb9b6485d0da800ae1338d1.tar.bz2 |
Port CodeGenPrepare to new pass manager (and BasicBlockSectionsProfil… (#75380)
Port CodeGenPrepare to new pass manager and dependency
BasicBlockSectionsProfileReader
Fixes: #64560
Co-authored-by: Krishna-13-cyber <84722531+Krishna-13-cyber@users.noreply.github.com>
Diffstat (limited to 'llvm/lib/CodeGen/BasicBlockSections.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BasicBlockSections.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/BasicBlockSections.cpp b/llvm/lib/CodeGen/BasicBlockSections.cpp index 42997d2..94b5a50 100644 --- a/llvm/lib/CodeGen/BasicBlockSections.cpp +++ b/llvm/lib/CodeGen/BasicBlockSections.cpp @@ -103,7 +103,7 @@ class BasicBlockSections : public MachineFunctionPass { public: static char ID; - BasicBlockSectionsProfileReader *BBSectionsProfileReader = nullptr; + BasicBlockSectionsProfileReaderWrapperPass *BBSectionsProfileReader = nullptr; BasicBlockSections() : MachineFunctionPass(ID) { initializeBasicBlockSectionsPass(*PassRegistry::getPassRegistry()); @@ -128,7 +128,7 @@ INITIALIZE_PASS_BEGIN( "Prepares for basic block sections, by splitting functions " "into clusters of basic blocks.", false, false) -INITIALIZE_PASS_DEPENDENCY(BasicBlockSectionsProfileReader) +INITIALIZE_PASS_DEPENDENCY(BasicBlockSectionsProfileReaderWrapperPass) INITIALIZE_PASS_END(BasicBlockSections, "bbsections-prepare", "Prepares for basic block sections, by splitting functions " "into clusters of basic blocks.", @@ -306,7 +306,7 @@ bool BasicBlockSections::runOnMachineFunction(MachineFunction &MF) { DenseMap<UniqueBBID, BBClusterInfo> FuncClusterInfo; if (BBSectionsType == BasicBlockSection::List) { auto [HasProfile, ClusterInfo] = - getAnalysis<BasicBlockSectionsProfileReader>() + getAnalysis<BasicBlockSectionsProfileReaderWrapperPass>() .getClusterInfoForFunction(MF.getName()); if (!HasProfile) return false; @@ -362,7 +362,7 @@ bool BasicBlockSections::runOnMachineFunction(MachineFunction &MF) { void BasicBlockSections::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); - AU.addRequired<BasicBlockSectionsProfileReader>(); + AU.addRequired<BasicBlockSectionsProfileReaderWrapperPass>(); MachineFunctionPass::getAnalysisUsage(AU); } |