[objcarcopts] Encapsulate PtrState.RRI.IsTailCallRelease into the method PtrState.IsTailCallRelease() and PtrState.SetTailCallRelease().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184533 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael Gottesman 2013-06-21 07:00:44 +00:00
parent 00dacc44f5
commit 8fcf2ca81c

View File

@ -539,6 +539,14 @@ namespace {
RRI.KnownSafe = NewValue;
}
bool IsTailCallRelease() const {
return RRI.IsTailCallRelease;
}
void SetTailCallRelease(const bool NewValue) {
RRI.IsTailCallRelease = NewValue;
}
void SetKnownPositiveRefCount() {
DEBUG(dbgs() << "Setting Known Positive.\n");
KnownPositiveRefCount = true;
@ -1918,7 +1926,7 @@ ObjCARCOpt::VisitInstructionBottomUp(Instruction *Inst,
S.ResetSequenceProgress(NewSeq);
S.RRI.ReleaseMetadata = ReleaseMetadata;
S.SetKnownSafe(S.HasKnownPositiveRefCount());
S.RRI.IsTailCallRelease = cast<CallInst>(Inst)->isTailCall();
S.SetTailCallRelease(cast<CallInst>(Inst)->isTailCall());
S.RRI.Calls.insert(Inst);
S.SetKnownPositiveRefCount();
break;
@ -2203,7 +2211,7 @@ ObjCARCOpt::VisitInstructionTopDown(Instruction *Inst,
// FALL THROUGH
case S_Use:
S.RRI.ReleaseMetadata = ReleaseMetadata;
S.RRI.IsTailCallRelease = cast<CallInst>(Inst)->isTailCall();
S.SetTailCallRelease(cast<CallInst>(Inst)->isTailCall());
Releases[Inst] = S.RRI;
ANNOTATE_TOPDOWN(Inst, Arg, S.GetSeq(), S_None);
S.ClearSequenceProgress();