@@ -189,7 +189,7 @@ class CodeMotionContext {
189
189
bool MultiIteration;
190
190
191
191
// / The allocator we are currently using.
192
- llvm::BumpPtrAllocator &BPA;
192
+ llvm::SpecificBumpPtrAllocator<BlockState> &BPA;
193
193
194
194
// / Current function we are analyzing.
195
195
SILFunction *F;
@@ -239,7 +239,7 @@ class CodeMotionContext {
239
239
240
240
public:
241
241
// / Constructor.
242
- CodeMotionContext (llvm::BumpPtrAllocator &BPA, SILFunction *F,
242
+ CodeMotionContext (llvm::SpecificBumpPtrAllocator<BlockState> &BPA, SILFunction *F,
243
243
PostOrderFunctionInfo *PO, AliasAnalysis *AA,
244
244
RCIdentityFunctionInfo *RCFI)
245
245
: MultiIteration(true ), BPA(BPA), F(F), PO(PO), AA(AA), RCFI(RCFI) {}
@@ -358,9 +358,9 @@ class RetainCodeMotionContext : public CodeMotionContext {
358
358
359
359
public:
360
360
// / Constructor.
361
- RetainCodeMotionContext (llvm::BumpPtrAllocator &BPA, SILFunction *F ,
362
- PostOrderFunctionInfo *PO, AliasAnalysis *AA ,
363
- RCIdentityFunctionInfo *RCFI)
361
+ RetainCodeMotionContext (llvm::SpecificBumpPtrAllocator<BlockState> &BPA,
362
+ SILFunction *F, PostOrderFunctionInfo *PO ,
363
+ AliasAnalysis *AA, RCIdentityFunctionInfo *RCFI)
364
364
: CodeMotionContext(BPA, F, PO, AA, RCFI) {
365
365
MultiIteration = requireIteration ();
366
366
}
@@ -430,7 +430,7 @@ void RetainCodeMotionContext::initializeCodeMotionDataFlow() {
430
430
431
431
// Initialize all the data flow bit vector for all basic blocks.
432
432
for (auto &BB : *F) {
433
- BlockStates[&BB] = new (BPA) RetainBlockState (&BB == &*F->begin (),
433
+ BlockStates[&BB] = new (BPA. Allocate () ) RetainBlockState (&BB == &*F->begin (),
434
434
RCRootVault.size (), MultiIteration);
435
435
}
436
436
}
@@ -684,9 +684,9 @@ class ReleaseCodeMotionContext : public CodeMotionContext {
684
684
685
685
public:
686
686
// / Constructor.
687
- ReleaseCodeMotionContext (llvm::BumpPtrAllocator &BPA, SILFunction *F ,
688
- PostOrderFunctionInfo *PO, AliasAnalysis *AA ,
689
- RCIdentityFunctionInfo *RCFI,
687
+ ReleaseCodeMotionContext (llvm::SpecificBumpPtrAllocator<BlockState> &BPA,
688
+ SILFunction *F, PostOrderFunctionInfo *PO ,
689
+ AliasAnalysis *AA, RCIdentityFunctionInfo *RCFI,
690
690
bool FreezeEpilogueReleases,
691
691
ConsumedArgToEpilogueReleaseMatcher &ERM)
692
692
: CodeMotionContext(BPA, F, PO, AA, RCFI),
@@ -769,8 +769,8 @@ void ReleaseCodeMotionContext::initializeCodeMotionDataFlow() {
769
769
if (Throw != F->end ())
770
770
Exits.insert (&*Throw);
771
771
for (auto &BB : *F) {
772
- BlockStates[&BB] = new (BPA) ReleaseBlockState (Exits.count (&BB),
773
- RCRootVault.size (), MultiIteration);
772
+ BlockStates[&BB] = new (BPA. Allocate () ) ReleaseBlockState (Exits.count (&BB),
773
+ RCRootVault.size (), MultiIteration);
774
774
}
775
775
}
776
776
@@ -1047,7 +1047,7 @@ class RRCodeMotion : public SILFunctionTransform {
1047
1047
// to create critical edges.
1048
1048
bool EdgeChanged = splitAllCriticalEdges (*F, false , nullptr , nullptr );
1049
1049
1050
- llvm::BumpPtrAllocator BPA;
1050
+ llvm::SpecificBumpPtrAllocator<BlockState> BPA;
1051
1051
auto *PO = PM->getAnalysis <PostOrderAnalysis>()->get (F);
1052
1052
auto *AA = PM->getAnalysis <AliasAnalysis>();
1053
1053
auto *RCFI = PM->getAnalysis <RCIdentityAnalysis>()->get (F);
0 commit comments