Home | History | Annotate | Download | only in CodeGen

Lines Matching full:cgf

461   llvm::Value *GetSelector(CodeGenFunction &CGF, Selector Sel,
474 virtual llvm::Value *GetClassNamed(CodeGenFunction &CGF,
480 virtual llvm::Value *LookupIMP(CodeGenFunction &CGF,
489 virtual llvm::Value *LookupIMPSuper(CodeGenFunction &CGF,
514 GenerateMessageSend(CodeGenFunction &CGF, ReturnValueSlot Return,
520 GenerateMessageSendSuper(CodeGenFunction &CGF, ReturnValueSlot Return,
526 llvm::Value *GetClass(CodeGenFunction &CGF,
528 llvm::Value *GetSelector(CodeGenFunction &CGF, Selector Sel) override;
529 Address GetAddrOfSelector(CodeGenFunction &CGF, Selector Sel) override;
530 llvm::Value *GetSelector(CodeGenFunction &CGF,
539 llvm::Value *GenerateProtocolRef(CodeGenFunction &CGF,
553 void EmitTryStmt(CodeGenFunction &CGF,
555 void EmitSynchronizedStmt(CodeGenFunction &CGF,
557 void EmitThrowStmt(CodeGenFunction &CGF,
560 llvm::Value * EmitObjCWeakRead(CodeGenFunction &CGF,
562 void EmitObjCWeakAssign(CodeGenFunction &CGF,
564 void EmitObjCGlobalAssign(CodeGenFunction &CGF,
567 void EmitObjCIvarAssign(CodeGenFunction &CGF, llvm::Value *src,
569 void EmitObjCStrongCastAssign(CodeGenFunction &CGF,
571 void EmitGCMemmoveCollectable(CodeGenFunction &CGF, Address DestPtr,
574 LValue EmitObjCValueForIvar(CodeGenFunction &CGF, QualType ObjectTy,
577 llvm::Value *EmitIvarOffset(CodeGenFunction &CGF,
580 llvm::Value *EmitNSAutoreleasePoolClassRef(CodeGenFunction &CGF) override;
618 llvm::Value *LookupIMP(CodeGenFunction &CGF, llvm::Value *&Receiver,
621 CGBuilderTy &Builder = CGF.Builder;
625 llvm::CallSite imp = CGF.EmitRuntimeCallOrInvoke(MsgLookupFn, args);
630 llvm::Value *LookupIMPSuper(CodeGenFunction &CGF, Address ObjCSuper,
632 CGBuilderTy &Builder = CGF.Builder;
635 return CGF.EmitNounwindRuntimeCall(MsgLookupSuperFn, lookupArgs);
681 llvm::Value *LookupIMP(CodeGenFunction &CGF, llvm::Value *&Receiver,
684 CGBuilderTy &Builder = CGF.Builder;
689 CGF.CreateTempAlloca(Receiver->getType(), CGF.getPointerAlign());
694 if (isa<ObjCMethodDecl>(CGF.CurCodeDecl)) {
695 self = CGF.LoadObjCSelf();
707 llvm::CallSite slot = CGF.EmitRuntimeCallOrInvoke(LookupFn, args);
714 CGF.getPointerAlign());
722 llvm::Value *LookupIMPSuper(CodeGenFunction &CGF, Address ObjCSuper,
725 CGBuilderTy &Builder = CGF.Builder;
729 CGF.EmitNounwindRuntimeCall(SlotLookupSuperFn, lookupArgs);
733 CGF.getPointerAlign());
838 llvm::Value *LookupIMP(CodeGenFunction &CGF, llvm::Value *&Receiver,
841 CGBuilderTy &Builder = CGF.Builder;
848 imp = CGF.EmitRuntimeCallOrInvoke(MsgLookupFnSRet, args);
850 imp = CGF.EmitRuntimeCallOrInvoke(MsgLookupFn, args);
856 llvm::Value *LookupIMPSuper(CodeGenFunction &CGF, Address ObjCSuper,
858 CGBuilderTy &Builder = CGF.Builder;
863 return CGF.EmitNounwindRuntimeCall(MsgLookupSuperFnSRet, lookupArgs);
865 return CGF.EmitNounwindRuntimeCall(MsgLookupSuperFn, lookupArgs);
868 llvm::Value *GetClassNamed(CodeGenFunction &CGF,
871 return CGObjCGNU::GetClassNamed(CGF, Name, isWeak);
1056 llvm::Value *CGObjCGNU::GetClassNamed(CodeGenFunction &CGF,
1073 return CGF.EmitNounwindRuntimeCall(ClassLookupFn, ClassName);
1078 CGF,
1080 return GetClassNamed(CGF, OID->getNameAsString(), OID->isWeakImported());
1083 llvm::Value *CGObjCGNU::EmitNSAutoreleasePoolClassRef(CodeGenFunction &CGF) {
1084 return GetClassNamed(CGF, "NSAutoreleasePool", false);
1087 llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF, Selector Sel,
1109 Address CGObjCGNU::GetAddrOfSelector(CodeGenFunction &CGF, Selector Sel) {
1110 llvm::Value *SelValue = GetSelector(CGF, Sel);
1114 Address tmp = CGF.CreateTempAlloca(SelValue->getType(),
1115 CGF.getPointerAlign());
1116 CGF.Builder.CreateStore(SelValue, tmp);
1120 llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF, Selector Sel) {
1121 return GetSelector(CGF, Sel, std::string());
1124 llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF,
1128 return GetSelector(CGF, Method->getSelector(), SelTypes);
1261 CGObjCGNU::GenerateMessageSendSuper(CodeGenFunction &CGF,
1271 CGBuilderTy &Builder = CGF.Builder;
1282 llvm::Value *cmd = GetSelector(CGF, Sel);
1286 ActualArgs.add(RValue::get(cmd), CGF.getContext().getObjCSelType());
1333 Builder.CreateAlignedLoad(ReceiverClass, CGF.getPointerAlign());
1340 CGF.getPointerAlign());
1345 Builder.CreateStructGEP(ObjCSuper, 1, CGF.getPointerSize()));
1350 llvm::Value *imp = LookupIMPSuper(CGF, ObjCSuper, cmd, MSI);
1361 RValue msgRet = CGF.EmitCall(MSI.CallInfo, imp, Return, ActualArgs,
1369 CGObjCGNU::GenerateMessageSend(CodeGenFunction &CGF,
1377 CGBuilderTy &Builder = CGF.Builder;
1410 messageBB = CGF.createBasicBlock("msgSend");
1411 continueBB = CGF.createBasicBlock("continue");
1416 CGF.EmitBlock(messageBB);
1422 cmd = GetSelector(CGF, Method);
1424 cmd = GetSelector(CGF, Sel);
1437 ActualArgs.add(RValue::get(cmd), CGF.getContext().getObjCSelType());
1450 imp = LookupIMP(CGF, Receiver, cmd, node, MSI);
1474 RValue msgRet = CGF.EmitCall(MSI.CallInfo, imp, Return, ActualArgs,
1480 messageBB = CGF.Builder.GetInsertBlock();
1481 CGF.Builder.CreateBr(continueBB);
1482 CGF.EmitBlock(continueBB);
1493 Address NullVal = CGF.CreateTempAlloca(RetTy, v.getAlignment(), "null");
1494 CGF.InitTempAlloca(NullVal, llvm::Constant::getNullValue(RetTy));
1758 llvm::Value *CGObjCGNU::GenerateProtocolRef(CodeGenFunction &CGF,
1763 return CGF.Builder.CreateBitCast(protocol, llvm::PointerType::getUnqual(T));
2678 void CGObjCGNU::EmitSynchronizedStmt(CodeGenFunction &CGF,
2680 EmitAtSynchronizedStmt(CGF, S, SyncEnterFn, SyncExitFn);
2684 void CGObjCGNU::EmitTryStmt(CodeGenFunction &CGF,
2697 EmitTryCatchStmt(CGF, S, EnterCatchFn, ExitCatchFn, ExceptionReThrowFn);
2700 void CGObjCGNU::EmitThrowStmt(CodeGenFunction &CGF,
2706 llvm::Value *Exception = CGF.EmitObjCThrowOperand(ThrowExpr);
2709 assert((!CGF.ObjCEHValueStack.empty() && CGF.ObjCEHValueStack.back()) &&
2711 ExceptionAsObject = CGF.ObjCEHValueStack.back();
2713 ExceptionAsObject = CGF.Builder.CreateBitCast(ExceptionAsObject, IdTy);
2715 CGF.EmitRuntimeCallOrInvoke(ExceptionThrowFn, ExceptionAsObject);
2717 CGF.Builder.CreateUnreachable();
2719 CGF.Builder.ClearInsertionPoint();
2722 llvm::Value * CGObjCGNU::EmitObjCWeakRead(CodeGenFunction &CGF,
2724 CGBuilderTy &B = CGF.Builder;
2730 void CGObjCGNU::EmitObjCWeakAssign(CodeGenFunction &CGF,
2732 CGBuilderTy &B = CGF.Builder;
2739 void CGObjCGNU::EmitObjCGlobalAssign(CodeGenFunction &CGF,
2742 CGBuilderTy &B = CGF.Builder;
2751 void CGObjCGNU::EmitObjCIvarAssign(CodeGenFunction &CGF,
2754 CGBuilderTy &B = CGF.Builder;
2761 void CGObjCGNU::EmitObjCStrongCastAssign(CodeGenFunction &CGF,
2763 CGBuilderTy &B = CGF.Builder;
2770 void CGObjCGNU::EmitGCMemmoveCollectable(CodeGenFunction &CGF,
2774 CGBuilderTy &B = CGF.Builder;
2828 LValue CGObjCGNU::EmitObjCValueForIvar(CodeGenFunction &CGF,
2835 return EmitValueForIvarAtOffset(CGF, ID, BaseValue, Ivar, CVRQualifiers,
2836 EmitIvarOffset(CGF, ID, Ivar));
2855 llvm::Value *CGObjCGNU::EmitIvarOffset(CodeGenFunction &CGF,
2861 return CGF.Builder.CreateZExtOrBitCast(
2862 CGF.Builder.CreateDefaultAlignedLoad(CGF.Builder.CreateAlignedLoad(
2864 CGF.getPointerAlign(), "ivar")),
2877 Offset = CGF.Builder.CreateAlignedLoad(Offset, Align);
2879 Offset = CGF.Builder.CreateZExtOrBitCast(Offset, PtrDiffTy);
2882 uint64_t Offset = ComputeIvarBaseOffset(CGF.CGM, Interface, Ivar);