Skip to content

Commit

Permalink
[NFC][BOLT] Call EnsureAllocatorExists instead of copy pasting code
Browse files Browse the repository at this point in the history
  • Loading branch information
kbeyls committed May 7, 2024
1 parent abd3149 commit e232659
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions bolt/lib/Core/ParallelUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,7 @@ void runOnEachFunctionWithUniqueAllocId(
}
}

if (!BC.MIB->checkAllocatorExists(AllocId)) {
MCPlusBuilder::AllocatorIdTy Id =
BC.MIB->initializeNewAnnotationAllocator();
(void)Id;
assert(AllocId == Id && "unexpected allocator id created");
}
EnsureAllocatorExists(AllocId);

Pool.async(runBlock, BlockBegin, BC.getBinaryFunctions().end(), AllocId);
Lock.unlock();
Expand Down

0 comments on commit e232659

Please sign in to comment.