summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TypePromotion.cpp
diff options
context:
space:
mode:
authorNikita Popov <llvm@npopov.com>2024-06-29 15:05:04 +0200
committerGitHub <noreply@github.com>2024-06-29 15:05:04 +0200
commit74deadf19650f6f3b6392ba09caa20dd38ae41e0 (patch)
tree1ed9b668dc890fa0818728c4042d78830864c932 /llvm/lib/CodeGen/TypePromotion.cpp
parent02b60893c3858d5d76cdca1bd9b684bdd7093fb7 (diff)
[IRBuilder] Don't include Module.h (NFC) (#97159)
This used to be necessary to fetch the DataLayout, but isn't anymore.
Diffstat (limited to 'llvm/lib/CodeGen/TypePromotion.cpp')
-rw-r--r--llvm/lib/CodeGen/TypePromotion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TypePromotion.cpp b/llvm/lib/CodeGen/TypePromotion.cpp
index ecc043d8f0bc..0940759ddc42 100644
--- a/llvm/lib/CodeGen/TypePromotion.cpp
+++ b/llvm/lib/CodeGen/TypePromotion.cpp
@@ -929,7 +929,7 @@ bool TypePromotionImpl::run(Function &F, const TargetMachine *TM,
TLI = SubtargetInfo->getTargetLowering();
RegisterBitWidth =
TTI.getRegisterBitWidth(TargetTransformInfo::RGK_Scalar).getFixedValue();
- Ctx = &F.getParent()->getContext();
+ Ctx = &F.getContext();
// Return the preferred integer width of the instruction, or zero if we
// shouldn't try.