aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorSergei Barannikov <barannikov88@gmail.com>2024-08-13 04:00:19 +0300
committerGitHub <noreply@github.com>2024-08-13 04:00:19 +0300
commit75c7bca740935a0cca462e28475dd6b046a6872c (patch)
tree664d10bf0a09d65c386bfc290b3518020f7df399 /llvm/lib/Analysis/InlineCost.cpp
parentf8f34c7e4914ce9e90453e902e2e03f129119fb6 (diff)
downloadllvm-75c7bca740935a0cca462e28475dd6b046a6872c.zip
llvm-75c7bca740935a0cca462e28475dd6b046a6872c.tar.gz
llvm-75c7bca740935a0cca462e28475dd6b046a6872c.tar.bz2
[DataLayout] Remove constructor accepting a pointer to Module (#102841)
The constructor initializes `*this` with `M->getDataLayout()`, which is effectively the same as calling the copy constructor. There does not seem to be a case where a copy would be necessary. Pull Request: https://github.com/llvm/llvm-project/pull/102841
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 345e5a0..4b65fa0 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -3246,8 +3246,7 @@ InlineCostAnnotationPrinterPass::run(Function &F,
};
Module *M = F.getParent();
ProfileSummaryInfo PSI(*M);
- DataLayout DL(M);
- TargetTransformInfo TTI(DL);
+ TargetTransformInfo TTI(M->getDataLayout());
// FIXME: Redesign the usage of InlineParams to expand the scope of this pass.
// In the current implementation, the type of InlineParams doesn't matter as
// the pass serves only for verification of inliner's decisions.