mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 22:04:55 +00:00
[objcarcopts] Encapsulate PtrState.RRI.ReleaseMetadata into the methods PtrState.GetReleaseMetadata() and PtrState.SetReleaseMetadata().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184534 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8fcf2ca81c
commit
3b5714de9d
@ -547,6 +547,14 @@ namespace {
|
||||
RRI.IsTailCallRelease = NewValue;
|
||||
}
|
||||
|
||||
const MDNode *GetReleaseMetadata() const {
|
||||
return RRI.ReleaseMetadata;
|
||||
}
|
||||
|
||||
void SetReleaseMetadata(MDNode *NewValue) {
|
||||
RRI.ReleaseMetadata = NewValue;
|
||||
}
|
||||
|
||||
void SetKnownPositiveRefCount() {
|
||||
DEBUG(dbgs() << "Setting Known Positive.\n");
|
||||
KnownPositiveRefCount = true;
|
||||
@ -1924,7 +1932,7 @@ ObjCARCOpt::VisitInstructionBottomUp(Instruction *Inst,
|
||||
Sequence NewSeq = ReleaseMetadata ? S_MovableRelease : S_Release;
|
||||
ANNOTATE_BOTTOMUP(Inst, Arg, S.GetSeq(), NewSeq);
|
||||
S.ResetSequenceProgress(NewSeq);
|
||||
S.RRI.ReleaseMetadata = ReleaseMetadata;
|
||||
S.SetReleaseMetadata(ReleaseMetadata);
|
||||
S.SetKnownSafe(S.HasKnownPositiveRefCount());
|
||||
S.SetTailCallRelease(cast<CallInst>(Inst)->isTailCall());
|
||||
S.RRI.Calls.insert(Inst);
|
||||
@ -2210,7 +2218,7 @@ ObjCARCOpt::VisitInstructionTopDown(Instruction *Inst,
|
||||
S.RRI.ReverseInsertPts.clear();
|
||||
// FALL THROUGH
|
||||
case S_Use:
|
||||
S.RRI.ReleaseMetadata = ReleaseMetadata;
|
||||
S.SetReleaseMetadata(ReleaseMetadata);
|
||||
S.SetTailCallRelease(cast<CallInst>(Inst)->isTailCall());
|
||||
Releases[Inst] = S.RRI;
|
||||
ANNOTATE_TOPDOWN(Inst, Arg, S.GetSeq(), S_None);
|
||||
|
Loading…
Reference in New Issue
Block a user