diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 78b49c9..c6653ae 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -187,6 +187,7 @@ void MachineFunction::init() { RegInfo = nullptr; MFInfo = nullptr; + // We can realign the stack if the target supports it and the user hasn't // explicitly asked us not to. bool CanRealignSP = STI->getFrameLowering()->isStackRealignable() && @@ -232,6 +233,12 @@ void MachineFunction::init() { PSVManager = std::make_unique<PseudoSourceValueManager>(getTarget()); } +void MachineFunction::initTargetMachineFunctionInfo( + const TargetSubtargetInfo &STI) { + assert(!MFInfo && "MachineFunctionInfo already set"); + MFInfo = Target.createMachineFunctionInfo(Allocator, F, &STI); +} + MachineFunction::~MachineFunction() { clear(); } |