File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -288,19 +288,18 @@ bool ARCMatchingSetBuilder::matchUpIncDecSetsForPtr() {
288
288
bool HaveIncInsertPts = !MatchSet.IncrementInsertPts .empty ();
289
289
bool HaveDecInsertPts = !MatchSet.DecrementInsertPts .empty ();
290
290
291
+ // We should not have the case which retains have to be anchored topdown and
292
+ // releases do not have to be bottomup, or vice-versa.
293
+ assert (HaveIncInsertPts == HaveDecInsertPts &&
294
+ " Asymmetric insertion points for retains and releases" );
295
+
291
296
// If we have insertion points and partial merges, return false to avoid
292
297
// control dependency issues.
293
298
if ((HaveIncInsertPts || HaveDecInsertPts) && Partial) {
294
299
DEBUG (llvm::dbgs () << " Found partial merge and insert pts. Bailing!\n " );
295
300
return false ;
296
301
}
297
302
298
- // If we have insertion points for increments, but not for decrements (or
299
- // vis-a-versa), return false. This prevents us from inserting retains and
300
- // removing releases or vis-a-versa.
301
- if (HaveIncInsertPts != HaveDecInsertPts)
302
- return false ;
303
-
304
303
// If we do not have any insertion points but we do have increments, we must
305
304
// be eliminating pairs.
306
305
if (!HaveIncInsertPts && !MatchSet.Increments .empty ())
You can’t perform that action at this time.
0 commit comments