Home | History | Annotate | Download | only in CodeGen

Lines Matching full:cgf

36 DominatingValue<RValue>::saved_type::save(CodeGenFunction &CGF, RValue rv) {
46 CGF.CreateDefaultAlignTempAlloca(V->getType(), "saved-rvalue");
47 CGF.Builder.CreateStore(V, addr);
56 Address addr = CGF.CreateDefaultAlignTempAlloca(ComplexTy, "saved-complex");
57 CGF.Builder.CreateStore(V.first,
58 CGF.Builder.CreateStructGEP(addr, 0, CharUnits()));
60 CGF.CGM.getDataLayout().getTypeAllocSize(V.first->getType()));
61 CGF.Builder.CreateStore(V.second,
62 CGF.Builder.CreateStructGEP(addr, 1, offset));
73 CGF.CreateTempAlloca(V.getType(), CGF.getPointerAlign(), "saved-rvalue");
74 CGF.Builder.CreateStore(V.getPointer(), addr);
82 RValue DominatingValue<RValue>::saved_type::restore(CodeGenFunction &CGF) {
91 return RValue::get(CGF.Builder.CreateLoad(getSavingAddress(Value)));
95 auto addr = CGF.Builder.CreateLoad(getSavingAddress(Value));
100 llvm::Value *real = CGF.Builder.CreateLoad(
101 CGF.Builder.CreateStructGEP(address, 0, CharUnits()));
103 CGF.CGM.getDataLayout().getTypeAllocSize(real->getType()));
104 llvm::Value *imag = CGF.Builder.CreateLoad(
105 CGF.Builder.CreateStructGEP(address, 1, offset));
324 static void ResolveAllBranchFixups(CodeGenFunction &CGF,
329 for (unsigned I = 0, E = CGF.EHStack.getNumBranchFixups(); I != E; ++I) {
331 BranchFixup &Fixup = CGF.EHStack.getBranchFixup(I);
343 createStoreInstBefore(CGF.Builder.getInt32(Fixup.DestinationIndex),
344 CGF.getNormalCleanupDestSlot(),
353 Switch->addCase(CGF.Builder.getInt32(Fixup.DestinationIndex),
357 CGF.EHStack.clearFixups();
362 static llvm::SwitchInst *TransitionToCleanupSwitch(CodeGenFunction &CGF,
371 auto Load = createLoadInstBefore(CGF.getNormalCleanupDestSlot(),
464 static llvm::BasicBlock *CreateNormalEntry(CodeGenFunction &CGF,
469 Entry = CGF.createBasicBlock("cleanup");
480 static llvm::BasicBlock *SimplifyCleanupEntry(CodeGenFunction &CGF,
492 bool WasInsertBlock = CGF.Builder.GetInsertBlock() == Entry;
493 assert(!WasInsertBlock || CGF.Builder.GetInsertPoint() == Entry->end());
509 CGF.Builder.SetInsertPoint(Pred);
514 static void EmitCleanup(CodeGenFunction &CGF,
522 ContBB = CGF.createBasicBlock("cleanup.done");
523 llvm::BasicBlock *CleanupBB = CGF.createBasicBlock("cleanup.action");
525 = CGF.Builder.CreateLoad(ActiveFlag, "cleanup.is_active");
526 CGF.Builder.CreateCondBr(IsActive, CleanupBB, ContBB);
527 CGF.EmitBlock(CleanupBB);
531 Fn->Emit(CGF, flags);
532 assert(CGF.HaveInsertPoint() && "cleanup ended with no insertion point?");
536 CGF.EmitBlock(ContBB);
563 static void destroyOptimisticNormalEntry(CodeGenFunction &CGF,
569 llvm::BasicBlock *unreachableBB = CGF.getUnreachableBlock();
590 assert(condition->getOperand(0) == CGF.NormalCleanupDest);
1123 static void SetupCleanupBlockActivation(CodeGenFunction &CGF,
1127 EHCleanupScope &Scope = cast<EHCleanupScope>(*CGF.EHStack.find(C));
1133 (kind == ForActivation && CGF.isInConditionalBranch());
1141 (isActivatedInConditional || IsUsedAsNormalCleanup(CGF.EHStack, C))) {
1148 (isActivatedInConditional || IsUsedAsEHCleanup(CGF.EHStack, C))) {
1158 var = CGF.CreateTempAlloca(CGF.Builder.getInt1Ty(), CharUnits::One(),
1166 llvm::Constant *value = CGF.Builder.getInt1(kind == ForDeactivation);
1170 if (CGF.isInConditionalBranch()) {
1171 CGF.setBeforeOutermostConditional(value, var);
1177 CGF.Builder.CreateStore(CGF.Builder.getInt1(kind == ForActivation), var);