When initializing an instance of OperandsMapper, instead of using
SmallVector::resize followed by std::fill, use the function that
directly does that in SmallVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282130
91177308-0d34-0410-b5e6-
96231b3b80d8
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");
}