@@ -704,44 +704,6 @@ bool llvm::getIndexExpressionsFromGEP(ScalarEvolution &SE,
704704 return !Subscripts.empty ();
705705}
706706
707- bool llvm::tryDelinearizeFixedSizeImpl (
708- ScalarEvolution *SE, Instruction *Inst, const SCEV *AccessFn,
709- SmallVectorImpl<const SCEV *> &Subscripts, SmallVectorImpl<int > &Sizes) {
710- Value *SrcPtr = getLoadStorePointerOperand (Inst);
711-
712- // Check the simple case where the array dimensions are fixed size.
713- auto *SrcGEP = dyn_cast<GetElementPtrInst>(SrcPtr);
714- if (!SrcGEP)
715- return false ;
716-
717- getIndexExpressionsFromGEP (*SE, SrcGEP, Subscripts, Sizes);
718-
719- // Check that the two size arrays are non-empty and equal in length and
720- // value.
721- // TODO: it would be better to let the caller to clear Subscripts, similar
722- // to how we handle Sizes.
723- if (Sizes.empty () || Subscripts.size () <= 1 ) {
724- Subscripts.clear ();
725- return false ;
726- }
727-
728- // Check that for identical base pointers we do not miss index offsets
729- // that have been added before this GEP is applied.
730- Value *SrcBasePtr = SrcGEP->getOperand (0 )->stripPointerCasts ();
731- const SCEVUnknown *SrcBase =
732- dyn_cast<SCEVUnknown>(SE->getPointerBase (AccessFn));
733- if (!SrcBase || SrcBasePtr != SrcBase->getValue ()) {
734- Subscripts.clear ();
735- return false ;
736- }
737-
738- assert (Subscripts.size () == Sizes.size () + 1 &&
739- " Expected equal number of entries in the list of size and "
740- " subscript." );
741-
742- return true ;
743- }
744-
745707namespace {
746708
747709void printDelinearization (raw_ostream &O, Function *F, LoopInfo *LI,
0 commit comments