diff options
author | Rahul Joshi <rjoshi@nvidia.com> | 2025-04-21 12:36:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-21 12:36:34 -0700 |
commit | 99e4b3927c5b8700b818ca2436f3c8394245e97c (patch) | |
tree | c8bd780452d1450730a303cbc48f3bc038ae8a39 /llvm/lib/Analysis/TargetLibraryInfo.cpp | |
parent | 4b98955680e0aad33cad0e810f1daaa8bc7c0a23 (diff) | |
download | llvm-99e4b3927c5b8700b818ca2436f3c8394245e97c.zip llvm-99e4b3927c5b8700b818ca2436f3c8394245e97c.tar.gz llvm-99e4b3927c5b8700b818ca2436f3c8394245e97c.tar.bz2 |
[LLVM] Cleanup pass initialization for Analysis passes (#135858)
- Do not call pass initialization from pass constructors.
- Instead, pass initialization should happen in the `initializeAnalysis`
function.
- https://github.com/llvm/llvm-project/issues/111767
Diffstat (limited to 'llvm/lib/Analysis/TargetLibraryInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/TargetLibraryInfo.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp index df4720c..e2fd2aa 100644 --- a/llvm/lib/Analysis/TargetLibraryInfo.cpp +++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp @@ -1471,20 +1471,14 @@ unsigned TargetLibraryInfoImpl::getSizeTSize(const Module &M) const { } TargetLibraryInfoWrapperPass::TargetLibraryInfoWrapperPass() - : ImmutablePass(ID), TLA(TargetLibraryInfoImpl()) { - initializeTargetLibraryInfoWrapperPassPass(*PassRegistry::getPassRegistry()); -} + : ImmutablePass(ID), TLA(TargetLibraryInfoImpl()) {} TargetLibraryInfoWrapperPass::TargetLibraryInfoWrapperPass(const Triple &T) - : ImmutablePass(ID), TLA(TargetLibraryInfoImpl(T)) { - initializeTargetLibraryInfoWrapperPassPass(*PassRegistry::getPassRegistry()); -} + : ImmutablePass(ID), TLA(TargetLibraryInfoImpl(T)) {} TargetLibraryInfoWrapperPass::TargetLibraryInfoWrapperPass( const TargetLibraryInfoImpl &TLIImpl) - : ImmutablePass(ID), TLA(TLIImpl) { - initializeTargetLibraryInfoWrapperPassPass(*PassRegistry::getPassRegistry()); -} + : ImmutablePass(ID), TLA(TLIImpl) {} TargetLibraryInfoWrapperPass::TargetLibraryInfoWrapperPass( const TargetLibraryInfo &TLIOther) |