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
18 changes: 9 additions & 9 deletions llvm/lib/CodeGen/MIRPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ void MIRPrinter::convertStackObjects(yaml::MachineFunction &YMF,
YamlObject.IsAliased = MFI.isAliasedObjectIndex(I);
// Save the ID' position in FixedStackObjects storage vector.
FixedStackObjectsIdx[ID] = YMF.FixedStackObjects.size();
YMF.FixedStackObjects.push_back(YamlObject);
YMF.FixedStackObjects.push_back(std::move(YamlObject));
StackObjectOperandMapping.insert(
std::make_pair(I, FrameIndexOperand::createFixed(ID)));
}
Expand Down Expand Up @@ -506,11 +506,11 @@ void MIRPrinter::convertStackObjects(yaml::MachineFunction &YMF,
auto &Object =
YMF.FixedStackObjects
[FixedStackObjectsIdx[FrameIdx + MFI.getNumFixedObjects()]];
Object.CalleeSavedRegister = Reg;
Object.CalleeSavedRegister = std::move(Reg);
Object.CalleeSavedRestored = CSInfo.isRestored();
} else {
auto &Object = YMF.StackObjects[StackObjectsIdx[FrameIdx]];
Object.CalleeSavedRegister = Reg;
Object.CalleeSavedRegister = std::move(Reg);
Object.CalleeSavedRestored = CSInfo.isRestored();
}
}
Expand Down Expand Up @@ -576,7 +576,7 @@ void MIRPrinter::convertCallSiteObjects(yaml::MachineFunction &YMF,
printRegMIR(ArgReg.Reg, YmlArgReg.Reg, TRI);
YmlCS.ArgForwardingRegs.emplace_back(YmlArgReg);
}
YMF.CallSitesInfo.push_back(YmlCS);
YMF.CallSitesInfo.push_back(std::move(YmlCS));
}

// Sort call info by position of call instructions.
Expand All @@ -597,7 +597,7 @@ void MIRPrinter::convertMachineMetadataNodes(yaml::MachineFunction &YMF,
std::string NS;
raw_string_ostream StrOS(NS);
MD.second->print(StrOS, MST, MF.getFunction().getParent());
YMF.MachineMetadataNodes.push_back(NS);
YMF.MachineMetadataNodes.push_back(std::move(NS));
}
}

Expand All @@ -612,7 +612,7 @@ void MIRPrinter::convertCalledGlobals(yaml::MachineFunction &YMF,

yaml::CalledGlobal YamlCG{CallSite, CG.Callee->getName().str(),
CG.TargetFlags};
YMF.CalledGlobals.push_back(YamlCG);
YMF.CalledGlobals.push_back(std::move(YamlCG));
}

// Sort by position of call instructions.
Expand All @@ -638,11 +638,11 @@ void MIRPrinter::convert(yaml::MachineFunction &MF,

yaml::MachineConstantPoolValue YamlConstant;
YamlConstant.ID = ID++;
YamlConstant.Value = Str;
YamlConstant.Value = std::move(Str);
YamlConstant.Alignment = Constant.getAlign();
YamlConstant.IsTargetSpecific = Constant.isMachineConstantPoolEntry();

MF.Constants.push_back(YamlConstant);
MF.Constants.push_back(std::move(YamlConstant));
}
}

Expand All @@ -661,7 +661,7 @@ void MIRPrinter::convert(ModuleSlotTracker &MST,
Entry.Blocks.push_back(Str);
Str.clear();
}
YamlJTI.Entries.push_back(Entry);
YamlJTI.Entries.push_back(std::move(Entry));
}
}

Expand Down
8 changes: 4 additions & 4 deletions llvm/lib/CodeGen/MachineFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,13 +967,13 @@ void MachineFunction::copyAdditionalCallInfo(const MachineInstr *Old,
CallSiteInfoMap::iterator CSIt = getCallSiteInfo(OldCallMI);
if (CSIt != CallSitesInfo.end()) {
CallSiteInfo CSInfo = CSIt->second;
CallSitesInfo[New] = CSInfo;
CallSitesInfo[New] = std::move(CSInfo);
}

CalledGlobalsMap::iterator CGIt = CalledGlobalsInfo.find(OldCallMI);
if (CGIt != CalledGlobalsInfo.end()) {
CalledGlobalInfo CGInfo = CGIt->second;
CalledGlobalsInfo[New] = CGInfo;
CalledGlobalsInfo[New] = std::move(CGInfo);
}
}

Expand All @@ -991,14 +991,14 @@ void MachineFunction::moveAdditionalCallInfo(const MachineInstr *Old,
if (CSIt != CallSitesInfo.end()) {
CallSiteInfo CSInfo = std::move(CSIt->second);
CallSitesInfo.erase(CSIt);
CallSitesInfo[New] = CSInfo;
CallSitesInfo[New] = std::move(CSInfo);
}

CalledGlobalsMap::iterator CGIt = CalledGlobalsInfo.find(OldCallMI);
if (CGIt != CalledGlobalsInfo.end()) {
CalledGlobalInfo CGInfo = std::move(CGIt->second);
CalledGlobalsInfo.erase(CGIt);
CalledGlobalsInfo[New] = CGInfo;
CalledGlobalsInfo[New] = std::move(CGInfo);
}
}

Expand Down