From db40592de60f579afa18db3a06a4505c8e63de65 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 24 Feb 2025 18:21:20 +0700 Subject: MachineFunction: Remove null check on TargetRegisterInfo (#128480) Targets are required to define this, it is not optional. Make the method pure virtual to enforce this --- llvm/lib/CodeGen/MachineFunction.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen/MachineFunction.cpp') diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 6e0342a763d1..eb0a16732b05 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -189,10 +189,7 @@ void MachineFunction::init() { // Assume the function starts in SSA form with correct liveness. Properties.set(MachineFunctionProperties::Property::IsSSA); Properties.set(MachineFunctionProperties::Property::TracksLiveness); - if (STI->getRegisterInfo()) - RegInfo = new (Allocator) MachineRegisterInfo(this); - else - RegInfo = nullptr; + RegInfo = new (Allocator) MachineRegisterInfo(this); MFInfo = nullptr; -- cgit v1.2.3