From: Michael Gottesman Date: Sun, 21 Apr 2013 00:50:27 +0000 (+0000) Subject: When we strength reduce an objc_retainBlock call to objc_retain, increment NumPeeps... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fca9d95523dd290209bf15e0ef9d9aa373058636;p=oota-llvm.git When we strength reduce an objc_retainBlock call to objc_retain, increment NumPeeps and make sure that Changed is set to true. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179968 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/ObjCARC/ObjCARCOpts.cpp b/lib/Transforms/ObjCARC/ObjCARCOpts.cpp index 89e7510ec9d..7a7cdbec10d 100644 --- a/lib/Transforms/ObjCARC/ObjCARCOpts.cpp +++ b/lib/Transforms/ObjCARC/ObjCARCOpts.cpp @@ -1383,12 +1383,17 @@ ObjCARCOpt::OptimizeRetainBlockCall(Function &F, Instruction *Inst, if (!IsRetainBlockOptimizable(Inst)) return false; + Changed = true; + ++NumPeeps; + + DEBUG(dbgs() << "Strength reduced retainBlock => retain.\n"); + DEBUG(dbgs() << "Old: " << *Inst << "\n"); CallInst *RetainBlock = cast(Inst); RetainBlock->setCalledFunction(getRetainCallee(F.getParent())); // Remove copy_on_escape metadata. RetainBlock->setMetadata(CopyOnEscapeMDKind, 0); Class = IC_Retain; - + DEBUG(dbgs() << "New: " << *Inst << "\n"); return true; }