File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -124,9 +124,8 @@ class TargetSubtargetInfo : public MCSubtargetInfo {
124124
125125 virtual const LegalizerInfo *getLegalizerInfo () const { return nullptr ; }
126126
127- // / getRegisterInfo - If register information is available, return it. If
128- // / not, return null.
129- virtual const TargetRegisterInfo *getRegisterInfo () const { return nullptr ; }
127+ // / Return the target's register information.
128+ virtual const TargetRegisterInfo *getRegisterInfo () const = 0;
130129
131130 // / If the information for the register banks is available, return it.
132131 // / Otherwise return nullptr.
Original file line number Diff line number Diff line change @@ -189,10 +189,7 @@ void MachineFunction::init() {
189189 // Assume the function starts in SSA form with correct liveness.
190190 Properties.set (MachineFunctionProperties::Property::IsSSA);
191191 Properties.set (MachineFunctionProperties::Property::TracksLiveness);
192- if (STI->getRegisterInfo ())
193- RegInfo = new (Allocator) MachineRegisterInfo (this );
194- else
195- RegInfo = nullptr ;
192+ RegInfo = new (Allocator) MachineRegisterInfo (this );
196193
197194 MFInfo = nullptr ;
198195
You can’t perform that action at this time.
0 commit comments