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()
156 BuilderTy IRB(I.getParent(), BasicBlock::iterator(&I), TargetFolder(DL)); in addBoundsChecking() local
160 ObjSizeEval, IRB, SE); in addBoundsChecking()
164 DL, TLI, ObjSizeEval, IRB, SE); in addBoundsChecking()
169 DL, TLI, ObjSizeEval, IRB, SE); in addBoundsChecking()
173 DL, TLI, ObjSizeEval, IRB, SE); in addBoundsChecking()
183 auto GetTrapBB = [&TrapBB](BuilderTy &IRB) { in addBoundsChecking() argument
187 Function *Fn = IRB.GetInsertBlock()->getParent(); in addBoundsChecking()
190 auto DebugLoc = IRB.getCurrentDebugLocation(); in addBoundsChecking()
191 IRBuilder<>::InsertPointGuard Guard(IRB); in addBoundsChecking()
193 IRB.SetInsertPoint(TrapBB); in addBoundsChecking()
196 CallInst *TrapCall = IRB.CreateCall(F, {}); in addBoundsChecking()
200 IRB.CreateUnreachable(); in addBoundsChecking()
208 BuilderTy IRB(Inst->getParent(), BasicBlock::iterator(Inst), TargetFolder(DL)); in addBoundsChecking() local
209 insertBoundsCheck(Entry.second, IRB, GetTrapBB); in addBoundsChecking()