@@ -156,13 +156,21 @@ void ARCRegionState::mergePredTopDown(ARCRegionState &PredRegionState) {
156
156
// Bottom Up Dataflow
157
157
//
158
158
159
- static bool processBlockBottomUpInsts (
160
- ARCRegionState &State, SILBasicBlock &BB,
161
- BottomUpDataflowRCStateVisitor<ARCRegionState> &DataflowVisitor,
162
- AliasAnalysis *AA, ImmutablePointerSetFactory<SILInstruction> &SetFactory) {
159
+ bool ARCRegionState::processBlockBottomUp (
160
+ const LoopRegion *R, AliasAnalysis *AA, RCIdentityFunctionInfo *RCIA,
161
+ EpilogueARCFunctionInfo *EAFI, LoopRegionFunctionInfo *LRFI,
162
+ bool FreezeOwnedArgEpilogueReleases,
163
+ BlotMapVector<SILInstruction *, BottomUpRefCountState> &IncToDecStateMap,
164
+ ImmutablePointerSetFactory<SILInstruction> &SetFactory) {
165
+ LLVM_DEBUG (llvm::dbgs () << " >>>> Bottom Up!\n " );
163
166
164
- auto II = State.summarizedinterestinginsts_rbegin ();
165
- auto IE = State.summarizedinterestinginsts_rend ();
167
+ SILBasicBlock &BB = *R->getBlock ();
168
+ BottomUpDataflowRCStateVisitor<ARCRegionState> DataflowVisitor (
169
+ RCIA, EAFI, *this , FreezeOwnedArgEpilogueReleases, IncToDecStateMap,
170
+ SetFactory);
171
+
172
+ auto II = summarizedinterestinginsts_rbegin ();
173
+ auto IE = summarizedinterestinginsts_rend ();
166
174
167
175
// If we do not have any interesting instructions, bail and return false since
168
176
// we can not have any nested instructions.
@@ -198,7 +206,7 @@ static bool processBlockBottomUpInsts(
198
206
199
207
// For all other (reference counted value, ref count state) we are
200
208
// tracking...
201
- for (auto &OtherState : State. getBottomupStates ()) {
209
+ for (auto &OtherState : getBottomupStates ()) {
202
210
// If the other state's value is blotted, skip it.
203
211
if (!OtherState.hasValue ())
204
212
continue ;
@@ -215,26 +223,6 @@ static bool processBlockBottomUpInsts(
215
223
return NestingDetected;
216
224
}
217
225
218
- bool ARCRegionState::processBlockBottomUp (
219
- const LoopRegion *R, AliasAnalysis *AA, RCIdentityFunctionInfo *RCIA,
220
- EpilogueARCFunctionInfo *EAFI, LoopRegionFunctionInfo *LRFI,
221
- bool FreezeOwnedArgEpilogueReleases,
222
- BlotMapVector<SILInstruction *, BottomUpRefCountState> &IncToDecStateMap,
223
- ImmutablePointerSetFactory<SILInstruction> &SetFactory) {
224
- LLVM_DEBUG (llvm::dbgs () << " >>>> Bottom Up!\n " );
225
-
226
- SILBasicBlock &BB = *R->getBlock ();
227
- BottomUpDataflowRCStateVisitor<ARCRegionState> DataflowVisitor (
228
- RCIA, EAFI, *this , FreezeOwnedArgEpilogueReleases, IncToDecStateMap,
229
- SetFactory);
230
-
231
- // Visit each arc relevant instruction I in BB visited in reverse...
232
- bool NestingDetected =
233
- processBlockBottomUpInsts (*this , BB, DataflowVisitor, AA, SetFactory);
234
-
235
- return NestingDetected;
236
- }
237
-
238
226
// Returns true if any of the non-local successors of the region are leaking
239
227
// blocks. We currently do not handle early exits, but do handle trapping
240
228
// blocks. Returns false if otherwise
0 commit comments