Home
last modified time | relevance | path

Searched refs:IRB (Results 1 – 25 of 51) sorted by relevance

123

/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Instrumentation/
H A DMemorySanitizer.cpp713 IRBuilder<> IRB(*C); in createKernelApi() local
724 WarningFn = M.getOrInsertFunction("__msan_warning", IRB.getVoidTy(), in createKernelApi()
725 IRB.getInt32Ty()); in createKernelApi()
729 ArrayType::get(IRB.getInt64Ty(), kParamTLSSize / 8), in createKernelApi()
730 ArrayType::get(IRB.getInt64Ty(), kRetvalTLSSize / 8), in createKernelApi()
731 ArrayType::get(IRB.getInt64Ty(), kParamTLSSize / 8), in createKernelApi()
732 ArrayType::get(IRB.getInt64Ty(), kParamTLSSize / 8), /* va_arg_origin */ in createKernelApi()
733 IRB.getInt64Ty(), ArrayType::get(OriginTy, kParamTLSSize / 4), OriginTy, in createKernelApi()
738 Type *RetTy = StructType::get(PointerType::get(IRB.getInt8Ty(), 0), in createKernelApi()
739 PointerType::get(IRB.getInt32Ty(), 0)); in createKernelApi()
[all …]
H A DHWAddressSanitizer.cpp212 Value *getOpaqueNoopCast(IRBuilder<> &IRB, Value *Val);
214 Value *getDynamicShadowIfunc(IRBuilder<> &IRB);
215 Value *getShadowNonTls(IRBuilder<> &IRB);
218 Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);
229 bool tagAlloca(IRBuilder<> &IRB, AllocaInst *AI, Value *Tag, size_t Size);
230 Value *tagPointer(IRBuilder<> &IRB, Type *Ty, Value *PtrLong, Value *Tag);
231 Value *untagPointer(IRBuilder<> &IRB, Value *PtrLong);
236 Value *readRegister(IRBuilder<> &IRB, StringRef Name);
238 Value *getNextTagWithCall(IRBuilder<> &IRB);
239 Value *getStackBaseTag(IRBuilder<> &IRB);
[all …]
H A DThreadSanitizer.cpp249 IRBuilder<> IRB(M.getContext()); in initialize() local
255 IRB.getVoidTy(), IRB.getInt8PtrTy()); in initialize()
257 M.getOrInsertFunction("__tsan_func_exit", Attr, IRB.getVoidTy()); in initialize()
259 IRB.getVoidTy()); in initialize()
261 M.getOrInsertFunction("__tsan_ignore_thread_end", Attr, IRB.getVoidTy()); in initialize()
262 IntegerType *OrdTy = IRB.getInt32Ty(); in initialize()
269 TsanRead[i] = M.getOrInsertFunction(ReadName, Attr, IRB.getVoidTy(), in initialize()
270 IRB.getInt8PtrTy()); in initialize()
273 TsanWrite[i] = M.getOrInsertFunction(WriteName, Attr, IRB.getVoidTy(), in initialize()
274 IRB.getInt8PtrTy()); in initialize()
[all …]
H A DAddressSanitizer.cpp663 Value *createSlowPathCmp(IRBuilder<> &IRB, Value *AddrLong,
669 Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);
807 bool InstrumentGlobals(IRBuilder<> &IRB, Module &M, bool *CtorComdat);
808 void InstrumentGlobalsCOFF(IRBuilder<> &IRB, Module &M,
811 void InstrumentGlobalsELF(IRBuilder<> &IRB, Module &M,
815 void InstrumentGlobalsMachO(IRBuilder<> &IRB, Module &M,
819 InstrumentGlobalsWithMetadataArray(IRBuilder<> &IRB, Module &M,
1023 IRBuilder<> IRB(InstBefore); in unpoisonDynamicAllocasBeforeInst() local
1024 Value *DynamicAreaPtr = IRB.CreatePtrToInt(SavedStack, IntptrTy); in unpoisonDynamicAllocasBeforeInst()
1034 Value *DynamicAreaOffset = IRB.CreateCall(DynamicAreaOffsetFunc, {}); in unpoisonDynamicAllocasBeforeInst()
[all …]
H A DMemProfiler.cpp180 Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);
296 Value *MemProfiler::memToShadow(Value *Shadow, IRBuilder<> &IRB) { in memToShadow() argument
298 Shadow = IRB.CreateAnd(Shadow, Mapping.Mask); in memToShadow()
299 Shadow = IRB.CreateLShr(Shadow, Mapping.Scale); in memToShadow()
302 return IRB.CreateAdd(Shadow, DynamicShadowOffset); in memToShadow()
307 IRBuilder<> IRB(MI); in instrumentMemIntrinsic() local
309 IRB.CreateCall( in instrumentMemIntrinsic()
311 {IRB.CreatePointerCast(MI->getOperand(0), IRB.getInt8PtrTy()), in instrumentMemIntrinsic()
312 IRB.CreatePointerCast(MI->getOperand(1), IRB.getInt8PtrTy()), in instrumentMemIntrinsic()
313 IRB.CreateIntCast(MI->getOperand(2), IntptrTy, false)}); in instrumentMemIntrinsic()
[all …]
H A DBoundsChecking.cpp60 BuilderTy &IRB, ScalarEvolution &SE) { in getBoundsCheckCond() argument
90 Value *ObjSize = IRB.CreateSub(Size, Offset); in getBoundsCheckCond()
93 : IRB.CreateICmpULT(Size, Offset); in getBoundsCheckCond()
98 : IRB.CreateICmpULT(ObjSize, NeededSizeVal); in getBoundsCheckCond()
99 Value *Or = IRB.CreateOr(Cmp2, Cmp3); in getBoundsCheckCond()
102 Value *Cmp1 = IRB.CreateICmpSLT(Offset, ConstantInt::get(IntTy, 0)); in getBoundsCheckCond()
103 Or = IRB.CreateOr(Cmp1, Or); in getBoundsCheckCond()
115 static void insertBoundsCheck(Value *Or, BuilderTy &IRB, GetTrapBBT GetTrapBB) { in insertBoundsCheck() argument
126 BasicBlock::iterator SplitI = IRB.GetInsertPoint(); in insertBoundsCheck()
135 BranchInst::Create(GetTrapBB(IRB), OldBB); in insertBoundsCheck()
[all …]
H A DDataFlowSanitizer.cpp485 Value *getShadowOffset(Value *Addr, IRBuilder<> &IRB);
611 Value *getArgTLS(Type *T, unsigned ArgOffset, IRBuilder<> &IRB);
614 Value *getRetvalTLS(Type *T, IRBuilder<> &IRB);
619 Value *getArgOriginTLS(unsigned ArgNo, IRBuilder<> &IRB);
690 IRBuilder<> &IRB);
692 Value *collapseToPrimitiveShadow(Value *Shadow, IRBuilder<> &IRB);
721 Value *updateOrigin(Value *V, IRBuilder<> &IRB);
725 Value *updateOriginIfTainted(Value *Shadow, Value *Origin, IRBuilder<> &IRB);
729 Value *originToIntptr(IRBuilder<> &IRB, Value *Origin);
733 void paintOrigin(IRBuilder<> &IRB, Value *Origin, Value *StoreOriginAddr,
[all …]
H A DSanitizerCoverage.cpp346 IRBuilder<> IRB(M.getContext()); in CreateSecStartEnd() local
352 auto SecStartI8Ptr = IRB.CreatePointerCast(SecStart, Int8PtrTy); in CreateSecStartEnd()
353 auto GEP = IRB.CreateGEP(Int8Ty, SecStartI8Ptr, in CreateSecStartEnd()
355 return std::make_pair(IRB.CreatePointerCast(GEP, Ty), SecEnd); in CreateSecStartEnd()
412 IRBuilder<> IRB(*C); in instrumentModule() local
413 Int64PtrTy = PointerType::getUnqual(IRB.getInt64Ty()); in instrumentModule()
414 Int32PtrTy = PointerType::getUnqual(IRB.getInt32Ty()); in instrumentModule()
415 Int8PtrTy = PointerType::getUnqual(IRB.getInt8Ty()); in instrumentModule()
416 Int1PtrTy = PointerType::getUnqual(IRB.getInt1Ty()); in instrumentModule()
417 Int64Ty = IRB.getInt64Ty(); in instrumentModule()
[all …]
H A DInstrProfiling.cpp1057 IRBuilder<> IRB(BasicBlock::Create(M->getContext(), "", RegisterF)); in emitRegistration() local
1060 IRB.CreateCall(RuntimeRegisterF, IRB.CreateBitCast(Data, VoidPtrTy)); in emitRegistration()
1063 IRB.CreateCall(RuntimeRegisterF, IRB.CreateBitCast(Data, VoidPtrTy)); in emitRegistration()
1072 IRB.CreateCall(NamesRegisterF, {IRB.CreateBitCast(NamesVar, VoidPtrTy), in emitRegistration()
1073 IRB.getInt64(NamesSize)}); in emitRegistration()
1076 IRB.CreateRetVoid(); in emitRegistration()
1106 IRBuilder<> IRB(BasicBlock::Create(M->getContext(), "", User)); in emitRuntimeHook() local
1107 auto *Load = IRB.CreateLoad(Int32Ty, Var); in emitRuntimeHook()
1108 IRB.CreateRet(Load); in emitRuntimeHook()
1156 IRBuilder<> IRB(BasicBlock::Create(M->getContext(), "", F)); in emitInitialization() local
[all …]
H A DControlHeightReduction.cpp388 IRBuilder<> &IRB,
392 IRBuilder<> &IRB,
397 IRBuilder<> &IRB,
1842 IRBuilder<> IRB(PreEntryBlock->getTerminator()); in fixupBranchesAndSelects() local
1846 fixupBranch(R, Scope, IRB, MergedCondition, CHRBranchBias); in fixupBranchesAndSelects()
1850 fixupSelect(SI, Scope, IRB, MergedCondition, CHRBranchBias); in fixupBranchesAndSelects()
1878 IRBuilder<> &IRB, in fixupBranch() argument
1908 addToMergedCondition(ConditionTrue, Cond, BI, Scope, IRB, in fixupBranch()
1922 IRBuilder<> &IRB, in fixupSelect() argument
1936 addToMergedCondition(IsTrueBiased, Cond, SI, Scope, IRB, in fixupSelect()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/WebAssembly/
H A DWebAssemblyLowerEmscriptenEHSjLj.cpp359 IRBuilder<> IRB(M->getContext()); in getAddrIntType() local
360 return IRB.getIntNTy(M->getDataLayout().getPointerSizeInBits()); in getAddrIntType()
374 IRBuilder<> IRB(M->getContext()); in getAddrSizeInt() local
375 return IRB.getIntN(M->getDataLayout().getPointerSizeInBits(), C); in getAddrSizeInt()
417 IRBuilder<> IRB(C); in wrapInvoke() local
418 IRB.SetInsertPoint(CI); in wrapInvoke()
422 IRB.CreateStore(getAddrSizeInt(M, 0), ThrewGV); in wrapInvoke()
430 CallInst *NewCall = IRB.CreateCall(getInvokeWrapper(CI), Args); in wrapInvoke()
470 IRB.CreateLoad(getAddrIntType(M), ThrewGV, ThrewGV->getName() + ".val"); in wrapInvoke()
471 IRB.CreateStore(getAddrSizeInt(M, 0), ThrewGV); in wrapInvoke()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/AArch64/
H A DAArch64StackTagging.cpp126 IRBuilder<> IRB(SI); in addStore() local
127 applyStore(IRB, Offset, Offset + StoreSize, SI->getOperand(0)); in addStore()
135 IRBuilder<> IRB(MSI); in addMemSet() local
136 applyMemSet(IRB, Offset, Offset + StoreSize, in addMemSet()
141 void applyMemSet(IRBuilder<> &IRB, int64_t Start, int64_t End, in applyMemSet() argument
157 ConstantInt::get(IRB.getInt64Ty(), Cst * V->getZExtValue()); in applyMemSet()
163 CurrentV = IRB.CreateOr(CurrentV, C); in applyMemSet()
170 Value *sliceValue(IRBuilder<> &IRB, Value *V, int64_t Offset) { in sliceValue() argument
172 V = IRB.CreateLShr(V, Offset * 8); in sliceValue()
173 V = IRB.CreateZExtOrTrunc(V, IRB.getInt64Ty()); in sliceValue()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/CodeGen/
H A DWasmEHPrepare.cpp151 IRBuilder<> IRB(M.getContext()); in doInitialization() local
152 LPadContextTy = StructType::get(IRB.getInt32Ty(), // lpad_index in doInitialization()
153 IRB.getInt8PtrTy(), // lsda in doInitialization()
154 IRB.getInt32Ty() // selector in doInitialization()
185 IRBuilder<> IRB(F.getContext()); in prepareThrows() local
204 IRB.SetInsertPoint(BB); in prepareThrows()
205 IRB.CreateUnreachable(); in prepareThrows()
214 IRBuilder<> IRB(F.getContext()); in prepareEHPads() local
235 LPadIndexField = IRB.CreateConstGEP2_32(LPadContextTy, LPadContextGV, 0, 0, in prepareEHPads()
238 IRB.CreateConstGEP2_32(LPadContextTy, LPadContextGV, 0, 1, "lsda_gep"); in prepareEHPads()
[all …]
H A DSafeStack.cpp153 Value *getStackGuard(IRBuilder<> &IRB, Function &F);
156 void checkStackGuard(IRBuilder<> &IRB, Function &F, Instruction &RI,
177 Value *moveStaticAllocasToUnsafeStack(IRBuilder<> &IRB, Function &F,
189 createStackRestorePoints(IRBuilder<> &IRB, Function &F,
374 Value *SafeStack::getStackGuard(IRBuilder<> &IRB, Function &F) { in getStackGuard() argument
375 Value *StackGuardVar = TL.getIRStackGuard(IRB); in getStackGuard()
379 return IRB.CreateLoad(StackPtrTy, StackGuardVar, "StackGuard"); in getStackGuard()
435 SafeStack::createStackRestorePoints(IRBuilder<> &IRB, Function &F, in createStackRestorePoints() argument
453 DynamicTop = IRB.CreateAlloca(StackPtrTy, /*ArraySize=*/nullptr, in createStackRestorePoints()
455 IRB.CreateStore(StaticTop, DynamicTop); in createStackRestorePoints()
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Scalar/
H A DSROA.cpp1360 IRBuilderTy IRB(&SI); in speculateSelectInstLoads() local
1368 IRB.SetInsertPoint(LI); in speculateSelectInstLoads()
1369 LoadInst *TL = IRB.CreateLoad(LI->getType(), TV, in speculateSelectInstLoads()
1371 LoadInst *FL = IRB.CreateLoad(LI->getType(), FV, in speculateSelectInstLoads()
1386 Value *V = IRB.CreateSelect(SI.getCondition(), TL, FL, in speculateSelectInstLoads()
1400 static Value *buildGEP(IRBuilderTy &IRB, Value *BasePtr, in buildGEP() argument
1411 return IRB.CreateInBoundsGEP(BasePtr->getType()->getPointerElementType(), in buildGEP()
1424 static Value *getNaturalGEPWithType(IRBuilderTy &IRB, const DataLayout &DL, in getNaturalGEPWithType() argument
1429 return buildGEP(IRB, BasePtr, Indices, NamePrefix); in getNaturalGEPWithType()
1444 Indices.push_back(IRB.getIntN(OffsetSize, 0)); in getNaturalGEPWithType()
[all …]
H A DFloat2Int.cpp461 IRBuilder<> IRB(I); in convert() local
467 NewV = IRB.CreateZExtOrTrunc(NewOperands[0], I->getType()); in convert()
471 NewV = IRB.CreateSExtOrTrunc(NewOperands[0], I->getType()); in convert()
477 NewV = IRB.CreateICmp(P, NewOperands[0], NewOperands[1], I->getName()); in convert()
482 NewV = IRB.CreateZExtOrTrunc(NewOperands[0], ToTy); in convert()
486 NewV = IRB.CreateSExtOrTrunc(NewOperands[0], ToTy); in convert()
490 NewV = IRB.CreateNeg(NewOperands[0], I->getName()); in convert()
496 NewV = IRB.CreateBinOp(mapBinOpcode(I->getOpcode()), in convert()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/AMDGPU/
H A DAMDGPULateCodeGenPrepare.cpp158 IRBuilder<> IRB(&LI); in visitLoadInst() local
159 IRB.SetCurrentDebugLocation(LI.getDebugLoc()); in visitLoadInst()
167 auto *NewPtr = IRB.CreateBitCast( in visitLoadInst()
168 IRB.CreateConstGEP1_64(IRB.CreatePointerBitCastOrAddrSpaceCast(Base, Int8PtrTy), in visitLoadInst()
171 LoadInst *NewLd = IRB.CreateAlignedLoad(IRB.getInt32Ty(), NewPtr, Align(4)); in visitLoadInst()
176 auto *NewVal = IRB.CreateBitCast( in visitLoadInst()
177 IRB.CreateTrunc(IRB.CreateLShr(NewLd, ShAmt), IntNTy), LI.getType()); in visitLoadInst()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/
H A DModuleUtils.cpp27 IRBuilder<> IRB(M.getContext()); in appendToGlobalArray() local
28 FunctionType *FnTy = FunctionType::get(IRB.getVoidTy(), false); in appendToGlobalArray()
34 IRB.getInt32Ty(), PointerType::getUnqual(FnTy), IRB.getInt8PtrTy()); in appendToGlobalArray()
47 CSVals[0] = IRB.getInt32(Priority); in appendToGlobalArray()
49 CSVals[2] = Data ? ConstantExpr::getPointerCast(Data, IRB.getInt8PtrTy()) in appendToGlobalArray()
50 : Constant::getNullValue(IRB.getInt8PtrTy()); in appendToGlobalArray()
144 IRBuilder<> IRB(Ctor->getEntryBlock().getTerminator()); in createSanitizerCtorAndInitFunctions() local
145 IRB.CreateCall(InitFunction, InitArgs); in createSanitizerCtorAndInitFunctions()
148 VersionCheckName, FunctionType::get(IRB.getVoidTy(), {}, false), in createSanitizerCtorAndInitFunctions()
150 IRB.CreateCall(VersionCheckFunction, {}); in createSanitizerCtorAndInitFunctions()
/netbsd-src/external/apache2/llvm/dist/clang/lib/CodeGen/
H A DCGGPUBuiltin.cpp151 llvm::IRBuilder<> IRB(Builder.GetInsertBlock(), Builder.GetInsertPoint()); in EmitAMDGPUDevicePrintfCallExpr() local
152 IRB.SetCurrentDebugLocation(Builder.getCurrentDebugLocation()); in EmitAMDGPUDevicePrintfCallExpr()
153 auto Printf = llvm::emitAMDGPUPrintfCall(IRB, Args); in EmitAMDGPUDevicePrintfCallExpr()
154 Builder.SetInsertPoint(IRB.GetInsertBlock(), IRB.GetInsertPoint()); in EmitAMDGPUDevicePrintfCallExpr()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/Hexagon/
H A DHexagonGenExtract.cpp211 IRBuilder<> IRB(In); in INITIALIZE_PASS_DEPENDENCY() local
216 Value *NewIn = IRB.CreateCall(ExtF, {BF, IRB.getInt32(W), IRB.getInt32(SR)}); in INITIALIZE_PASS_DEPENDENCY()
218 NewIn = IRB.CreateShl(NewIn, SL, CSL->getName()); in INITIALIZE_PASS_DEPENDENCY()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/ARM/
H A DARMParallelDSP.cpp769 IRBuilder<NoFolder> IRB(DomLoad->getParent(), in CreateWideLoad() local
776 Value *VecPtr = IRB.CreateBitCast(Base->getPointerOperand(), in CreateWideLoad()
778 LoadInst *WideLoad = IRB.CreateAlignedLoad(LoadTy, VecPtr, Base->getAlign()); in CreateWideLoad()
787 Value *Bottom = IRB.CreateTrunc(WideLoad, Base->getType()); in CreateWideLoad()
788 Value *NewBaseSExt = IRB.CreateSExt(Bottom, BaseSExt->getType()); in CreateWideLoad()
793 Value *Top = IRB.CreateLShr(WideLoad, ShiftVal); in CreateWideLoad()
794 Value *Trunc = IRB.CreateTrunc(Top, OffsetTy); in CreateWideLoad()
795 Value *NewOffsetSExt = IRB.CreateSExt(Trunc, OffsetSExt->getType()); in CreateWideLoad()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/SystemZ/
H A DSystemZTDC.cpp375 IRBuilder<> IRB(I); in runOnFunction() local
377 Instruction *TDC = IRB.CreateCall(TDCFunc, {V, MaskVal}); in runOnFunction()
378 Value *ICmp = IRB.CreateICmp(CmpInst::ICMP_NE, TDC, Zero32); in runOnFunction()
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Frontend/OpenMP/
H A DOMPIRBuilder.h152 LocationDescription(const IRBuilder<T, U> &IRB) in LocationDescription()
153 : IP(IRB.saveIP()), DL(IRB.getCurrentDebugLocation()) {} in LocationDescription()
898 const function_ref<Value *(Value *XOld, IRBuilder<> &IRB)>;
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/IPO/
H A DDeadArgumentElimination.cpp986 IRBuilder<NoFolder> IRB(InsertPt); in RemoveDeadStuffFromFunction() local
990 V = IRB.CreateExtractValue(NewCB, NewRetIdxs[Ri], "newret"); in RemoveDeadStuffFromFunction()
995 RetVal = IRB.CreateInsertValue(RetVal, V, Ri, "oldret"); in RemoveDeadStuffFromFunction()
1038 IRBuilder<NoFolder> IRB(RI); in RemoveDeadStuffFromFunction() local
1053 Value *EV = IRB.CreateExtractValue(OldRet, RetI, "oldret"); in RemoveDeadStuffFromFunction()
1059 RetVal = IRB.CreateInsertValue(RetVal, EV, NewRetIdxs[RetI], in RemoveDeadStuffFromFunction()
H A DCrossDSOCFI.cpp141 IRBuilder<> IRB(BB); in buildCFICheck() local
142 SwitchInst *SI = IRB.CreateSwitch(&CallSiteTypeId, TrapBB, TypeIds.size()); in buildCFICheck()

123