1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00

[RegBankSelect] Use const_iterator instead of iterator for repairReg.

The repairing code has no reason to change the source or destination of
the registers.

llvm-svn: 272163
This commit is contained in:
Quentin Colombet 2016-06-08 16:24:55 +00:00
parent fc68cf3b27
commit 8f581607b2
2 changed files with 6 additions and 5 deletions

View File

@ -520,10 +520,11 @@ private:
///
/// \note The caller is supposed to do the rewriting of op if need be.
/// I.e., Reg = op ... => <NewRegs> = NewOp ...
void repairReg(
MachineOperand &MO, const RegisterBankInfo::ValueMapping &ValMapping,
RegBankSelect::RepairingPlacement &RepairPt,
const iterator_range<SmallVectorImpl<unsigned>::iterator> &NewVRegs);
void repairReg(MachineOperand &MO,
const RegisterBankInfo::ValueMapping &ValMapping,
RegBankSelect::RepairingPlacement &RepairPt,
const iterator_range<SmallVectorImpl<unsigned>::const_iterator>
&NewVRegs);
/// Return the cost of the instruction needed to map \p MO to \p ValMapping.
/// The cost is free of basic block frequencies.

View File

@ -106,7 +106,7 @@ bool RegBankSelect::assignmentMatch(
void RegBankSelect::repairReg(
MachineOperand &MO, const RegisterBankInfo::ValueMapping &ValMapping,
RegBankSelect::RepairingPlacement &RepairPt,
const iterator_range<SmallVectorImpl<unsigned>::iterator> &NewVRegs) {
const iterator_range<SmallVectorImpl<unsigned>::const_iterator> &NewVRegs) {
assert(ValMapping.BreakDown.size() == 1 && "Not yet implemented");
// Assume we are repairing a use and thus, the original reg will be
// the source of the repairing.