1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[NFC][MLGO] Fix vector sizing

The bots only build release mode, and the use of `reserve` instead of
`resize`, while not causing invalid memory accesses, is incorrect.
This commit is contained in:
Mircea Trofin 2021-07-22 12:47:49 -07:00
parent fb2a58c6ab
commit 294f763d01

View File

@ -52,7 +52,7 @@ ReleaseModeModelRunner::ReleaseModeModelRunner(LLVMContext &Ctx)
CompiledModel(std::make_unique<llvm::InlinerSizeModel>()) {
assert(CompiledModel && "The CompiledModel should be valid");
FeatureIndices.reserve(NumberOfFeatures);
FeatureIndices.resize(NumberOfFeatures);
for (size_t I = 0; I < NumberOfFeatures; ++I) {
const int Index =