@@ -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;
@@ -246,7 +246,7 @@ class CodeMotionContext {
246
246
247
247
public:
248
248
// / Constructor.
249
- CodeMotionContext (llvm::BumpPtrAllocator &BPA, SILFunction *F,
249
+ CodeMotionContext (llvm::SpecificBumpPtrAllocator<BlockState> &BPA, SILFunction *F,
250
250
PostOrderFunctionInfo *PO, AliasAnalysis *AA,
251
251
RCIdentityFunctionInfo *RCFI)
252
252
: MultiIteration(true ), BPA(BPA), F(F), PO(PO), AA(AA), RCFI(RCFI) {}
@@ -365,9 +365,9 @@ class RetainCodeMotionContext : public CodeMotionContext {
365
365
366
366
public:
367
367
// / Constructor.
368
- RetainCodeMotionContext (llvm::BumpPtrAllocator &BPA, SILFunction *F ,
369
- PostOrderFunctionInfo *PO, AliasAnalysis *AA ,
370
- RCIdentityFunctionInfo *RCFI)
368
+ RetainCodeMotionContext (llvm::SpecificBumpPtrAllocator<BlockState> &BPA,
369
+ SILFunction *F, PostOrderFunctionInfo *PO ,
370
+ AliasAnalysis *AA, RCIdentityFunctionInfo *RCFI)
371
371
: CodeMotionContext(BPA, F, PO, AA, RCFI) {
372
372
MultiIteration = requireIteration ();
373
373
}
@@ -437,7 +437,7 @@ void RetainCodeMotionContext::initializeCodeMotionDataFlow() {
437
437
438
438
// Initialize all the data flow bit vector for all basic blocks.
439
439
for (auto &BB : *F) {
440
- BlockStates[&BB] = new (BPA) RetainBlockState (&BB == &*F->begin (),
440
+ BlockStates[&BB] = new (BPA. Allocate () ) RetainBlockState (&BB == &*F->begin (),
441
441
RCRootVault.size (), MultiIteration);
442
442
}
443
443
}
@@ -691,9 +691,9 @@ class ReleaseCodeMotionContext : public CodeMotionContext {
691
691
692
692
public:
693
693
// / Constructor.
694
- ReleaseCodeMotionContext (llvm::BumpPtrAllocator &BPA, SILFunction *F ,
695
- PostOrderFunctionInfo *PO, AliasAnalysis *AA ,
696
- RCIdentityFunctionInfo *RCFI,
694
+ ReleaseCodeMotionContext (llvm::SpecificBumpPtrAllocator<BlockState> &BPA,
695
+ SILFunction *F, PostOrderFunctionInfo *PO ,
696
+ AliasAnalysis *AA, RCIdentityFunctionInfo *RCFI,
697
697
bool FreezeEpilogueReleases,
698
698
ConsumedArgToEpilogueReleaseMatcher &ERM)
699
699
: CodeMotionContext(BPA, F, PO, AA, RCFI),
@@ -776,8 +776,8 @@ void ReleaseCodeMotionContext::initializeCodeMotionDataFlow() {
776
776
if (Throw != F->end ())
777
777
Exits.insert (&*Throw);
778
778
for (auto &BB : *F) {
779
- BlockStates[&BB] = new (BPA) ReleaseBlockState (Exits.count (&BB),
780
- RCRootVault.size (), MultiIteration);
779
+ BlockStates[&BB] = new (BPA. Allocate () ) ReleaseBlockState (Exits.count (&BB),
780
+ RCRootVault.size (), MultiIteration);
781
781
}
782
782
}
783
783
@@ -1054,7 +1054,7 @@ class RRCodeMotion : public SILFunctionTransform {
1054
1054
// to create critical edges.
1055
1055
bool EdgeChanged = splitAllCriticalEdges (*F, false , nullptr , nullptr );
1056
1056
1057
- llvm::BumpPtrAllocator BPA;
1057
+ llvm::SpecificBumpPtrAllocator<BlockState> BPA;
1058
1058
auto *PO = PM->getAnalysis <PostOrderAnalysis>()->get (F);
1059
1059
auto *AA = PM->getAnalysis <AliasAnalysis>();
1060
1060
auto *RCFI = PM->getAnalysis <RCIdentityAnalysis>()->get (F);
0 commit comments