Skip to content

Commit 4fed59e

Browse files
committed
FunctionLoweringInfo: Use TLI member instead of finding it
1 parent 0efff7c commit 4fed59e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,7 @@ void FunctionLoweringInfo::clear() {
369369

370370
/// CreateReg - Allocate a single virtual register for the given type.
371371
Register FunctionLoweringInfo::CreateReg(MVT VT, bool isDivergent) {
372-
return RegInfo->createVirtualRegister(
373-
MF->getSubtarget().getTargetLowering()->getRegClassFor(VT, isDivergent));
372+
return RegInfo->createVirtualRegister(TLI->getRegClassFor(VT, isDivergent));
374373
}
375374

376375
/// CreateRegs - Allocate the appropriate number of virtual registers of
@@ -381,8 +380,6 @@ Register FunctionLoweringInfo::CreateReg(MVT VT, bool isDivergent) {
381380
/// will assign registers for each member or element.
382381
///
383382
Register FunctionLoweringInfo::CreateRegs(Type *Ty, bool isDivergent) {
384-
const TargetLowering *TLI = MF->getSubtarget().getTargetLowering();
385-
386383
SmallVector<EVT, 4> ValueVTs;
387384
ComputeValueVTs(*TLI, MF->getDataLayout(), Ty, ValueVTs);
388385

0 commit comments

Comments
 (0)