summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2025-02-24 18:21:20 +0700
committerGitHub <noreply@github.com>2025-02-24 18:21:20 +0700
commitdb40592de60f579afa18db3a06a4505c8e63de65 (patch)
treed1217ebf0033d9ea134d39c7888b85bbcc12faac /llvm/lib/CodeGen/MachineFunction.cpp
parent7de64925da9f09d1a66230c5e118fe127a6c49e3 (diff)
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp5
1 files changed, 1 insertions, 4 deletions
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;