diff options
Diffstat (limited to 'llvm/tools/llvm-reduce/ReducerWorkItem.cpp')
-rw-r--r-- | llvm/tools/llvm-reduce/ReducerWorkItem.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/tools/llvm-reduce/ReducerWorkItem.cpp b/llvm/tools/llvm-reduce/ReducerWorkItem.cpp index 7446522..7f05ea8 100644 --- a/llvm/tools/llvm-reduce/ReducerWorkItem.cpp +++ b/llvm/tools/llvm-reduce/ReducerWorkItem.cpp @@ -240,8 +240,6 @@ static std::unique_ptr<MachineFunction> cloneMF(MachineFunction *SrcMF, // Remap the debug info frame index references. DstMF->VariableDbgInfos = SrcMF->VariableDbgInfos; - // FIXME: Need to clone MachineFunctionInfo, which may also depend on frame - // index and block mapping. // Clone virtual registers for (unsigned I = 0, E = SrcMRI->getNumVirtRegs(); I != E; ++I) { Register Reg = Register::index2VirtReg(I); @@ -345,6 +343,11 @@ static std::unique_ptr<MachineFunction> cloneMF(MachineFunction *SrcMF, DstMF->setDebugInstrNumberingCount(SrcMF->DebugInstrNumberingCount); + if (!DstMF->cloneInfoFrom(*SrcMF, Src2DstMBB)) + report_fatal_error("target does not implement MachineFunctionInfo cloning"); + + DstMRI->freezeReservedRegs(*DstMF); + DstMF->verify(nullptr, "", /*AbortOnError=*/true); return DstMF; } |