diff options
author | Michael Gottesman <mgottesman@apple.com> | 2013-04-29 05:13:13 +0000 |
---|---|---|
committer | Michael Gottesman <mgottesman@apple.com> | 2013-04-29 05:13:13 +0000 |
commit | a87bb8f50ba213e283eff55cd9ceba80b97ec6ef (patch) | |
tree | 39f0952298e00b5d47f09d2a5313ae76f94f6959 /llvm/lib/Transforms | |
parent | cc06891c42da0612557871f1ed75a7b4631ba2b9 (diff) | |
download | bcm5719-llvm-a87bb8f50ba213e283eff55cd9ceba80b97ec6ef.tar.gz bcm5719-llvm-a87bb8f50ba213e283eff55cd9ceba80b97ec6ef.zip |
[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.
llvm-svn: 180693
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp b/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp index e6c5928375f..a045582d532 100644 --- a/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp +++ b/llvm/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! |