[PATCH] Loop Versioning for LICM

Charlie Turner charlie.turner at arm.com
Mon Jun 22 15:45:04 PDT 2015


In addition to some dups you already noticed in `LoopVectorize`, I spotted a few more on my initial scan.


REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/Scalar/LoopVersioningLICM.cpp:99
@@ +98,3 @@
+/// pointer.
+static unsigned getGEPInductionOperand(const GetElementPtrInst *Gep) {
+  unsigned LastOperand = Gep->getNumOperands() - 1;
----------------
This is duplicated from LoopVectorize.

================
Comment at: lib/Transforms/Scalar/LoopVersioningLICM.cpp:179
@@ +178,3 @@
+/// pointer to the Value, or null otherwise.
+static Value *getStrideFromPointer(Value *Ptr, ScalarEvolution *SE, Loop *Lp) {
+  const PointerType *PtrTy = dyn_cast<PointerType>(Ptr->getType());
----------------
Duplicate in LoopVectorize.

================
Comment at: lib/Transforms/Scalar/LoopVersioningLICM.cpp:338
@@ +337,3 @@
+/// \brief Collects stride access from a given value.
+void LoopVersioningLICM::collectStridedAccess(Value *MemAccess) {
+  Value *Ptr = nullptr;
----------------
Almost identical to the one in LoopVectorize.

http://reviews.llvm.org/D9151

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list