mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
[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
21d31d163e
commit
ad730f4d06
@ -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
Block a user