/external/swiftshader/third_party/llvm-7.0/llvm/unittests/IR/ |
D | PatternMatch.cpp | 38 IRBuilder<NoFolder> IRB; member 45 BB(BasicBlock::Create(Ctx, "entry", F)), IRB(BB) {} in PatternMatchTest() 54 Value *One = IRB.CreateAdd(IRB.CreateAdd(IRB.getInt32(1), IRB.getInt32(2)), in TEST_F() 55 IRB.getInt32(42)); in TEST_F() 56 Value *Two = IRB.CreateAdd(One, IRB.getInt32(42)); in TEST_F() 57 Value *Leaf = IRB.CreateAdd(IRB.CreateAdd(Two, IRB.getInt32(8)), in TEST_F() 58 IRB.CreateAdd(Two, IRB.getInt32(13))); in TEST_F() 69 Value *X = IRB.getInt32(1); in TEST_F() 70 Value *Y = IRB.getInt32(2); in TEST_F() 95 EXPECT_TRUE(match(IRB.CreateAnd(X, X), m_And(m_Value(tX), m_Deferred(tX)))); in TEST_F() [all …]
|
/external/llvm/unittests/IR/ |
D | PatternMatch.cpp | 38 IRBuilder<NoFolder> IRB; member 45 BB(BasicBlock::Create(Ctx, "entry", F)), IRB(BB) {} in PatternMatchTest() 54 Value *One = IRB.CreateAdd(IRB.CreateAdd(IRB.getInt32(1), IRB.getInt32(2)), in TEST_F() 55 IRB.getInt32(42)); in TEST_F() 56 Value *Two = IRB.CreateAdd(One, IRB.getInt32(42)); in TEST_F() 57 Value *Leaf = IRB.CreateAdd(IRB.CreateAdd(Two, IRB.getInt32(8)), in TEST_F() 58 IRB.CreateAdd(Two, IRB.getInt32(13))); in TEST_F() 69 Type *FltTy = IRB.getFloatTy(); in TEST_F() 76 .match(IRB.CreateSelect(IRB.CreateFCmpOLT(L, R), L, R))); in TEST_F() 82 .match(IRB.CreateSelect(IRB.CreateFCmpOLE(L, R), L, R))); in TEST_F() [all …]
|
/external/llvm/lib/Transforms/Instrumentation/ |
D | MemorySanitizer.cpp | 420 IRBuilder<> IRB(*C); in initializeCallbacks() local 426 WarningFn = M.getOrInsertFunction(WarningFnName, IRB.getVoidTy(), nullptr); in initializeCallbacks() 433 FunctionName, IRB.getVoidTy(), IRB.getIntNTy(AccessSize * 8), in initializeCallbacks() 434 IRB.getInt32Ty(), nullptr); in initializeCallbacks() 438 FunctionName, IRB.getVoidTy(), IRB.getIntNTy(AccessSize * 8), in initializeCallbacks() 439 IRB.getInt8PtrTy(), IRB.getInt32Ty(), nullptr); in initializeCallbacks() 443 "__msan_set_alloca_origin4", IRB.getVoidTy(), IRB.getInt8PtrTy(), IntptrTy, in initializeCallbacks() 444 IRB.getInt8PtrTy(), IntptrTy, nullptr); in initializeCallbacks() 446 M.getOrInsertFunction("__msan_poison_stack", IRB.getVoidTy(), in initializeCallbacks() 447 IRB.getInt8PtrTy(), IntptrTy, nullptr); in initializeCallbacks() [all …]
|
D | ThreadSanitizer.cpp | 151 IRBuilder<> IRB(M.getContext()); in initializeCallbacks() local 154 "__tsan_func_entry", IRB.getVoidTy(), IRB.getInt8PtrTy(), nullptr)); in initializeCallbacks() 156 M.getOrInsertFunction("__tsan_func_exit", IRB.getVoidTy(), nullptr)); in initializeCallbacks() 157 OrdTy = IRB.getInt32Ty(); in initializeCallbacks() 165 ReadName, IRB.getVoidTy(), IRB.getInt8PtrTy(), nullptr)); in initializeCallbacks() 169 WriteName, IRB.getVoidTy(), IRB.getInt8PtrTy(), nullptr)); in initializeCallbacks() 174 UnalignedReadName, IRB.getVoidTy(), IRB.getInt8PtrTy(), nullptr)); in initializeCallbacks() 179 UnalignedWriteName, IRB.getVoidTy(), IRB.getInt8PtrTy(), nullptr)); in initializeCallbacks() 189 AtomicStoreName, IRB.getVoidTy(), PtrTy, Ty, OrdTy, nullptr)); in initializeCallbacks() 222 M.getOrInsertFunction("__tsan_vptr_update", IRB.getVoidTy(), in initializeCallbacks() [all …]
|
D | AddressSanitizer.cpp | 492 Value *createSlowPathCmp(IRBuilder<> &IRB, Value *AddrLong, 498 Value *memToShadow(Value *Shadow, IRBuilder<> &IRB); 566 bool InstrumentGlobals(IRBuilder<> &IRB, Module &M); 681 IRBuilder<> IRB(InstBefore); in unpoisonDynamicAllocasBeforeInst() local 682 Value *DynamicAreaPtr = IRB.CreatePtrToInt(SavedStack, IntptrTy); in unpoisonDynamicAllocasBeforeInst() 692 Value *DynamicAreaOffset = IRB.CreateCall(DynamicAreaOffsetFunc, {}); in unpoisonDynamicAllocasBeforeInst() 694 DynamicAreaPtr = IRB.CreateAdd(IRB.CreatePtrToInt(SavedStack, IntptrTy), in unpoisonDynamicAllocasBeforeInst() 698 IRB.CreateCall(AsanAllocasUnpoisonFunc, in unpoisonDynamicAllocasBeforeInst() 699 {IRB.CreateLoad(DynamicAllocaLayout), DynamicAreaPtr}); in unpoisonDynamicAllocasBeforeInst() 788 void poisonRedZones(ArrayRef<uint8_t> ShadowBytes, IRBuilder<> &IRB, [all …]
|
D | SanitizerCoverage.cpp | 215 IRBuilder<> IRB(*C); in runOnModule() local 216 Type *Int8PtrTy = PointerType::getUnqual(IRB.getInt8Ty()); in runOnModule() 217 Type *Int32PtrTy = PointerType::getUnqual(IRB.getInt32Ty()); in runOnModule() 218 Int64PtrTy = PointerType::getUnqual(IRB.getInt64Ty()); in runOnModule() 219 Int64Ty = IRB.getInt64Ty(); in runOnModule() 238 EmptyAsm = InlineAsm::get(FunctionType::get(IRB.getVoidTy(), false), in runOnModule() 251 Type *Int32Ty = IRB.getInt32Ty(); in runOnModule() 252 Type *Int8Ty = IRB.getInt8Ty(); in runOnModule() 276 IRB.CreatePointerCast(RealGuardArray, Int32PtrTy)); in runOnModule() 289 IRB.CreatePointerCast(RealEightBitCounterArray, Int8PtrTy)); in runOnModule() [all …]
|
D | EfficiencySanitizer.cpp | 195 Value *appToShadow(Value *Shadow, IRBuilder<> &IRB); 248 IRBuilder<> IRB(M.getContext()); in initializeCallbacks() local 258 AlignedLoadName, IRB.getVoidTy(), IRB.getInt8PtrTy(), nullptr)); in initializeCallbacks() 262 AlignedStoreName, IRB.getVoidTy(), IRB.getInt8PtrTy(), nullptr)); in initializeCallbacks() 266 UnalignedLoadName, IRB.getVoidTy(), IRB.getInt8PtrTy(), nullptr)); in initializeCallbacks() 270 UnalignedStoreName, IRB.getVoidTy(), IRB.getInt8PtrTy(), nullptr)); in initializeCallbacks() 273 M.getOrInsertFunction("__esan_unaligned_loadN", IRB.getVoidTy(), in initializeCallbacks() 274 IRB.getInt8PtrTy(), IntptrTy, nullptr)); in initializeCallbacks() 276 M.getOrInsertFunction("__esan_unaligned_storeN", IRB.getVoidTy(), in initializeCallbacks() 277 IRB.getInt8PtrTy(), IntptrTy, nullptr)); in initializeCallbacks() [all …]
|
D | DataFlowSanitizer.cpp | 852 IRBuilder<> IRB(Pos); in runOnModule() local 853 Value *Ne = IRB.CreateICmpNE(V, DFSF.DFS.ZeroShadow); in runOnModule() 871 IRBuilder<> IRB(&F->getEntryBlock().front()); in getArgTLSPtr() local 872 return ArgTLSPtr = IRB.CreateCall(DFS.GetArgTLS, {}); in getArgTLSPtr() 881 IRBuilder<> IRB(&F->getEntryBlock().front()); in getRetvalTLS() local 882 return RetvalTLSPtr = IRB.CreateCall(DFS.GetRetvalTLS, {}); in getRetvalTLS() 886 IRBuilder<> IRB(Pos); in getArgTLS() local 887 return IRB.CreateConstGEP2_64(getArgTLSPtr(), 0, Idx); in getArgTLS() 904 IRBuilder<> IRB(ArgTLSPos); in getShadow() local 905 Shadow = IRB.CreateLoad(getArgTLS(A->getArgNo(), ArgTLSPos)); in getShadow() [all …]
|
D | InstrProfiling.cpp | 519 IRBuilder<> IRB(BasicBlock::Create(M->getContext(), "", RegisterF)); in emitRegistration() local 522 IRB.CreateCall(RuntimeRegisterF, IRB.CreateBitCast(Data, VoidPtrTy)); in emitRegistration() 531 IRB.CreateCall(NamesRegisterF, {IRB.CreateBitCast(NamesVar, VoidPtrTy), in emitRegistration() 532 IRB.getInt64(NamesSize)}); in emitRegistration() 535 IRB.CreateRetVoid(); in emitRegistration() 566 IRBuilder<> IRB(BasicBlock::Create(M->getContext(), "", User)); in emitRuntimeHook() local 567 auto *Load = IRB.CreateLoad(Var); in emitRuntimeHook() 568 IRB.CreateRet(Load); in emitRuntimeHook() 620 IRBuilder<> IRB(BasicBlock::Create(M->getContext(), "", F)); in emitInitialization() local 622 IRB.CreateCall(RegisterF, {}); in emitInitialization() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Instrumentation/ |
D | MemorySanitizer.cpp | 531 IRBuilder<> IRB(*C); in createUserspaceApi() local 537 WarningFn = M.getOrInsertFunction(WarningFnName, IRB.getVoidTy()); in createUserspaceApi() 541 M, ArrayType::get(IRB.getInt64Ty(), kRetvalTLSSize / 8), false, in createUserspaceApi() 550 M, ArrayType::get(IRB.getInt64Ty(), kParamTLSSize / 8), false, in createUserspaceApi() 560 M, ArrayType::get(IRB.getInt64Ty(), kParamTLSSize / 8), false, in createUserspaceApi() 564 M, IRB.getInt64Ty(), false, GlobalVariable::ExternalLinkage, nullptr, in createUserspaceApi() 568 M, IRB.getInt32Ty(), false, GlobalVariable::ExternalLinkage, nullptr, in createUserspaceApi() 576 FunctionName, IRB.getVoidTy(), IRB.getIntNTy(AccessSize * 8), in createUserspaceApi() 577 IRB.getInt32Ty()); in createUserspaceApi() 581 FunctionName, IRB.getVoidTy(), IRB.getIntNTy(AccessSize * 8), in createUserspaceApi() [all …]
|
D | HWAddressSanitizer.cpp | 156 Value *memToShadow(Value *Shadow, Type *Ty, IRBuilder<> &IRB); 166 bool tagAlloca(IRBuilder<> &IRB, AllocaInst *AI, Value *Tag); 167 Value *tagPointer(IRBuilder<> &IRB, Type *Ty, Value *PtrLong, Value *Tag); 168 Value *untagPointer(IRBuilder<> &IRB, Value *PtrLong); 171 Value *getNextTagWithCall(IRBuilder<> &IRB); 172 Value *getStackBaseTag(IRBuilder<> &IRB); 173 Value *getAllocaTag(IRBuilder<> &IRB, Value *StackTag, AllocaInst *AI, 175 Value *getUARTag(IRBuilder<> &IRB, Value *StackTag); 246 IRBuilder<> IRB(*C); in doInitialization() local 247 IntptrTy = IRB.getIntPtrTy(DL); in doInitialization() [all …]
|
D | ThreadSanitizer.cpp | 157 IRBuilder<> IRB(M.getContext()); in initializeCallbacks() local 163 "__tsan_func_entry", Attr, IRB.getVoidTy(), IRB.getInt8PtrTy())); in initializeCallbacks() 165 M.getOrInsertFunction("__tsan_func_exit", Attr, IRB.getVoidTy())); in initializeCallbacks() 167 "__tsan_ignore_thread_begin", Attr, IRB.getVoidTy())); in initializeCallbacks() 169 "__tsan_ignore_thread_end", Attr, IRB.getVoidTy())); in initializeCallbacks() 170 OrdTy = IRB.getInt32Ty(); in initializeCallbacks() 178 ReadName, Attr, IRB.getVoidTy(), IRB.getInt8PtrTy())); in initializeCallbacks() 182 WriteName, Attr, IRB.getVoidTy(), IRB.getInt8PtrTy())); in initializeCallbacks() 187 UnalignedReadName, Attr, IRB.getVoidTy(), IRB.getInt8PtrTy())); in initializeCallbacks() 192 UnalignedWriteName, Attr, IRB.getVoidTy(), IRB.getInt8PtrTy())); in initializeCallbacks() [all …]
|
D | AddressSanitizer.cpp | 657 Value *createSlowPathCmp(IRBuilder<> &IRB, Value *AddrLong, 663 Value *memToShadow(Value *Shadow, IRBuilder<> &IRB); 757 bool InstrumentGlobals(IRBuilder<> &IRB, Module &M, bool *CtorComdat); 758 void InstrumentGlobalsCOFF(IRBuilder<> &IRB, Module &M, 761 void InstrumentGlobalsELF(IRBuilder<> &IRB, Module &M, 765 void InstrumentGlobalsMachO(IRBuilder<> &IRB, Module &M, 769 InstrumentGlobalsWithMetadataArray(IRBuilder<> &IRB, Module &M, 921 IRBuilder<> IRB(InstBefore); in unpoisonDynamicAllocasBeforeInst() local 922 Value *DynamicAreaPtr = IRB.CreatePtrToInt(SavedStack, IntptrTy); in unpoisonDynamicAllocasBeforeInst() 932 Value *DynamicAreaOffset = IRB.CreateCall(DynamicAreaOffsetFunc, {}); in unpoisonDynamicAllocasBeforeInst() [all …]
|
D | BoundsChecking.cpp | 60 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 …]
|
D | EfficiencySanitizer.cpp | 206 Value *appToShadow(Value *Shadow, IRBuilder<> &IRB); 260 IRBuilder<> IRB(M.getContext()); in initializeCallbacks() local 270 AlignedLoadName, IRB.getVoidTy(), IRB.getInt8PtrTy())); in initializeCallbacks() 274 AlignedStoreName, IRB.getVoidTy(), IRB.getInt8PtrTy())); in initializeCallbacks() 278 UnalignedLoadName, IRB.getVoidTy(), IRB.getInt8PtrTy())); in initializeCallbacks() 282 UnalignedStoreName, IRB.getVoidTy(), IRB.getInt8PtrTy())); in initializeCallbacks() 285 M.getOrInsertFunction("__esan_unaligned_loadN", IRB.getVoidTy(), in initializeCallbacks() 286 IRB.getInt8PtrTy(), IntptrTy)); in initializeCallbacks() 288 M.getOrInsertFunction("__esan_unaligned_storeN", IRB.getVoidTy(), in initializeCallbacks() 289 IRB.getInt8PtrTy(), IntptrTy)); in initializeCallbacks() [all …]
|
D | SanitizerCoverage.cpp | 271 IRBuilder<> IRB(M.getContext()); in CreateInitCallsForSections() local 278 {IRB.CreatePointerCast(SecStart, Ty), IRB.CreatePointerCast(SecEnd, Ty)}); in CreateInitCallsForSections() 303 IRBuilder<> IRB(*C); in runOnModule() local 304 Int64PtrTy = PointerType::getUnqual(IRB.getInt64Ty()); in runOnModule() 305 Int32PtrTy = PointerType::getUnqual(IRB.getInt32Ty()); in runOnModule() 306 Int8PtrTy = PointerType::getUnqual(IRB.getInt8Ty()); in runOnModule() 307 Int64Ty = IRB.getInt64Ty(); in runOnModule() 308 Int32Ty = IRB.getInt32Ty(); in runOnModule() 309 Int16Ty = IRB.getInt16Ty(); in runOnModule() 310 Int8Ty = IRB.getInt8Ty(); in runOnModule() [all …]
|
D | DataFlowSanitizer.cpp | 964 IRBuilder<> IRB(Pos); in runOnModule() local 965 Value *Ne = IRB.CreateICmpNE(V, DFSF.DFS.ZeroShadow); in runOnModule() 983 IRBuilder<> IRB(&F->getEntryBlock().front()); in getArgTLSPtr() local 984 return ArgTLSPtr = IRB.CreateCall(DFS.GetArgTLS, {}); in getArgTLSPtr() 993 IRBuilder<> IRB(&F->getEntryBlock().front()); in getRetvalTLS() local 994 return RetvalTLSPtr = IRB.CreateCall(DFS.GetRetvalTLS, {}); in getRetvalTLS() 998 IRBuilder<> IRB(Pos); in getArgTLS() local 999 return IRB.CreateConstGEP2_64(getArgTLSPtr(), 0, Idx); in getArgTLS() 1016 IRBuilder<> IRB(ArgTLSPos); in getShadow() local 1017 Shadow = IRB.CreateLoad(getArgTLS(A->getArgNo(), ArgTLSPos)); in getShadow() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/WebAssembly/ |
D | WebAssemblyLowerEmscriptenEHSjLj.cpp | 336 static GlobalVariable *createGlobalVariableI32(Module &M, IRBuilder<> &IRB, in createGlobalVariableI32() argument 341 return new GlobalVariable(M, IRB.getInt32Ty(), false, in createGlobalVariableI32() 342 GlobalValue::WeakODRLinkage, IRB.getInt32(0), Name); in createGlobalVariableI32() 406 IRBuilder<> IRB(C); in wrapInvoke() local 407 IRB.SetInsertPoint(CI); in wrapInvoke() 411 IRB.CreateStore(IRB.getInt32(0), ThrewGV); in wrapInvoke() 419 CallInst *NewCall = IRB.CreateCall(getInvokeWrapper(CI), Args); in wrapInvoke() 445 Value *Threw = IRB.CreateLoad(ThrewGV, ThrewGV->getName() + ".val"); in wrapInvoke() 446 IRB.CreateStore(IRB.getInt32(0), ThrewGV); in wrapInvoke() 538 IRBuilder<> IRB(C); in wrapTestSetjmp() local [all …]
|
/external/llvm/lib/CodeGen/ |
D | SafeStack.cpp | 128 Value *getOrCreateUnsafeStackPtr(IRBuilder<> &IRB, Function &F); 131 Value *getStackGuard(IRBuilder<> &IRB, Function &F); 134 void checkStackGuard(IRBuilder<> &IRB, Function &F, ReturnInst &RI, 156 Value *moveStaticAllocasToUnsafeStack(IRBuilder<> &IRB, Function &F, 169 createStackRestorePoints(IRBuilder<> &IRB, Function &F, 359 Value *SafeStack::getOrCreateUnsafeStackPtr(IRBuilder<> &IRB, Function &F) { in getOrCreateUnsafeStackPtr() argument 362 if (Value *V = TL->getSafeStackPointerLocation(IRB)) in getOrCreateUnsafeStackPtr() 395 Value *SafeStack::getStackGuard(IRBuilder<> &IRB, Function &F) { in getStackGuard() argument 398 StackGuardVar = TL->getIRStackGuard(IRB); in getStackGuard() 402 return IRB.CreateLoad(StackGuardVar, "StackGuard"); in getStackGuard() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/ |
D | SafeStack.cpp | 147 Value *getStackGuard(IRBuilder<> &IRB, Function &F); 150 void checkStackGuard(IRBuilder<> &IRB, Function &F, ReturnInst &RI, 172 Value *moveStaticAllocasToUnsafeStack(IRBuilder<> &IRB, Function &F, 185 createStackRestorePoints(IRBuilder<> &IRB, Function &F, 367 Value *SafeStack::getStackGuard(IRBuilder<> &IRB, Function &F) { in getStackGuard() argument 368 Value *StackGuardVar = TL.getIRStackGuard(IRB); in getStackGuard() 372 return IRB.CreateLoad(StackGuardVar, "StackGuard"); in getStackGuard() 425 SafeStack::createStackRestorePoints(IRBuilder<> &IRB, Function &F, in createStackRestorePoints() argument 443 DynamicTop = IRB.CreateAlloca(StackPtrTy, /*ArraySize=*/nullptr, in createStackRestorePoints() 445 IRB.CreateStore(StaticTop, DynamicTop); in createStackRestorePoints() [all …]
|
D | WasmEHPrepare.cpp | 172 IRBuilder<> IRB(M.getContext()); in doInitialization() local 173 LPadContextTy = StructType::get(IRB.getInt32Ty(), // lpad_index in doInitialization() 174 IRB.getInt8PtrTy(), // lsda in doInitialization() 175 IRB.getInt32Ty() // selector in doInitialization() 198 IRBuilder<> IRB(F.getContext()); in runOnFunction() local 203 LPadIndexField = IRB.CreateConstGEP2_32(LPadContextTy, LPadContextGV, 0, 0, in runOnFunction() 206 IRB.CreateConstGEP2_32(LPadContextTy, LPadContextGV, 0, 1, "lsda_gep"); in runOnFunction() 207 SelectorField = IRB.CreateConstGEP2_32(LPadContextTy, LPadContextGV, 0, 2, in runOnFunction() 224 "_Unwind_CallPersonality", IRB.getInt32Ty(), IRB.getInt8PtrTy())); in runOnFunction() 262 IRBuilder<> IRB(BB->getContext()); in prepareEHPad() local [all …]
|
/external/llvm/lib/Transforms/Utils/ |
D | ModuleUtils.cpp | 25 IRBuilder<> IRB(M.getContext()); in appendToGlobalArray() local 26 FunctionType *FnTy = FunctionType::get(IRB.getVoidTy(), false); in appendToGlobalArray() 37 EltTy = StructType::get(IRB.getInt32Ty(), PointerType::getUnqual(FnTy), in appendToGlobalArray() 38 IRB.getInt8PtrTy(), nullptr); in appendToGlobalArray() 50 Constant::getNullValue(IRB.getInt8PtrTy()), nullptr); in appendToGlobalArray() 57 EltTy = StructType::get(IRB.getInt32Ty(), PointerType::getUnqual(FnTy), in appendToGlobalArray() 58 IRB.getInt8PtrTy(), nullptr); in appendToGlobalArray() 63 CSVals[0] = IRB.getInt32(Priority); in appendToGlobalArray() 67 CSVals[2] = Data ? ConstantExpr::getPointerCast(Data, IRB.getInt8PtrTy()) in appendToGlobalArray() 68 : Constant::getNullValue(IRB.getInt8PtrTy()); in appendToGlobalArray() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | SROA.cpp | 1272 IRBuilderTy IRB(&SI); in speculateSelectInstLoads() local 1280 IRB.SetInsertPoint(LI); in speculateSelectInstLoads() 1282 IRB.CreateLoad(TV, LI->getName() + ".sroa.speculate.load.true"); in speculateSelectInstLoads() 1284 IRB.CreateLoad(FV, LI->getName() + ".sroa.speculate.load.false"); in speculateSelectInstLoads() 1298 Value *V = IRB.CreateSelect(SI.getCondition(), TL, FL, in speculateSelectInstLoads() 1312 static Value *buildGEP(IRBuilderTy &IRB, Value *BasePtr, in buildGEP() argument 1322 return IRB.CreateInBoundsGEP(nullptr, BasePtr, Indices, in buildGEP() 1335 static Value *getNaturalGEPWithType(IRBuilderTy &IRB, const DataLayout &DL, in getNaturalGEPWithType() argument 1340 return buildGEP(IRB, BasePtr, Indices, NamePrefix); in getNaturalGEPWithType() 1355 Indices.push_back(IRB.getIntN(PtrSize, 0)); in getNaturalGEPWithType() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/ |
D | SROA.cpp | 1333 IRBuilderTy IRB(&SI); in speculateSelectInstLoads() local 1341 IRB.SetInsertPoint(LI); in speculateSelectInstLoads() 1343 IRB.CreateLoad(TV, LI->getName() + ".sroa.speculate.load.true"); in speculateSelectInstLoads() 1345 IRB.CreateLoad(FV, LI->getName() + ".sroa.speculate.load.false"); in speculateSelectInstLoads() 1359 Value *V = IRB.CreateSelect(SI.getCondition(), TL, FL, in speculateSelectInstLoads() 1373 static Value *buildGEP(IRBuilderTy &IRB, Value *BasePtr, in buildGEP() argument 1383 return IRB.CreateInBoundsGEP(nullptr, BasePtr, Indices, in buildGEP() 1396 static Value *getNaturalGEPWithType(IRBuilderTy &IRB, const DataLayout &DL, in getNaturalGEPWithType() argument 1401 return buildGEP(IRB, BasePtr, Indices, NamePrefix); in getNaturalGEPWithType() 1416 Indices.push_back(IRB.getIntN(PtrSize, 0)); in getNaturalGEPWithType() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/ |
D | ModuleUtils.cpp | 25 IRBuilder<> IRB(M.getContext()); in appendToGlobalArray() local 26 FunctionType *FnTy = FunctionType::get(IRB.getVoidTy(), false); in appendToGlobalArray() 37 EltTy = StructType::get(IRB.getInt32Ty(), PointerType::getUnqual(FnTy), in appendToGlobalArray() 38 IRB.getInt8PtrTy()); in appendToGlobalArray() 50 Constant::getNullValue(IRB.getInt8PtrTy())); in appendToGlobalArray() 57 EltTy = StructType::get(IRB.getInt32Ty(), PointerType::getUnqual(FnTy), in appendToGlobalArray() 58 IRB.getInt8PtrTy()); in appendToGlobalArray() 63 CSVals[0] = IRB.getInt32(Priority); in appendToGlobalArray() 67 CSVals[2] = Data ? ConstantExpr::getPointerCast(Data, IRB.getInt8PtrTy()) in appendToGlobalArray() 68 : Constant::getNullValue(IRB.getInt8PtrTy()); in appendToGlobalArray() [all …]
|