aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-04-29 05:13:13 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-04-29 05:13:13 +0000
commite056397e8115a8ef1b22908695fa45d6dfee9d71 (patch)
tree0446c373b3a3b96b8003f65bf90fcd4ef09aaefd /lib/Transforms/ObjCARC/ObjCARCOpts.cpp
parentd9225188449f0ed381b5e0806527daf77a229d42 (diff)
[objc-arc-annotations] Moved the disabling of call movement to ConnectTDBUTraversals so that I can prevent Changed = true from being set. This prevents an infinite loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180693 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/ObjCARC/ObjCARCOpts.cpp')
-rw-r--r--lib/Transforms/ObjCARC/ObjCARCOpts.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Transforms/ObjCARC/ObjCARCOpts.cpp b/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
index e6c5928375..a045582d53 100644
--- a/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
+++ b/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
@@ -2581,6 +2581,11 @@ ObjCARCOpt::ConnectTDBUTraversals(DenseMap<const BasicBlock *, BBState>
// long as the existing imbalances are maintained.
if (OldDelta != 0)
return false;
+
+#ifdef ARC_ANNOTATIONS
+ // Do not move calls if ARC annotations are requested.
+ return false;
+#endif // ARC_ANNOTATIONS
Changed = true;
assert(OldCount != 0 && "Unreachable code?");
@@ -2644,12 +2649,6 @@ ObjCARCOpt::PerformCodePlacement(DenseMap<const BasicBlock *, BBState>
ReleasesToMove, Arg, KnownSafe,
AnyPairsCompletelyEliminated);
-#ifdef ARC_ANNOTATIONS
- // Do not move calls if ARC annotations are requested. If we were to move
- // calls in this case, we would not be able
- PerformMoveCalls = PerformMoveCalls && !EnableARCAnnotations;
-#endif // ARC_ANNOTATIONS
-
if (PerformMoveCalls) {
// Ok, everything checks out and we're all set. Let's move/delete some
// code!