mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 18:31:23 +00:00
Removed trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178329 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fda56e54cd
commit
ae07bf3ad3
@ -482,7 +482,7 @@ void
|
|||||||
PtrState::Merge(const PtrState &Other, bool TopDown) {
|
PtrState::Merge(const PtrState &Other, bool TopDown) {
|
||||||
Seq = MergeSeqs(Seq, Other.Seq, TopDown);
|
Seq = MergeSeqs(Seq, Other.Seq, TopDown);
|
||||||
KnownPositiveRefCount = KnownPositiveRefCount && Other.KnownPositiveRefCount;
|
KnownPositiveRefCount = KnownPositiveRefCount && Other.KnownPositiveRefCount;
|
||||||
|
|
||||||
// If we're not in a sequence (anymore), drop all associated state.
|
// If we're not in a sequence (anymore), drop all associated state.
|
||||||
if (Seq == S_None) {
|
if (Seq == S_None) {
|
||||||
Partial = false;
|
Partial = false;
|
||||||
@ -800,16 +800,16 @@ static void GenerateARCBBEntranceAnnotation(const char *Name, BasicBlock *BB,
|
|||||||
ArrayRef<Type*>(Params, 2),
|
ArrayRef<Type*>(Params, 2),
|
||||||
/*isVarArg=*/false);
|
/*isVarArg=*/false);
|
||||||
Constant *Callee = M->getOrInsertFunction(Name, FTy);
|
Constant *Callee = M->getOrInsertFunction(Name, FTy);
|
||||||
|
|
||||||
IRBuilder<> Builder(BB, BB->getFirstInsertionPt());
|
IRBuilder<> Builder(BB, BB->getFirstInsertionPt());
|
||||||
|
|
||||||
Value *PtrName;
|
Value *PtrName;
|
||||||
StringRef Tmp = Ptr->getName();
|
StringRef Tmp = Ptr->getName();
|
||||||
if (0 == (PtrName = M->getGlobalVariable(Tmp, true))) {
|
if (0 == (PtrName = M->getGlobalVariable(Tmp, true))) {
|
||||||
Value *ActualPtrName = Builder.CreateGlobalStringPtr(Tmp,
|
Value *ActualPtrName = Builder.CreateGlobalStringPtr(Tmp,
|
||||||
Tmp + "_STR");
|
Tmp + "_STR");
|
||||||
PtrName = new GlobalVariable(*M, I8X, true, GlobalVariable::InternalLinkage,
|
PtrName = new GlobalVariable(*M, I8X, true, GlobalVariable::InternalLinkage,
|
||||||
cast<Constant>(ActualPtrName), Tmp);
|
cast<Constant>(ActualPtrName), Tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value *S;
|
Value *S;
|
||||||
@ -837,16 +837,16 @@ static void GenerateARCBBTerminatorAnnotation(const char *Name, BasicBlock *BB,
|
|||||||
ArrayRef<Type*>(Params, 2),
|
ArrayRef<Type*>(Params, 2),
|
||||||
/*isVarArg=*/false);
|
/*isVarArg=*/false);
|
||||||
Constant *Callee = M->getOrInsertFunction(Name, FTy);
|
Constant *Callee = M->getOrInsertFunction(Name, FTy);
|
||||||
|
|
||||||
IRBuilder<> Builder(BB, llvm::prior(BB->end()));
|
IRBuilder<> Builder(BB, llvm::prior(BB->end()));
|
||||||
|
|
||||||
Value *PtrName;
|
Value *PtrName;
|
||||||
StringRef Tmp = Ptr->getName();
|
StringRef Tmp = Ptr->getName();
|
||||||
if (0 == (PtrName = M->getGlobalVariable(Tmp, true))) {
|
if (0 == (PtrName = M->getGlobalVariable(Tmp, true))) {
|
||||||
Value *ActualPtrName = Builder.CreateGlobalStringPtr(Tmp,
|
Value *ActualPtrName = Builder.CreateGlobalStringPtr(Tmp,
|
||||||
Tmp + "_STR");
|
Tmp + "_STR");
|
||||||
PtrName = new GlobalVariable(*M, I8X, true, GlobalVariable::InternalLinkage,
|
PtrName = new GlobalVariable(*M, I8X, true, GlobalVariable::InternalLinkage,
|
||||||
cast<Constant>(ActualPtrName), Tmp);
|
cast<Constant>(ActualPtrName), Tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value *S;
|
Value *S;
|
||||||
@ -857,7 +857,7 @@ static void GenerateARCBBTerminatorAnnotation(const char *Name, BasicBlock *BB,
|
|||||||
S = new GlobalVariable(*M, I8X, true, GlobalVariable::InternalLinkage,
|
S = new GlobalVariable(*M, I8X, true, GlobalVariable::InternalLinkage,
|
||||||
cast<Constant>(ActualPtrName), SeqStr);
|
cast<Constant>(ActualPtrName), SeqStr);
|
||||||
}
|
}
|
||||||
Builder.CreateCall2(Callee, PtrName, S);
|
Builder.CreateCall2(Callee, PtrName, S);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Adds a source annotation to pointer and a state change annotation to Inst
|
/// Adds a source annotation to pointer and a state change annotation to Inst
|
||||||
@ -1325,17 +1325,17 @@ ObjCARCOpt::OptimizeRetainBlockCall(Function &F, Instruction *Inst,
|
|||||||
InstructionClass &Class) {
|
InstructionClass &Class) {
|
||||||
assert(GetBasicInstructionClass(Inst) == Class);
|
assert(GetBasicInstructionClass(Inst) == Class);
|
||||||
assert(IC_RetainBlock == Class);
|
assert(IC_RetainBlock == Class);
|
||||||
|
|
||||||
// If we can not optimize Inst, return false.
|
// If we can not optimize Inst, return false.
|
||||||
if (!IsRetainBlockOptimizable(Inst))
|
if (!IsRetainBlockOptimizable(Inst))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
CallInst *RetainBlock = cast<CallInst>(Inst);
|
CallInst *RetainBlock = cast<CallInst>(Inst);
|
||||||
RetainBlock->setCalledFunction(getRetainCallee(F.getParent()));
|
RetainBlock->setCalledFunction(getRetainCallee(F.getParent()));
|
||||||
// Remove copy_on_escape metadata.
|
// Remove copy_on_escape metadata.
|
||||||
RetainBlock->setMetadata(CopyOnEscapeMDKind, 0);
|
RetainBlock->setMetadata(CopyOnEscapeMDKind, 0);
|
||||||
Class = IC_Retain;
|
Class = IC_Retain;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1917,7 +1917,7 @@ ObjCARCOpt::VisitBottomUp(BasicBlock *BB,
|
|||||||
assert(I != BBStates.end());
|
assert(I != BBStates.end());
|
||||||
MyStates.MergeSucc(I->second);
|
MyStates.MergeSucc(I->second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARC_ANNOTATIONS
|
#ifdef ARC_ANNOTATIONS
|
||||||
if (EnableARCAnnotations) {
|
if (EnableARCAnnotations) {
|
||||||
@ -2319,7 +2319,7 @@ void ObjCARCOpt::MoveCalls(Value *Arg,
|
|||||||
CallInst::Create(getRetainCallee(M), MyArg, "", InsertPt);
|
CallInst::Create(getRetainCallee(M), MyArg, "", InsertPt);
|
||||||
Call->setDoesNotThrow();
|
Call->setDoesNotThrow();
|
||||||
Call->setTailCall();
|
Call->setTailCall();
|
||||||
|
|
||||||
DEBUG(dbgs() << "ObjCARCOpt::MoveCalls: Inserting new Release: " << *Call
|
DEBUG(dbgs() << "ObjCARCOpt::MoveCalls: Inserting new Release: " << *Call
|
||||||
<< "\n"
|
<< "\n"
|
||||||
" At insertion point: " << *InsertPt
|
" At insertion point: " << *InsertPt
|
||||||
|
Loading…
Reference in New Issue
Block a user