Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions llvm/include/llvm/CodeGen/TargetSubtargetInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,8 @@ class TargetSubtargetInfo : public MCSubtargetInfo {

virtual const LegalizerInfo *getLegalizerInfo() const { return nullptr; }

/// getRegisterInfo - If register information is available, return it. If
/// not, return null.
virtual const TargetRegisterInfo *getRegisterInfo() const { return nullptr; }
/// Return the target's register information.
virtual const TargetRegisterInfo *getRegisterInfo() const = 0;

/// If the information for the register banks is available, return it.
/// Otherwise return nullptr.
Expand Down
5 changes: 1 addition & 4 deletions llvm/lib/CodeGen/MachineFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Loading