/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/ |
D | SeparateConstOffsetFromGEP.cpp | 237 static Value *Extract(Value *Idx, GetElementPtrInst *GEP, 243 static int64_t Find(Value *Idx, GetElementPtrInst *GEP, 373 bool splitGEP(GetElementPtrInst *GEP); 382 void lowerToSingleIndexGEPs(GetElementPtrInst *Variadic, 392 void lowerToArithmetics(GetElementPtrInst *Variadic, 400 int64_t accumulateByteOffset(GetElementPtrInst *GEP, bool &NeedsExtraction); 417 bool canonicalizeArrayIndicesToPointerSize(GetElementPtrInst *GEP); 442 void swapGEPOperand(GetElementPtrInst *First, GetElementPtrInst *Second); 445 bool isLegalToSwapOperand(GetElementPtrInst *First, GetElementPtrInst *Second, 736 Value *ConstantOffsetExtractor::Extract(Value *Idx, GetElementPtrInst *GEP, in Extract() [all …]
|
D | NaryReassociate.cpp | 292 return tryReassociateGEP(cast<GetElementPtrInst>(I)); in tryReassociate() 298 static bool isGEPFoldable(GetElementPtrInst *GEP, in isGEPFoldable() 307 Instruction *NaryReassociatePass::tryReassociateGEP(GetElementPtrInst *GEP) { in tryReassociateGEP() 325 GetElementPtrInst *GEP) { in requiresSignExtension() 331 GetElementPtrInst * 332 NaryReassociatePass::tryReassociateGEPAtIndex(GetElementPtrInst *GEP, in tryReassociateGEPAtIndex() 366 GetElementPtrInst * 367 NaryReassociatePass::tryReassociateGEPAtIndex(GetElementPtrInst *GEP, in tryReassociateGEPAtIndex() 430 GetElementPtrInst *NewGEP = in tryReassociateGEPAtIndex() 431 cast<GetElementPtrInst>(Builder.CreateGEP(Candidate, RHS)); in tryReassociateGEPAtIndex()
|
D | StraightLineStrengthReduce.cpp | 201 void allocateCandidatesAndFindBasisForGEP(GetElementPtrInst *GEP); 222 GetElementPtrInst *GEP); 273 static bool isGEPFoldable(GetElementPtrInst *GEP, in isGEPFoldable() 297 return isGEPFoldable(cast<GetElementPtrInst>(C.Ins), TTI); in isFoldable() 302 static bool hasOnlyOneNonZeroIndex(GetElementPtrInst *GEP) { in hasOnlyOneNonZeroIndex() 324 hasOnlyOneNonZeroIndex(cast<GetElementPtrInst>(C.Ins))); in isSimplestForm() 382 allocateCandidatesAndFindBasisForGEP(cast<GetElementPtrInst>(I)); in allocateCandidatesAndFindBasis() 486 GetElementPtrInst *GEP) { in factorArrayIndex() 519 GetElementPtrInst *GEP) { in allocateCandidatesAndFindBasisForGEP() 585 cast<GetElementPtrInst>(Basis.Ins)->getResultElementType())); in emitBump() [all …]
|
D | GVNHoist.cpp | 835 if (const GetElementPtrInst *GepOp = in allGepOperandsAvailable() 836 dyn_cast<GetElementPtrInst>(Inst)) { in allGepOperandsAvailable() 865 if (GetElementPtrInst *GepOp = dyn_cast<GetElementPtrInst>(Op)) in makeGepsAvailable() 879 const GetElementPtrInst *OtherGep; in makeGepsAvailable() 881 OtherGep = cast<GetElementPtrInst>(OtherLd->getPointerOperand()); in makeGepsAvailable() 883 OtherGep = cast<GetElementPtrInst>( in makeGepsAvailable() 980 GetElementPtrInst *Gep = nullptr; in makeGepOperandsAvailable() 983 Gep = dyn_cast<GetElementPtrInst>(Ld->getPointerOperand()); in makeGepOperandsAvailable() 985 Gep = dyn_cast<GetElementPtrInst>(St->getPointerOperand()); in makeGepOperandsAvailable() 989 if (isa<GetElementPtrInst>(Val)) { in makeGepOperandsAvailable() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | SeparateConstOffsetFromGEP.cpp | 220 static Value *Extract(Value *Idx, GetElementPtrInst *GEP, 225 static int64_t Find(Value *Idx, GetElementPtrInst *GEP, 344 bool splitGEP(GetElementPtrInst *GEP); 352 void lowerToSingleIndexGEPs(GetElementPtrInst *Variadic, 361 void lowerToArithmetics(GetElementPtrInst *Variadic, 368 int64_t accumulateByteOffset(GetElementPtrInst *GEP, bool &NeedsExtraction); 384 bool canonicalizeArrayIndicesToPointerSize(GetElementPtrInst *GEP); 405 void swapGEPOperand(GetElementPtrInst *First, GetElementPtrInst *Second); 407 bool isLegalToSwapOperand(GetElementPtrInst *First, GetElementPtrInst *Second, 690 Value *ConstantOffsetExtractor::Extract(Value *Idx, GetElementPtrInst *GEP, in Extract() [all …]
|
D | NaryReassociate.cpp | 132 Instruction *tryReassociateGEP(GetElementPtrInst *GEP); 140 GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP, 144 GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP, 174 bool requiresSignExtension(Value *Index, GetElementPtrInst *GEP); 296 return tryReassociateGEP(cast<GetElementPtrInst>(I)); in tryReassociate() 302 static bool isGEPFoldable(GetElementPtrInst *GEP, in isGEPFoldable() 311 Instruction *NaryReassociate::tryReassociateGEP(GetElementPtrInst *GEP) { in tryReassociateGEP() 328 GetElementPtrInst *GEP) { in requiresSignExtension() 334 GetElementPtrInst * 335 NaryReassociate::tryReassociateGEPAtIndex(GetElementPtrInst *GEP, unsigned I, in tryReassociateGEPAtIndex() [all …]
|
D | StraightLineStrengthReduce.cpp | 173 void allocateCandidatesAndFindBasisForGEP(GetElementPtrInst *GEP); 190 GetElementPtrInst *GEP); 237 static bool isGEPFoldable(GetElementPtrInst *GEP, in isGEPFoldable() 261 return isGEPFoldable(cast<GetElementPtrInst>(C.Ins), TTI); in isFoldable() 266 static bool hasOnlyOneNonZeroIndex(GetElementPtrInst *GEP) { in hasOnlyOneNonZeroIndex() 288 hasOnlyOneNonZeroIndex(cast<GetElementPtrInst>(C.Ins))); in isSimplestForm() 346 allocateCandidatesAndFindBasisForGEP(cast<GetElementPtrInst>(I)); in allocateCandidatesAndFindBasis() 450 GetElementPtrInst *GEP) { in factorArrayIndex() 483 GetElementPtrInst *GEP) { in allocateCandidatesAndFindBasisForGEP() 551 cast<GetElementPtrInst>(Basis.Ins)->getResultElementType())); in emitBump() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Transforms/Scalar/ |
D | NaryReassociate.h | 94 class GetElementPtrInst; variable 121 Instruction *tryReassociateGEP(GetElementPtrInst *GEP); 130 GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP, 135 GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP, 166 bool requiresSignExtension(Value *Index, GetElementPtrInst *GEP);
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/ |
D | PHITransAddr.cpp | 28 isa<GetElementPtrInst>(Inst)) in CanPHITrans() 215 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in PHITranslateSubExpr() 241 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) in PHITranslateSubExpr() 397 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in InsertPHITranslatedSubExpr() 407 GetElementPtrInst *Result = GetElementPtrInst::Create( in InsertPHITranslatedSubExpr()
|
/external/swiftshader/third_party/LLVM/lib/Analysis/ |
D | PHITransAddr.cpp | 26 isa<GetElementPtrInst>(Inst)) in CanPHITrans() 216 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in PHITranslateSubExpr() 242 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(*UI)) in PHITranslateSubExpr() 399 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in InsertPHITranslatedSubExpr() 409 GetElementPtrInst *Result = in InsertPHITranslatedSubExpr() 410 GetElementPtrInst::Create(GEPOps[0], makeArrayRef(GEPOps).slice(1), in InsertPHITranslatedSubExpr()
|
/external/llvm/unittests/IR/ |
D | InstructionsTest.cpp | 327 GetElementPtrInst *Gep0 = GetElementPtrInst::Create(I32Ty, PtrVecA, C2xi32a); in TEST() 328 GetElementPtrInst *Gep1 = GetElementPtrInst::Create(I32Ty, PtrVecA, C2xi32b); in TEST() 329 GetElementPtrInst *Gep2 = GetElementPtrInst::Create(I32Ty, PtrVecB, C2xi32a); in TEST() 330 GetElementPtrInst *Gep3 = GetElementPtrInst::Create(I32Ty, PtrVecB, C2xi32b); in TEST() 358 GetElementPtrInst *GepII0 = GetElementPtrInst::Create(I32Ty, Gep0, C2xi32b); in TEST() 359 GetElementPtrInst *GepII1 = GetElementPtrInst::Create(I32Ty, Gep1, C2xi32a); in TEST() 360 GetElementPtrInst *GepII2 = GetElementPtrInst::Create(I32Ty, Gep2, C2xi32b); in TEST() 361 GetElementPtrInst *GepII3 = GetElementPtrInst::Create(I32Ty, Gep3, C2xi32a); in TEST()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/ |
D | ShadowStackGCLowering.cpp | 78 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B, 81 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B, 256 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context, in CreateGEP() 266 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP() 268 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP() 271 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context, in CreateGEP() 278 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP() 280 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP()
|
/external/llvm/lib/Analysis/ |
D | PHITransAddr.cpp | 27 isa<GetElementPtrInst>(Inst)) in CanPHITrans() 217 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in PHITranslateSubExpr() 243 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) in PHITranslateSubExpr() 400 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) { in InsertPHITranslatedSubExpr() 410 GetElementPtrInst *Result = GetElementPtrInst::Create( in InsertPHITranslatedSubExpr()
|
D | Delinearization.cpp | 77 else if (GetElementPtrInst *Gep = dyn_cast<GetElementPtrInst>(&Inst)) in getPointerOperand() 89 !isa<GetElementPtrInst>(Inst)) in print()
|
/external/swiftshader/third_party/LLVM/lib/CodeGen/ |
D | SjLjEHPrepare.cpp | 517 CallSite = GetElementPtrInst::Create(FunctionContext, Idxs, "call_site", in insertSjLjEHSupport() 522 Value *FCData = GetElementPtrInst::Create(FunctionContext, Idxs, "fc_data", in insertSjLjEHSupport() 525 Value *SelectorAddr = GetElementPtrInst::Create(FCData, Idxs, in insertSjLjEHSupport() 530 Value *ExceptionAddr = GetElementPtrInst::Create(FCData, Idxs, in insertSjLjEHSupport() 598 GetElementPtrInst::Create(FunctionContext, Idxs, "lsda_gep", in insertSjLjEHSupport() 606 GetElementPtrInst::Create(FunctionContext, Idxs, "lsda_gep", in insertSjLjEHSupport() 614 = GetElementPtrInst::Create(FunctionContext, Idxs, "jbuf_gep", in insertSjLjEHSupport() 618 GetElementPtrInst::Create(JBufPtr, Idxs, "jbuf_fp_gep", in insertSjLjEHSupport() 630 GetElementPtrInst::Create(JBufPtr, Idxs, "jbuf_sp_gep", in insertSjLjEHSupport() 736 CallSite = GetElementPtrInst::Create(FuncCtx, Idxs, "call_site", in setupFunctionContext() [all …]
|
D | ShadowStackGC.cpp | 66 static GetElementPtrInst *CreateGEP(LLVMContext &Context, 69 static GetElementPtrInst *CreateGEP(LLVMContext &Context, 349 GetElementPtrInst * 357 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP() 359 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP() 362 GetElementPtrInst * 369 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP() 371 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP()
|
/external/swiftshader/third_party/llvm-7.0/llvm/unittests/IR/ |
D | InstructionsTest.cpp | 339 GetElementPtrInst *Gep0 = GetElementPtrInst::Create(I32Ty, PtrVecA, C2xi32a); in TEST() 340 GetElementPtrInst *Gep1 = GetElementPtrInst::Create(I32Ty, PtrVecA, C2xi32b); in TEST() 341 GetElementPtrInst *Gep2 = GetElementPtrInst::Create(I32Ty, PtrVecB, C2xi32a); in TEST() 342 GetElementPtrInst *Gep3 = GetElementPtrInst::Create(I32Ty, PtrVecB, C2xi32b); in TEST() 370 GetElementPtrInst *GepII0 = GetElementPtrInst::Create(I32Ty, Gep0, C2xi32b); in TEST() 371 GetElementPtrInst *GepII1 = GetElementPtrInst::Create(I32Ty, Gep1, C2xi32a); in TEST() 372 GetElementPtrInst *GepII2 = GetElementPtrInst::Create(I32Ty, Gep2, C2xi32b); in TEST() 373 GetElementPtrInst *GepII3 = GetElementPtrInst::Create(I32Ty, Gep3, C2xi32a); in TEST() 649 auto *GI = cast<GetElementPtrInst>(B.CreateInBoundsGEP(GEPBase, {Arg0})); in TEST_F() 668 ASSERT_TRUE(isa<GetElementPtrInst>(V)); in TEST() [all …]
|
/external/llvm/lib/CodeGen/ |
D | ShadowStackGCLowering.cpp | 59 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B, 62 static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B, 353 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context, in CreateGEP() 363 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP() 365 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP() 368 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context, in CreateGEP() 375 assert(isa<GetElementPtrInst>(Val) && "Unexpected folded constant"); in CreateGEP() 377 return dyn_cast<GetElementPtrInst>(Val); in CreateGEP()
|
/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/ |
D | InstCombinePHI.cpp | 131 GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0)); in FoldPHIArgGEPIntoPHI() 148 GetElementPtrInst *GEP= dyn_cast<GetElementPtrInst>(PN.getIncomingValue(i)); in FoldPHIArgGEPIntoPHI() 221 GetElementPtrInst *InGEP =cast<GetElementPtrInst>(PN.getIncomingValue(i)); in FoldPHIArgGEPIntoPHI() 231 GetElementPtrInst *NewGEP = in FoldPHIArgGEPIntoPHI() 232 GetElementPtrInst::Create(Base, makeArrayRef(FixedOperands).slice(1)); in FoldPHIArgGEPIntoPHI() 279 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(L->getOperand(0))) in isSafeAndProfitableToSinkLoad() 394 if (isa<GetElementPtrInst>(FirstInst)) in FoldPHIArgOpIntoPHI() 829 (isa<BinaryOperator>(PHIUser) || isa<GetElementPtrInst>(PHIUser)) && in visitPHINode()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AMDGPU/ |
D | AMDGPUPromoteAlloca.cpp | 300 const std::map<GetElementPtrInst *, Value *> &GEPIdx) { in calculateVectorIndex() argument 301 GetElementPtrInst *GEP = cast<GetElementPtrInst>(Ptr); in calculateVectorIndex() 307 static Value* GEPToVectorIndex(GetElementPtrInst *GEP) { in GEPToVectorIndex() 329 return isa<GetElementPtrInst>(LI->getPointerOperand()) && LI->isSimple(); in canVectorizeInst() 338 return (SI->getPointerOperand() == User) && isa<GetElementPtrInst>(User) && SI->isSimple(); in canVectorizeInst() 368 std::map<GetElementPtrInst*, Value*> GEPVectorIdx; in tryPromoteAllocaToVector() 371 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(AllocaUser); in tryPromoteAllocaToVector() 565 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UseInst)) { in collectUsesWithPtrTypes()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/IPO/ |
D | ArgumentPromotion.cpp | 171 SrcTy = cast<GetElementPtrInst>(UI)->getSourceElementType(); in doPromotion() 196 Params.push_back(GetElementPtrInst::getIndexedType( in doPromotion() 262 Value *Idx = GetElementPtrInst::Create( in doPromotion() 295 V = GetElementPtrInst::Create(ArgIndex.first, V, Ops, in doPromotion() 392 Value *Idx = GetElementPtrInst::Create( in doPromotion() 432 GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->user_back()); in doPromotion() 608 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) { in isSafeToPromoteArgument() 646 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UR)) { in isSafeToPromoteArgument() 793 if (isa<GetElementPtrInst>(V) || isa<PHINode>(V)) { in canPaddingBeAccessed()
|
/external/llvm/lib/Transforms/IPO/ |
D | ArgumentPromotion.cpp | 218 if (isa<GetElementPtrInst>(V) || isa<PHINode>(V)) { in canPaddingBeAccessed() 502 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) { in isSafeToPromoteArgument() 539 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UR)) { in isSafeToPromoteArgument() 706 SrcTy = cast<GetElementPtrInst>(UI)->getSourceElementType(); in DoPromotion() 731 Params.push_back(GetElementPtrInst::getIndexedType( in DoPromotion() 813 Value *Idx = GetElementPtrInst::Create( in DoPromotion() 842 V = GetElementPtrInst::Create(ArgIndex.first, V, Ops, in DoPromotion() 943 Value *Idx = GetElementPtrInst::Create( in DoPromotion() 983 GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->user_back()); in DoPromotion()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombinePHI.cpp | 122 GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0)); in FoldPHIArgGEPIntoPHI() 139 GetElementPtrInst *GEP= dyn_cast<GetElementPtrInst>(PN.getIncomingValue(i)); in FoldPHIArgGEPIntoPHI() 212 GetElementPtrInst *InGEP =cast<GetElementPtrInst>(PN.getIncomingValue(i)); in FoldPHIArgGEPIntoPHI() 222 GetElementPtrInst *NewGEP = in FoldPHIArgGEPIntoPHI() 223 GetElementPtrInst::Create(FirstInst->getSourceElementType(), Base, in FoldPHIArgGEPIntoPHI() 268 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(L->getOperand(0))) in isSafeAndProfitableToSinkLoad() 476 if (isa<GetElementPtrInst>(FirstInst)) in FoldPHIArgOpIntoPHI() 904 (isa<BinaryOperator>(PHIUser) || isa<GetElementPtrInst>(PHIUser)) && in visitPHINode()
|
/external/swiftshader/third_party/LLVM/lib/Transforms/IPO/ |
D | ArgumentPromotion.cpp | 352 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) { in isSafeToPromoteArgument() 390 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(U)) { in isSafeToPromoteArgument() 555 assert(isa<LoadInst>(User) || isa<GetElementPtrInst>(User)); in DoPromotion() 581 Params.push_back(GetElementPtrInst::getIndexedType(I->getType(), *SI)); in DoPromotion() 671 Value *Idx = GetElementPtrInst::Create(*AI, Idxs, in DoPromotion() 702 V = GetElementPtrInst::Create(V, Ops, V->getName()+".idx", Call); in DoPromotion() 803 GetElementPtrInst::Create(TheAlloca, Idxs, in DoPromotion() 838 GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->use_back()); in DoPromotion()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/InstCombine/ |
D | InstCombinePHI.cpp | 114 } else if (GetElementPtrInst *GI = dyn_cast<GetElementPtrInst>(U)) { in FoldIntegerTypedPHI() 378 GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0)); in FoldPHIArgGEPIntoPHI() 395 GetElementPtrInst *GEP= dyn_cast<GetElementPtrInst>(PN.getIncomingValue(i)); in FoldPHIArgGEPIntoPHI() 468 GetElementPtrInst *InGEP =cast<GetElementPtrInst>(PN.getIncomingValue(i)); in FoldPHIArgGEPIntoPHI() 478 GetElementPtrInst *NewGEP = in FoldPHIArgGEPIntoPHI() 479 GetElementPtrInst::Create(FirstInst->getSourceElementType(), Base, in FoldPHIArgGEPIntoPHI() 524 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(L->getOperand(0))) in isSafeAndProfitableToSinkLoad() 732 if (isa<GetElementPtrInst>(FirstInst)) in FoldPHIArgOpIntoPHI() 1162 (isa<BinaryOperator>(PHIUser) || isa<GetElementPtrInst>(PHIUser)) && in visitPHINode()
|