Added two debug logging messages to VisitInstructionsTopDown to match VisitInstructio...
authorMichael Gottesman <mgottesman@apple.com>
Fri, 5 Apr 2013 18:26:08 +0000 (18:26 +0000)
committerMichael Gottesman <mgottesman@apple.com>
Fri, 5 Apr 2013 18:26:08 +0000 (18:26 +0000)
llvm-svn: 178895

llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp

index 1c1cec7..3b1d7a8 100644 (file)
@@ -2063,6 +2063,8 @@ ObjCARCOpt::VisitInstructionTopDown(Instruction *Inst,
 
     // Check for possible releases.
     if (CanAlterRefCount(Inst, Ptr, PA, Class)) {
+      DEBUG(dbgs() << "CanAlterRefCount: Seq: " << Seq << "; " << *Ptr
+            << "\n");      
       S.ClearKnownPositiveRefCount();
       switch (Seq) {
       case S_Retain:
@@ -2090,6 +2092,8 @@ ObjCARCOpt::VisitInstructionTopDown(Instruction *Inst,
     switch (Seq) {
     case S_CanRelease:
       if (CanUse(Inst, Ptr, PA, Class)) {
+        DEBUG(dbgs() << "CanUse: Seq: " << Seq << "; " << *Ptr
+              << "\n");
         S.SetSeq(S_Use);
         ANNOTATE_TOPDOWN(Inst, Ptr, Seq, S_Use);
       }