Lines Matching refs:IRB

58                                  BuilderTy &IRB, ScalarEvolution &SE) {  in getBoundsCheckCond()  argument
88 Value *ObjSize = IRB.CreateSub(Size, Offset); in getBoundsCheckCond()
91 : IRB.CreateICmpULT(Size, Offset); in getBoundsCheckCond()
96 : IRB.CreateICmpULT(ObjSize, NeededSizeVal); in getBoundsCheckCond()
97 Value *Or = IRB.CreateOr(Cmp2, Cmp3); in getBoundsCheckCond()
100 Value *Cmp1 = IRB.CreateICmpSLT(Offset, ConstantInt::get(IntTy, 0)); in getBoundsCheckCond()
101 Or = IRB.CreateOr(Cmp1, Or); in getBoundsCheckCond()
113 static void insertBoundsCheck(Value *Or, BuilderTy &IRB, GetTrapBBT GetTrapBB) { in insertBoundsCheck() argument
124 BasicBlock::iterator SplitI = IRB.GetInsertPoint(); in insertBoundsCheck()
133 BranchInst::Create(GetTrapBB(IRB), OldBB); in insertBoundsCheck()
138 BranchInst::Create(GetTrapBB(IRB), Cont, Or, OldBB); in insertBoundsCheck()
157 BuilderTy IRB(I.getParent(), BasicBlock::iterator(&I), TargetFolder(DL)); in addBoundsChecking() local
161 ObjSizeEval, IRB, SE); in addBoundsChecking()
165 DL, TLI, ObjSizeEval, IRB, SE); in addBoundsChecking()
170 DL, TLI, ObjSizeEval, IRB, SE); in addBoundsChecking()
174 DL, TLI, ObjSizeEval, IRB, SE); in addBoundsChecking()
184 auto GetTrapBB = [&TrapBB](BuilderTy &IRB) { in addBoundsChecking() argument
188 Function *Fn = IRB.GetInsertBlock()->getParent(); in addBoundsChecking()
191 auto DebugLoc = IRB.getCurrentDebugLocation(); in addBoundsChecking()
192 IRBuilder<>::InsertPointGuard Guard(IRB); in addBoundsChecking()
194 IRB.SetInsertPoint(TrapBB); in addBoundsChecking()
197 CallInst *TrapCall = IRB.CreateCall(F, {}); in addBoundsChecking()
201 IRB.CreateUnreachable(); in addBoundsChecking()
209 BuilderTy IRB(Inst->getParent(), BasicBlock::iterator(Inst), TargetFolder(DL)); in addBoundsChecking() local
210 insertBoundsCheck(Entry.second, IRB, GetTrapBB); in addBoundsChecking()