mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-17 17:06:59 +00:00
[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:
parent
00dacc44f5
commit
8fcf2ca81c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user