Lines Matching refs:GEP
273 bool isGEPFree(GetElementPtrInst &GEP);
275 bool accumulateGEPOffset(GEPOperator &GEP, APInt &Offset);
670 /// Accumulate a constant GEP offset into an APInt if possible.
674 bool CallAnalyzer::accumulateGEPOffset(GEPOperator &GEP, APInt &Offset) {
675 unsigned IntPtrWidth = DL.getIndexTypeSizeInBits(GEP.getType());
678 for (gep_type_iterator GTI = gep_type_begin(GEP), GTE = gep_type_end(GEP);
703 /// Use TTI to check whether a GEP is free.
706 bool CallAnalyzer::isGEPFree(GetElementPtrInst &GEP) {
708 Operands.push_back(GEP.getOperand(0));
709 for (User::op_iterator I = GEP.idx_begin(), E = GEP.idx_end(); I != E; ++I)
714 return TargetTransformInfo::TCC_Free == TTI.getUserCost(&GEP, Operands);
847 /// \return true if the specified GEP can be folded.
855 // Check if the offset of this GEP is constant, and if so accumulate it
869 // Lambda to check whether a GEP's indices are all constant.
870 auto IsGEPOffsetConstant = [&](GetElementPtrInst &GEP) {
871 for (User::op_iterator I = GEP.idx_begin(), E = GEP.idx_end(); I != E; ++I)
1838 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
1839 if (!GEP->isInBounds() || !accumulateGEPOffset(*GEP, Offset))
1841 V = GEP->getPointerOperand();