[RegisterBankInfo] Take advantage of the extra argument of SmallVector::resize.
When initializing an instance of OperandsMapper, instead of using SmallVector::resize followed by std::fill, use the function that directly does that in SmallVector. llvm-svn: 282130
This commit is contained in:
parent
624f59f4d8
commit
b202eb88aa
|
|
@ -513,9 +513,7 @@ RegisterBankInfo::OperandsMapper::OperandsMapper(
|
|||
MachineRegisterInfo &MRI)
|
||||
: MRI(MRI), MI(MI), InstrMapping(InstrMapping) {
|
||||
unsigned NumOpds = MI.getNumOperands();
|
||||
OpToNewVRegIdx.resize(NumOpds);
|
||||
std::fill(OpToNewVRegIdx.begin(), OpToNewVRegIdx.end(),
|
||||
OperandsMapper::DontKnowIdx);
|
||||
OpToNewVRegIdx.resize(NumOpds, OperandsMapper::DontKnowIdx);
|
||||
assert(InstrMapping.verify(MI) && "Invalid mapping for MI");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue