diff options
| author | Quentin Colombet <qcolombet@apple.com> | 2016-09-22 02:10:32 +0000 |
|---|---|---|
| committer | Quentin Colombet <qcolombet@apple.com> | 2016-09-22 02:10:32 +0000 |
| commit | b202eb88aaff70c053f392c974d32edb75bec92c (patch) | |
| tree | 831708f6b7ff216373199b1738ad81508c9fdf21 /llvm/lib/CodeGen | |
| parent | 624f59f4d8ecc5021e87b5ea96cb76b035e94fca (diff) | |
| download | bcm5719-llvm-b202eb88aaff70c053f392c974d32edb75bec92c.tar.gz bcm5719-llvm-b202eb88aaff70c053f392c974d32edb75bec92c.zip | |
[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
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp b/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp index c76601da4d0..be4bbeeda98 100644 --- a/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp +++ b/llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp @@ -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"); } |

