Lines Matching refs:IRB

59                                  BuilderTy &IRB, ScalarEvolution &SE) {  in getBoundsCheckCond()  argument
76 Value *NeededSizeVal = IRB.CreateTypeSize(IndexTy, NeededSize); in getBoundsCheckCond()
89 Value *ObjSize = IRB.CreateSub(Size, Offset); in getBoundsCheckCond()
92 : IRB.CreateICmpULT(Size, Offset); in getBoundsCheckCond()
97 : IRB.CreateICmpULT(ObjSize, NeededSizeVal); in getBoundsCheckCond()
98 Value *Or = IRB.CreateOr(Cmp2, Cmp3); in getBoundsCheckCond()
101 Value *Cmp1 = IRB.CreateICmpSLT(Offset, ConstantInt::get(IndexTy, 0)); in getBoundsCheckCond()
102 Or = IRB.CreateOr(Cmp1, Or); in getBoundsCheckCond()
114 static void insertBoundsCheck(Value *Or, BuilderTy &IRB, GetTrapBBT GetTrapBB) { in insertBoundsCheck() argument
125 BasicBlock::iterator SplitI = IRB.GetInsertPoint(); in insertBoundsCheck()
134 BranchInst::Create(GetTrapBB(IRB), OldBB); in insertBoundsCheck()
139 BranchInst::Create(GetTrapBB(IRB), Cont, Or, OldBB); in insertBoundsCheck()
158 BuilderTy IRB(I.getParent(), BasicBlock::iterator(&I), TargetFolder(DL)); in addBoundsChecking() local
162 ObjSizeEval, IRB, SE); in addBoundsChecking()
166 DL, TLI, ObjSizeEval, IRB, SE); in addBoundsChecking()
171 DL, TLI, ObjSizeEval, IRB, SE); in addBoundsChecking()
175 DL, TLI, ObjSizeEval, IRB, SE); in addBoundsChecking()
185 auto GetTrapBB = [&TrapBB](BuilderTy &IRB) { in addBoundsChecking() argument
186 Function *Fn = IRB.GetInsertBlock()->getParent(); in addBoundsChecking()
187 auto DebugLoc = IRB.getCurrentDebugLocation(); in addBoundsChecking()
188 IRBuilder<>::InsertPointGuard Guard(IRB); in addBoundsChecking()
194 IRB.SetInsertPoint(TrapBB); in addBoundsChecking()
202 IRB.CreateCall(F, ConstantInt::get(IRB.getInt8Ty(), Fn->size())); in addBoundsChecking()
204 TrapCall = IRB.CreateCall(F, {}); in addBoundsChecking()
210 IRB.CreateUnreachable(); in addBoundsChecking()
218 BuilderTy IRB(Inst->getParent(), BasicBlock::iterator(Inst), TargetFolder(DL)); in addBoundsChecking() local
219 insertBoundsCheck(Entry.second, IRB, GetTrapBB); in addBoundsChecking()