[llvm] 4fed59e - FunctionLoweringInfo: Use TLI member instead of finding it
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 2 16:05:41 PDT 2022
Author: Matt Arsenault
Date: 2022-11-02T16:05:34-07:00
New Revision: 4fed59ed41007c2380d6742f6a91178e2f35fa01
URL: https://github.com/llvm/llvm-project/commit/4fed59ed41007c2380d6742f6a91178e2f35fa01
DIFF: https://github.com/llvm/llvm-project/commit/4fed59ed41007c2380d6742f6a91178e2f35fa01.diff
LOG: FunctionLoweringInfo: Use TLI member instead of finding it
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
index b1e369d21887e..bf67ef99b6b43 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -369,8 +369,7 @@ void FunctionLoweringInfo::clear() {
/// CreateReg - Allocate a single virtual register for the given type.
Register FunctionLoweringInfo::CreateReg(MVT VT, bool isDivergent) {
- return RegInfo->createVirtualRegister(
- MF->getSubtarget().getTargetLowering()->getRegClassFor(VT, isDivergent));
+ return RegInfo->createVirtualRegister(TLI->getRegClassFor(VT, isDivergent));
}
/// CreateRegs - Allocate the appropriate number of virtual registers of
@@ -381,8 +380,6 @@ Register FunctionLoweringInfo::CreateReg(MVT VT, bool isDivergent) {
/// will assign registers for each member or element.
///
Register FunctionLoweringInfo::CreateRegs(Type *Ty, bool isDivergent) {
- const TargetLowering *TLI = MF->getSubtarget().getTargetLowering();
-
SmallVector<EVT, 4> ValueVTs;
ComputeValueVTs(*TLI, MF->getDataLayout(), Ty, ValueVTs);
More information about the llvm-commits
mailing list